Skip to content

Commit

Permalink
Merge pull request mozilla#9138 from Snuffleupagus/rm-requestAnimatio…
Browse files Browse the repository at this point in the history
…nFrame-polyfill

Remove the `requestAnimationFrame` polyfill
  • Loading branch information
yurydelendik authored Nov 15, 2017
2 parents f09f37f + 4ab2ec2 commit c145de8
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/shared/compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,36 +531,6 @@ PDFJS.compatibilityChecked = true;
}
})();

// Support: IE<10, Android<4.0, iOS
(function checkRequestAnimationFrame() {
function installFakeAnimationFrameFunctions() {
window.requestAnimationFrame = function (callback) {
return window.setTimeout(callback, 20);
};
window.cancelAnimationFrame = function (timeoutID) {
window.clearTimeout(timeoutID);
};
}

if (!hasDOM) {
return;
}
if (isIOS) {
// requestAnimationFrame on iOS is broken, replacing with fake one.
installFakeAnimationFrameFunctions();
return;
}
if ('requestAnimationFrame' in window) {
return;
}
window.requestAnimationFrame = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame;
if (window.requestAnimationFrame) {
return;
}
installFakeAnimationFrameFunctions();
})();

// Support: Android, iOS
(function checkCanvasSizeLimitation() {
if (isIOS || isAndroid) {
Expand Down

0 comments on commit c145de8

Please sign in to comment.