Bug 623313 - Let text reflow finish before zooming [r=mfinkle]
--- a/mobile/chrome/content/content.js
+++ b/mobile/chrome/content/content.js
@@ -469,17 +469,19 @@ let Content = {
this._setTextZoom(Math.max(1, rect.width / json.width));
let oldRect = rect;
rect = getBoundingContentRect(element);
y += rect.top - oldRect.top;
}
}
}
- sendAsyncMessage("Browser:ZoomToPoint:Return", { x: x, y: y, zoomTo: rect });
+ content.setTimeout(function() {
+ sendAsyncMessage("Browser:ZoomToPoint:Return", { x: x, y: y, zoomTo: rect });
+ }, 0);
break;
}
case "Browser:MozApplicationCache:Fetch": {
let currentURI = Services.io.newURI(json.location, json.charset, null);
let manifestURI = Services.io.newURI(json.manifest, json.charset, currentURI);
let updateService = Cc["@mozilla.org/offlinecacheupdate-service;1"]
.getService(Ci.nsIOfflineCacheUpdateService);