昂鞥哦啊嗯嗯o鞥偶鞥/t身材一 2015年7月3日 下午3:30於 <mihai.slavcov...@gmail.com>寫道:
> 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}; > } > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform