summaryrefslogtreecommitdiff
path: root/layout/xul/tree
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2020-02-25 00:17:54 +0200
committerwin7-7 <win7-7@users.noreply.github.com>2020-02-25 00:17:54 +0200
commit44c47c50388f526c2d134e16d5debebe94a0faf8 (patch)
tree5c46b943a3463f67e379eebdbcc8e364eeca9a7c /layout/xul/tree
parent81089ff09437ca99eba3dacf901fdef0de533024 (diff)
downloaduxp-44c47c50388f526c2d134e16d5debebe94a0faf8.tar.gz
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/xul/tree')
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.cpp3
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.h1
-rw-r--r--layout/xul/tree/nsTreeColFrame.cpp7
-rw-r--r--layout/xul/tree/nsTreeColFrame.h1
4 files changed, 4 insertions, 8 deletions
diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp
index deba04a36c..608d802ea1 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2824,7 +2824,6 @@ public:
// Painting routines
void
nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// REVIEW: why did we paint if we were collapsed? that makes no sense!
@@ -2832,7 +2831,7 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return; // We're invisible. Don't paint.
// Handles painting our background, border, and outline.
- nsLeafBoxFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
+ nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists);
// Bail out now if there's no view or we can't run script because the
// document is a zombie
diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h
index 9620c8ccb3..6838b01576 100644
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -177,7 +177,6 @@ public:
nsEventStatus* aEventStatus) override;
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) override;
diff --git a/layout/xul/tree/nsTreeColFrame.cpp b/layout/xul/tree/nsTreeColFrame.cpp
index 649c0b0b4c..0bedec086b 100644
--- a/layout/xul/tree/nsTreeColFrame.cpp
+++ b/layout/xul/tree/nsTreeColFrame.cpp
@@ -110,16 +110,15 @@ nsDisplayXULTreeColSplitterTarget::HitTest(nsDisplayListBuilder* aBuilder, const
void
nsTreeColFrame::BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (!aBuilder->IsForEventDelivery()) {
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, aLists);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, aLists);
return;
}
- nsDisplayListCollection set;
- nsBoxFrame::BuildDisplayListForChildren(aBuilder, aDirtyRect, set);
+ nsDisplayListCollection set (aBuilder);
+ nsBoxFrame::BuildDisplayListForChildren(aBuilder, set);
WrapListsInRedirector(aBuilder, set, aLists);
diff --git a/layout/xul/tree/nsTreeColFrame.h b/layout/xul/tree/nsTreeColFrame.h
index 8fc3219d50..ebd16fa526 100644
--- a/layout/xul/tree/nsTreeColFrame.h
+++ b/layout/xul/tree/nsTreeColFrame.h
@@ -26,7 +26,6 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual void BuildDisplayListForChildren(nsDisplayListBuilder* aBuilder,
- const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) override;
virtual nsresult AttributeChanged(int32_t aNameSpaceID,