Bug 1719285 - Make nsFrameLoader::GetExistingDocShell returning nsDocShell; r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D119183
This commit is contained in:
Edgar Chen
2021-07-06 13:30:08 +00:00
parent 99841406bd
commit 8921e08fd3
3 changed files with 6 additions and 8 deletions

View File

@@ -244,8 +244,8 @@ nsresult nsGenericHTMLFrameElement::AfterSetAttr(
if (aName == nsGkAtoms::scrolling) {
if (mFrameLoader) {
ScrollbarPreference pref = MapScrollingAttribute(aValue);
if (nsIDocShell* docshell = mFrameLoader->GetExistingDocShell()) {
nsDocShell::Cast(docshell)->SetScrollbarPreference(pref);
if (nsDocShell* docshell = mFrameLoader->GetExistingDocShell()) {
docshell->SetScrollbarPreference(pref);
} else if (auto* child = mFrameLoader->GetBrowserBridgeChild()) {
// NOTE(emilio): We intentionally don't deal with the
// GetBrowserParent() case, and only deal with the fission iframe