Skip to content

Commit

Permalink
Bug 1022746 - Remove requestAnimationFrame from FontSizeUtils to fix …
Browse files Browse the repository at this point in the history
…frames falling back to sync panning and zooming. r=vingtetun
  • Loading branch information
DouglasSherk committed Jun 10, 2014
1 parent 0cfb7dd commit 349f723
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions shared/js/font_size_utils.js
Expand Up @@ -140,12 +140,8 @@
_registerHeadersInSubtree: function(domNode) {
var headers = domNode.querySelectorAll('header > h1');
for (var i = 0; i < headers.length; i++) {
// On some apps wrapping inside a requestAnimationFrame reduces the
// number of calls to _reformatHeaderText().
window.requestAnimationFrame(function(header) {
this._reformatHeaderText(header);
this._observeHeaderChanges(header);
}.bind(this, headers[i]));
this._reformatHeaderText(headers[i]);
this._observeHeaderChanges(headers[i]);
}
},

Expand Down

0 comments on commit 349f723

Please sign in to comment.