-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea16723
commit dccc709
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -495,17 +495,25 @@ if (typeof PDFJS === 'undefined') { | |
} | ||
})(); | ||
|
||
// Support: IE<10, Android<4.0, iOS<5.0 | ||
// Support: IE<10, Android<4.0, iOS | ||
(function checkRequestAnimationFrame() { | ||
function fakeRequestAnimationFrame(callback) { | ||
window.setTimeout(callback, 20); | ||
} | ||
|
||
var isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent); | ||
if (isIOS) { | ||
// requestAnimationFrame on iOS is broken, replacing with fake one. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yurydelendik
Author
Contributor
|
||
window.requestAnimationFrame = fakeRequestAnimationFrame; | ||
return; | ||
} | ||
if ('requestAnimationFrame' in window) { | ||
return; | ||
} | ||
window.requestAnimationFrame = | ||
window.mozRequestAnimationFrame || | ||
window.webkitRequestAnimationFrame || | ||
(function fakeRequestAnimationFrame(callback) { | ||
window.setTimeout(callback, 20); | ||
}); | ||
fakeRequestAnimationFrame; | ||
})(); | ||
|
||
(function checkCanvasSizeLimitation() { | ||
|
What do you mean by "broken" here?