Bug 1948522 - Use the display root frame as the root frame for popup in RestrictToRootDisplayPort. r=botond
This change is similar to the previous change, but for displayport. Differential Revision: https://phabricator.services.mozilla.com/D238555
This commit is contained in:
@@ -4293,7 +4293,10 @@ nsRect ScrollContainerFrame::RestrictToRootDisplayPort(
|
||||
return aDisplayportBase;
|
||||
}
|
||||
const mozilla::PresShell* const rootPresShell = rootPresContext->PresShell();
|
||||
nsIFrame* rootFrame = rootPresShell->GetRootScrollContainerFrame();
|
||||
nsIFrame* displayRootFrame = nsLayoutUtils::GetDisplayRootFrame(this);
|
||||
nsIFrame* rootFrame = displayRootFrame->IsMenuPopupFrame()
|
||||
? displayRootFrame
|
||||
: rootPresShell->GetRootScrollContainerFrame();
|
||||
if (!rootFrame) {
|
||||
rootFrame = rootPresShell->GetRootFrame();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user