mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 799333: Make reflow-on-zoom reset after a double-tap to zoom out. [r=blassey]
This commit is contained in:
parent
9cc8a76bf7
commit
2aba98c47c
@ -3584,6 +3584,13 @@ var BrowserEventHandler = {
|
||||
this.updateReflozPref();
|
||||
},
|
||||
|
||||
resetMaxLineBoxWidth: function() {
|
||||
let webNav = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation);
|
||||
let docShell = webNav.QueryInterface(Ci.nsIDocShell);
|
||||
let docViewer = docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
docViewer.changeMaxLineBoxWidth(0);
|
||||
},
|
||||
|
||||
updateReflozPref: function() {
|
||||
this.mReflozPref = Services.prefs.getBoolPref("browser.zoom.reflowOnZoom");
|
||||
},
|
||||
@ -3747,6 +3754,7 @@ var BrowserEventHandler = {
|
||||
},
|
||||
|
||||
_zoomOut: function() {
|
||||
BrowserEventHandler.resetMaxLineBoxWidth();
|
||||
sendMessageToJava({ gecko: { type: "Browser:ZoomToPageWidth"} });
|
||||
},
|
||||
|
||||
@ -3839,6 +3847,10 @@ var BrowserEventHandler = {
|
||||
}
|
||||
}
|
||||
|
||||
if (rect.w > viewport.cssWidth || rect.h > viewport.cssHeight) {
|
||||
BrowserEventHandler.resetMaxLineBoxWidth();
|
||||
}
|
||||
|
||||
sendMessageToJava({ gecko: rect });
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user