diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2020-05-08 15:20:01 +0300 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 13:48:52 +0000 |
commit | 71137783ac6927bd0dc02fce1d6e61e6ec027753 (patch) | |
tree | dd21b7bca3f68759de3f0bc96ef465ce0a13c83f /layout/base/nsDisplayList.h | |
parent | fe0963002fb16b7e3e53f75004af0e79348c861c (diff) | |
download | UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.gz UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.lz UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.tar.xz UXP-71137783ac6927bd0dc02fce1d6e61e6ec027753.zip |
Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList
Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp
Diffstat (limited to 'layout/base/nsDisplayList.h')
-rw-r--r-- | layout/base/nsDisplayList.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 9cee7b517..e4fb57e8a 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -444,6 +444,10 @@ public: * BuildDisplayList on right now). */ const nsRect& GetDirtyRect() { return mDirtyRect; } + + void SetDirtyRect(const nsRect& aDirtyRect) { mDirtyRect = aDirtyRect; } + void IntersectDirtyRect(const nsRect& aDirtyRect) { mDirtyRect.IntersectRect(mDirtyRect, aDirtyRect); } + const nsIFrame* GetCurrentFrame() { return mCurrentFrame; } const nsIFrame* GetCurrentReferenceFrame() { return mCurrentReferenceFrame; } const nsPoint& GetCurrentFrameOffsetToReferenceFrame() { return mCurrentOffsetToReferenceFrame; } @@ -493,11 +497,10 @@ public: /** * Display the caret if needed. */ - void DisplayCaret(nsIFrame* aFrame, const nsRect& aDirtyRect, - nsDisplayList* aList) { + void DisplayCaret(nsIFrame* aFrame, nsDisplayList* aList) { nsIFrame* frame = GetCaretFrame(); if (aFrame == frame) { - frame->DisplayCaret(this, aDirtyRect, aList); + frame->DisplayCaret(this, aList); } } /** @@ -602,8 +605,7 @@ public: * destroyed. */ void MarkFramesForDisplayList(nsIFrame* aDirtyFrame, - const nsFrameList& aFrames, - const nsRect& aDirtyRect); + const nsFrameList& aFrames); /** * Mark all child frames that Preserve3D() as needing display. * Because these frames include transforms set on their parent, dirty rects @@ -700,8 +702,8 @@ public: friend class AutoBuildingDisplayList; class AutoBuildingDisplayList { public: - AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder, - nsIFrame* aForChild, + + AutoBuildingDisplayList(nsDisplayListBuilder* aBuilder, nsIFrame* aForChild, const nsRect& aDirtyRect, bool aIsRoot) : mBuilder(aBuilder), mPrevFrame(aBuilder->mCurrentFrame), @@ -1120,11 +1122,11 @@ public: Preserves3DContext mSavedCtx; }; - const nsRect GetPreserves3DDirtyRect(const nsIFrame *aFrame) const { + const nsRect GetPreserves3DRects() const { return mPreserves3DCtx.mDirtyRect; } - void SetPreserves3DDirtyRect(const nsRect &aDirtyRect) { - mPreserves3DCtx.mDirtyRect = aDirtyRect; + void SavePreserves3DRects() { + mPreserves3DCtx.mDirtyRect = mDirtyRect; } bool IsBuildingInvisibleItems() const { return mBuildingInvisibleItems; } @@ -1133,8 +1135,7 @@ public: } private: - void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame, - const nsRect& aDirtyRect); + void MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame, nsIFrame* aFrame); /** * Returns whether a frame acts as an animated geometry root, optionally |