Bug 623313 - Let text reflow finish before zooming [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Thu, 13 Jan 2011 17:07:10 -0800
changeset 67255 74ff0c22c7a993bcbabf02d1035f85ece2037910
parent 67254 e8a86deef3986c28153e9b3ee5155695eb302181
child 67256 e26066134fb69acfaf38d59c39b9b19b4f8aff19
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs623313
Bug 623313 - Let text reflow finish before zooming [r=mfinkle]
mobile/chrome/content/content.js
--- 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);