Adam Lock wrote:I think this is the only way you can do *before* frame creation at the moment. The frame construction code will create a scrollable view unless nsIScrollable says not to or if the target device doesn't support native widgets (i.e. the printer).> After creation try doing a QueryInterface on the webbrowser interface for
> the nsIScrollable interface, e.g.
>
> nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(mWebBrowser);hmm,
http://www.mozilla.org/projects/embedding/apiReviewNotes.html#nsIScrollable ,
indicates that we're going to depricate nsIScorllable. Do you know how to
accomplish the same task using nsIDOMWindow?Jud
http://lxr.mozilla.org/seamonkey/source/layout/html/style/src/nsCSSFrameConstructor.cpp#3650
In theory you should also be able to obtain the frame's nsIDOMWindow after creation and disable them with some code like this:
nsCOMPtr<nsIDOMWindow> window;
mWebBrowser->GetContentDOMWindow(getter_AddRefs(window));
nsCOMPtr<nsIDOMBarProp> scrollbar;
window->GetScrollbars(getter_AddRefs(scrollbar));
scrollbar->SetVisible(PR_FALSE);
However I think the object implementing nsIDOMBarProp does has not implemented these methods:
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsBarProps.cpp#244
Alternatively you could just ship without a scrollbars.css file in your
chrome and you won't get them either.
