diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2020-02-25 00:17:54 +0200 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2020-02-25 00:17:54 +0200 |
commit | 44c47c50388f526c2d134e16d5debebe94a0faf8 (patch) | |
tree | 5c46b943a3463f67e379eebdbcc8e364eeca9a7c /layout/svg | |
parent | 81089ff09437ca99eba3dacf901fdef0de533024 (diff) | |
download | UXP-44c47c50388f526c2d134e16d5debebe94a0faf8.tar UXP-44c47c50388f526c2d134e16d5debebe94a0faf8.tar.gz UXP-44c47c50388f526c2d134e16d5debebe94a0faf8.tar.lz UXP-44c47c50388f526c2d134e16d5debebe94a0faf8.tar.xz UXP-44c47c50388f526c2d134e16d5debebe94a0faf8.zip |
Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.
Part 2: Get rid of generic table painting code, and handle each class separately.
Part 4: Hoist outline skipping into col(group) frame code.
Part 5: Skip box-shadow for table column and column groups.
Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.
Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.
Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.
Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.
Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.
Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
Diffstat (limited to 'layout/svg')
-rw-r--r-- | layout/svg/SVGFEUnstyledLeafFrame.cpp | 1 | ||||
-rw-r--r-- | layout/svg/SVGTextFrame.cpp | 1 | ||||
-rw-r--r-- | layout/svg/SVGTextFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGClipPathFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGContainerFrame.cpp | 3 | ||||
-rw-r--r-- | layout/svg/nsSVGContainerFrame.h | 2 | ||||
-rw-r--r-- | layout/svg/nsSVGFilterFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGForeignObjectFrame.cpp | 3 | ||||
-rw-r--r-- | layout/svg/nsSVGForeignObjectFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGMarkerFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGMaskFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGOuterSVGFrame.cpp | 3 | ||||
-rw-r--r-- | layout/svg/nsSVGOuterSVGFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGPaintServerFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGPathGeometryFrame.cpp | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGPathGeometryFrame.h | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGStopFrame.cpp | 1 | ||||
-rw-r--r-- | layout/svg/nsSVGSwitchFrame.cpp | 4 |
18 files changed, 4 insertions, 24 deletions
diff --git a/layout/svg/SVGFEUnstyledLeafFrame.cpp b/layout/svg/SVGFEUnstyledLeafFrame.cpp index 083c0f27d..bc9258527 100644 --- a/layout/svg/SVGFEUnstyledLeafFrame.cpp +++ b/layout/svg/SVGFEUnstyledLeafFrame.cpp @@ -25,7 +25,6 @@ public: NS_DECL_FRAMEARENA_HELPERS virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual bool IsFrameOfType(uint32_t aFlags) const override diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 6ba267ee8..bfe7333ee 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -3161,7 +3161,6 @@ SVGTextFrame::Init(nsIContent* aContent, void SVGTextFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { if (NS_SUBTREE_DIRTY(this)) { diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h index 9c672c6a5..508ed1724 100644 --- a/layout/svg/SVGTextFrame.h +++ b/layout/svg/SVGTextFrame.h @@ -224,7 +224,6 @@ public: } virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; /** diff --git a/layout/svg/nsSVGClipPathFrame.h b/layout/svg/nsSVGClipPathFrame.h index 42a8d16ff..046ebb169 100644 --- a/layout/svg/nsSVGClipPathFrame.h +++ b/layout/svg/nsSVGClipPathFrame.h @@ -37,7 +37,6 @@ public: // nsIFrame methods: virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} // nsSVGClipPathFrame methods: diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index 750dcc9da..acb726f7a 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -140,7 +140,6 @@ nsSVGDisplayContainerFrame::Init(nsIContent* aContent, void nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { // mContent could be a XUL element so check for an SVG element before casting @@ -149,7 +148,7 @@ nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, return; } DisplayOutline(aBuilder, aLists); - return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists); + return BuildDisplayListForNonBlockChildren(aBuilder, aLists); } void diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h index f4a01e155..8a6cdd7ce 100644 --- a/layout/svg/nsSVGContainerFrame.h +++ b/layout/svg/nsSVGContainerFrame.h @@ -83,7 +83,6 @@ public: } virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override; @@ -133,7 +132,6 @@ public: nsIFrame* aPrevInFlow) override; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; virtual bool IsSVGTransformed(Matrix *aOwnTransform = nullptr, diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h index 223c787f6..f2f321522 100644 --- a/layout/svg/nsSVGFilterFrame.h +++ b/layout/svg/nsSVGFilterFrame.h @@ -45,7 +45,6 @@ public: // nsIFrame methods: virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual nsresult AttributeChanged(int32_t aNameSpaceID, diff --git a/layout/svg/nsSVGForeignObjectFrame.cpp b/layout/svg/nsSVGForeignObjectFrame.cpp index afa5912d2..f8584a4f1 100644 --- a/layout/svg/nsSVGForeignObjectFrame.cpp +++ b/layout/svg/nsSVGForeignObjectFrame.cpp @@ -163,14 +163,13 @@ nsSVGForeignObjectFrame::Reflow(nsPresContext* aPresContext, void nsSVGForeignObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) { return; } DisplayOutline(aBuilder, aLists); - BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists); + BuildDisplayListForNonBlockChildren(aBuilder, aLists); } bool diff --git a/layout/svg/nsSVGForeignObjectFrame.h b/layout/svg/nsSVGForeignObjectFrame.h index 57df6d5b5..4bb94bdab 100644 --- a/layout/svg/nsSVGForeignObjectFrame.h +++ b/layout/svg/nsSVGForeignObjectFrame.h @@ -47,7 +47,6 @@ public: nsReflowStatus& aStatus) override; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; /** diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h index 22ac01709..187aed140 100644 --- a/layout/svg/nsSVGMarkerFrame.h +++ b/layout/svg/nsSVGMarkerFrame.h @@ -52,7 +52,6 @@ public: #endif virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual nsresult AttributeChanged(int32_t aNameSpaceID, diff --git a/layout/svg/nsSVGMaskFrame.h b/layout/svg/nsSVGMaskFrame.h index 380306a48..2a9486fa5 100644 --- a/layout/svg/nsSVGMaskFrame.h +++ b/layout/svg/nsSVGMaskFrame.h @@ -73,7 +73,6 @@ public: #endif virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} /** diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index b1ee54eb9..7efdec5e5 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -731,7 +731,6 @@ nsSVGOuterSVGFrame::AttributeChanged(int32_t aNameSpaceID, void nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { if (GetStateBits() & NS_FRAME_IS_NONDISPLAY) { @@ -755,7 +754,7 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, nsDisplayList *contentList = aLists.Content(); nsDisplayListSet set(contentList, contentList, contentList, contentList, contentList, contentList); - BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, set); + BuildDisplayListForNonBlockChildren(aBuilder, set); } else if (IsVisibleForPainting(aBuilder) || !aBuilder->IsForPainting()) { aLists.Content()->AppendNewToTop( new (aBuilder) nsDisplayOuterSVG(aBuilder, this)); diff --git a/layout/svg/nsSVGOuterSVGFrame.h b/layout/svg/nsSVGOuterSVGFrame.h index 6d29234ac..ee59b7d1c 100644 --- a/layout/svg/nsSVGOuterSVGFrame.h +++ b/layout/svg/nsSVGOuterSVGFrame.h @@ -66,7 +66,6 @@ public: virtual void UnionChildOverflow(nsOverflowAreas& aOverflowAreas) override; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; virtual void Init(nsIContent* aContent, diff --git a/layout/svg/nsSVGPaintServerFrame.h b/layout/svg/nsSVGPaintServerFrame.h index 6b568f872..ff2c6f8b4 100644 --- a/layout/svg/nsSVGPaintServerFrame.h +++ b/layout/svg/nsSVGPaintServerFrame.h @@ -58,7 +58,6 @@ public: // nsIFrame methods: virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual bool IsFrameOfType(uint32_t aFlags) const override diff --git a/layout/svg/nsSVGPathGeometryFrame.cpp b/layout/svg/nsSVGPathGeometryFrame.cpp index 32cd0e496..50eec2b92 100644 --- a/layout/svg/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/nsSVGPathGeometryFrame.cpp @@ -259,7 +259,6 @@ nsSVGPathGeometryFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform, void nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions() || diff --git a/layout/svg/nsSVGPathGeometryFrame.h b/layout/svg/nsSVGPathGeometryFrame.h index 6b7c75d97..d2d63f043 100644 --- a/layout/svg/nsSVGPathGeometryFrame.h +++ b/layout/svg/nsSVGPathGeometryFrame.h @@ -88,7 +88,6 @@ public: #endif virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; // nsSVGPathGeometryFrame methods diff --git a/layout/svg/nsSVGStopFrame.cpp b/layout/svg/nsSVGStopFrame.cpp index 1b75fa102..28875ad25 100644 --- a/layout/svg/nsSVGStopFrame.cpp +++ b/layout/svg/nsSVGStopFrame.cpp @@ -36,7 +36,6 @@ public: #endif void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override {} virtual nsresult AttributeChanged(int32_t aNameSpaceID, diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 26e77071b..1eef37eb0 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -44,7 +44,6 @@ public: #endif virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; // nsISVGChildFrame interface: @@ -93,12 +92,11 @@ nsSVGSwitchFrame::GetType() const void nsSVGSwitchFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { nsIFrame* kid = GetActiveChildFrame(); if (kid) { - BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists); + BuildDisplayListForChild(aBuilder, kid, aLists); } } |