Bug 621892 - Adjust y coordinate after text reflow [r=vingtetun]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 29 Dec 2010 07:34:16 -0800
changeset 67179 4606a816ce17ed3b41508b070873c8fbd8e2a305
parent 67178 ca9b5f0036235168cb95e2fa3b50d29d2da0e510
child 67180 0fb93aaa30d52c29fe93949b589aeae6a9372130
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)
reviewersvingtetun
bugs621892
Bug 621892 - Adjust y coordinate after text reflow [r=vingtetun]
mobile/chrome/content/content.js
--- a/mobile/chrome/content/content.js
+++ b/mobile/chrome/content/content.js
@@ -530,17 +530,20 @@ Content.prototype = {
           let element = elementFromPoint(x, y);
           let win = element.ownerDocument.defaultView;
           while (element && win.getComputedStyle(element,null).display == "inline")
             element = element.parentNode;
           if (element) {
             rect = getBoundingContentRect(element);
             if (Services.prefs.getBoolPref("browser.ui.zoom.reflow")) {
               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 });
         break;
       }
 
       case "Browser:MozApplicationCache:Fetch": {