Bug 1576714 - Don't update scrollbar visibility for non-top-level remote browsers. r=nika

This flag is only meant for window.open() stuff, so not relevant to iframes at
all.

This preserves the current fission behavior (which is quite broken) of always
showing scrollbars.

The way to control scrollbars for iframes (the scrolling attribute) is not
handled at all for Fission, I filed a bug and left a few FIXMEs.

Differential Revision: https://phabricator.services.mozilla.com/D49292
This commit is contained in:
Emilio Cobos Álvarez
2019-10-15 14:32:18 +00:00
parent 65ac3ccdd5
commit 605d03e32b
3 changed files with 11 additions and 5 deletions

View File

@@ -294,9 +294,9 @@ nsresult nsGenericHTMLFrameElement::AfterSetAttr(
if (aNameSpaceID == kNameSpaceID_None) {
if (aName == nsGkAtoms::scrolling) {
if (mFrameLoader) {
// FIXME(bug 1588791): This should work for fission iframes.
nsIDocShell* docshell = mFrameLoader->GetExistingDocShell();
nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(docshell);
if (scrollable) {
if (nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(docshell)) {
int32_t cur;
scrollable->GetDefaultScrollbarPreferences(
nsIScrollable::ScrollOrientation_X, &cur);