Loading layout/base/PresShell.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -2480,17 +2480,26 @@ PresShell::CompleteMove(bool aForward, bool aExtend) { // end implementations nsISelectionController nsIFrame* PresShell::GetRootScrollFrame() const { if (!mFrameConstructor) { return nullptr; } nsIFrame* rootFrame = mFrameConstructor->GetRootFrame(); // Ensure root frame is a viewport frame if (!rootFrame || !rootFrame->IsViewportFrame()) return nullptr; if (!rootFrame || !rootFrame->IsViewportFrame()) { return nullptr; } nsIFrame* theFrame = rootFrame->PrincipalChildList().FirstChild(); if (!theFrame || !theFrame->IsScrollFrame()) return nullptr; if (!theFrame || !theFrame->IsScrollFrame()) { return nullptr; } return theFrame; } nsIScrollableFrame* PresShell::GetRootScrollFrameAsScrollable() const { nsIFrame* frame = GetRootScrollFrame(); if (!frame) return nullptr; if (!frame) { return nullptr; } nsIScrollableFrame* scrollableFrame = do_QueryFrame(frame); NS_ASSERTION(scrollableFrame, "All scroll frames must implement nsIScrollableFrame"); Loading Loading
layout/base/PresShell.cpp +12 −3 Original line number Diff line number Diff line Loading @@ -2480,17 +2480,26 @@ PresShell::CompleteMove(bool aForward, bool aExtend) { // end implementations nsISelectionController nsIFrame* PresShell::GetRootScrollFrame() const { if (!mFrameConstructor) { return nullptr; } nsIFrame* rootFrame = mFrameConstructor->GetRootFrame(); // Ensure root frame is a viewport frame if (!rootFrame || !rootFrame->IsViewportFrame()) return nullptr; if (!rootFrame || !rootFrame->IsViewportFrame()) { return nullptr; } nsIFrame* theFrame = rootFrame->PrincipalChildList().FirstChild(); if (!theFrame || !theFrame->IsScrollFrame()) return nullptr; if (!theFrame || !theFrame->IsScrollFrame()) { return nullptr; } return theFrame; } nsIScrollableFrame* PresShell::GetRootScrollFrameAsScrollable() const { nsIFrame* frame = GetRootScrollFrame(); if (!frame) return nullptr; if (!frame) { return nullptr; } nsIScrollableFrame* scrollableFrame = do_QueryFrame(frame); NS_ASSERTION(scrollableFrame, "All scroll frames must implement nsIScrollableFrame"); Loading