diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2020-05-08 00:52:23 +0300 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 13:49:09 +0000 |
commit | 36369e0fef4642068bbe842b6dfea3e3789d1582 (patch) | |
tree | e4744dfd6c84eb7b37dd33611d35696deb1ea05e /layout/base/nsDisplayList.cpp | |
parent | 3c1e71f0b105835cba634088682c922d6640d1c5 (diff) | |
download | UXP-36369e0fef4642068bbe842b6dfea3e3789d1582.tar UXP-36369e0fef4642068bbe842b6dfea3e3789d1582.tar.gz UXP-36369e0fef4642068bbe842b6dfea3e3789d1582.tar.lz UXP-36369e0fef4642068bbe842b6dfea3e3789d1582.tar.xz UXP-36369e0fef4642068bbe842b6dfea3e3789d1582.zip |
Issue #1355 - Avoid unnecessary work in nsIFrame::BuildDisplayListForStackingContext() and nsIFrame::BuildDisplayListForChild() and Cleanup DescendIntoChild
Bug 1441796 - Part 1: Optimize the (pseudo)-stacking context conditions
Bug 1441796 - Part 3: Reuse the results in nsIFrame::BuildDisplayListForStackingContext() for ChildrenHavePerspective(), IsTransformed(), and Combines3DTransformWithAncestors()
Bug 1512244 - Part 1: Cleanup DescendIntoChild
Diffstat (limited to 'layout/base/nsDisplayList.cpp')
-rw-r--r-- | layout/base/nsDisplayList.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index b08fe4219..a869564a4 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1009,8 +1009,22 @@ nsDisplayListBuilder::EnterPresShell(nsIFrame* aReferenceFrame, } state->mInsidePointerEventsNoneDoc = pointerEventsNone; - if (!buildCaret) + state->mPresShellIgnoreScrollFrame = + state->mPresShell->IgnoringViewportScrolling() + ? state->mPresShell->GetRootScrollFrame() + : nullptr; + + nsPresContext* pc = aReferenceFrame->PresContext(); + nsCOMPtr<nsIDocShell> docShell = pc->GetDocShell(); + if (docShell) { + docShell->GetWindowDraggingAllowed(&mWindowDraggingAllowed); + } + + mIsInChromePresContext = pc->IsChrome(); + + if (!buildCaret) { return; + } RefPtr<nsCaret> caret = state->mPresShell->GetCaret(); state->mCaretFrame = caret->GetPaintGeometry(&state->mCaretRect); @@ -1018,13 +1032,6 @@ nsDisplayListBuilder::EnterPresShell(nsIFrame* aReferenceFrame, mFramesMarkedForDisplay.AppendElement(state->mCaretFrame); MarkFrameForDisplay(state->mCaretFrame, nullptr); } - - nsPresContext* pc = aReferenceFrame->PresContext(); - nsCOMPtr<nsIDocShell> docShell = pc->GetDocShell(); - if (docShell) { - docShell->GetWindowDraggingAllowed(&mWindowDraggingAllowed); - } - mIsInChromePresContext = pc->IsChrome(); } // A non-blank paint is a paint that does not just contain the canvas background. |