On 07/03/2015 10:27 AM, [email protected] wrote:
Hi,I have an SWT application that uses a browser to display HTML pages. Latest SWT 4.5 now support XulRunner v31, but something has changed: zoom is not working anymore. It was working before with SWT 4.4 and XulRunner v10. I have no experience with XulRunner or XUL. Did something changed between 10 and 31 regarding zoom? Here is what I used for zooming: var winWatcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].getService(Components.interfaces.nsIWindowWatcher); var enumerator = winWatcher.getWindowEnumerator(); var win = null; while (enumerator.hasMoreElements()) { var checkWin = enumerator.getNext(); if (checkWin.document.location == '@{currentLocation}') { win = checkWin; break; } } if (win != null) { var interfaceRequestor = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor); var webNavigation = interfaceRequestor.getInterface(Components.interfaces.nsIWebNavigation); var docShell = webNavigation.QueryInterface(Components.interfaces.nsIDocShell); var docViewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer); docViewer.fullZoom = @{zoomLevel}; }
Are you sure you're on v31? https://bugzilla.mozilla.org/show_bug.cgi?id=1036694 merged nsIMarkupDocumentViewer to nsIContentViewer. _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

