From 563dc95cdbdd94496360f14fc277c4b8fc79bbab Mon Sep 17 00:00:00 2001 From: athenian200 Date: Thu, 16 Jan 2020 14:07:04 -0600 Subject: Issue #1356 - Remove -moz-user-input disabled to improve event handling. --- layout/forms/nsComboboxControlFrame.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'layout/forms/nsComboboxControlFrame.cpp') diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 5a9438939..78185616f 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1165,9 +1165,7 @@ nsComboboxControlFrame::HandleEvent(nsPresContext* aPresContext, // If we have style that affects how we are selected, feed event down to // nsFrame::HandleEvent so that selection takes place when appropriate. - const nsStyleUserInterface* uiStyle = StyleUserInterface(); - if (uiStyle->mUserInput == StyleUserInput::None || - uiStyle->mUserInput == StyleUserInput::Disabled) { + if (IsContentDisabled()) { return nsBlockFrame::HandleEvent(aPresContext, aEvent, aEventStatus); } return NS_OK; -- cgit v1.2.3 From cbb61ab832508e9c231a256fb161d38d35faeabf Mon Sep 17 00:00:00 2001 From: win7-7 Date: Tue, 25 Feb 2020 00:17:54 +0200 Subject: 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. --- layout/forms/nsComboboxControlFrame.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'layout/forms/nsComboboxControlFrame.cpp') diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 78185616f..eb8de8e94 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1294,7 +1294,6 @@ public: nsReflowStatus& aStatus) override; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; protected: @@ -1335,11 +1334,10 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext, void nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { - nsDisplayListCollection set; - nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set); + nsDisplayListCollection set (aBuilder); + nsBlockFrame::BuildDisplayList(aBuilder, set); // remove background items if parent frame is themed if (mComboBox->IsThemed()) { @@ -1547,13 +1545,8 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder, void nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { -#ifdef NOISY - printf("%p paint at (%d, %d, %d, %d)\n", this, - aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height); -#endif if (aBuilder->IsForEventDelivery()) { // Don't allow children to receive events. @@ -1562,7 +1555,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } else { // REVIEW: Our in-flow child frames are inline-level so they will paint in our // content list, so we don't need to mess with layers. - nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists); + nsBlockFrame::BuildDisplayList(aBuilder, aLists); } // draw a focus indicator only when focus rings should be drawn -- cgit v1.2.3 From dba09fa5c43276bb455cc4da6bd0ec302f798189 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 26 Feb 2020 20:51:22 +0100 Subject: Revert "Issue #1355 - Better way to create display items for column backgrounds" This reverts commit 44c47c50388f526c2d134e16d5debebe94a0faf8. --- layout/forms/nsComboboxControlFrame.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'layout/forms/nsComboboxControlFrame.cpp') diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index eb8de8e94..78185616f 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1294,6 +1294,7 @@ public: nsReflowStatus& aStatus) override; virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsRect& aDirtyRect, const nsDisplayListSet& aLists) override; protected: @@ -1334,10 +1335,11 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext, void nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { - nsDisplayListCollection set (aBuilder); - nsBlockFrame::BuildDisplayList(aBuilder, set); + nsDisplayListCollection set; + nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set); // remove background items if parent frame is themed if (mComboBox->IsThemed()) { @@ -1545,8 +1547,13 @@ void nsDisplayComboboxFocus::Paint(nsDisplayListBuilder* aBuilder, void nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsRect& aDirtyRect, const nsDisplayListSet& aLists) { +#ifdef NOISY + printf("%p paint at (%d, %d, %d, %d)\n", this, + aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height); +#endif if (aBuilder->IsForEventDelivery()) { // Don't allow children to receive events. @@ -1555,7 +1562,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } else { // REVIEW: Our in-flow child frames are inline-level so they will paint in our // content list, so we don't need to mess with layers. - nsBlockFrame::BuildDisplayList(aBuilder, aLists); + nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists); } // draw a focus indicator only when focus rings should be drawn -- cgit v1.2.3