Boris Zbarsky wrote: > On 9/25/12 7:54 AM, Paul Rouget wrote: > >let win = gBrowser.contentWindow; > >let gIOService = > >Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService); > >let windowUtils = > >win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowUtils); > >let uri = gIOService.newURI('data:text/css,@namespace > >url("http://www.w3.org/1999/xhtml");@namespace xul > >url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");html > >xul|scrollbar {display:none}', null, null); > >windowUtils.loadSheet(uri, windowUtils.AGENT_SHEET); > > > >But it doesn't appear to work. > > > >Any idea? > > This should work for non-root scrollbars. > > The problem with the root scrollbars is that they're outside the > root element's primary frame. When you add a stylesheet, we post a > restyle event on the root element. When this is processed we > restyle that element and all its descendants. But as I said, the > scrollbars are actually _siblings_ of the root element, so don't get > restyled. > > We could try to change this on the Gecko side, but it might be > simpler (though making the operation slightly slower) for you to > just force a root frame reconstruct. Either remove and reinsert the > documentElement or set the relevant <browser> to display:none, > flush, and then set it back to its normal display value....
Thank you. It works: http://pastebin.mozilla.org/1842209 -- Paul _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform