Bug 621892 - Adjust y coordinate after text reflow [r=vingtetun]
--- 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": {