mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
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
This commit is contained in:
parent
7ae0c88c46
commit
85b85bac28
154 changed files with 259 additions and 430 deletions
|
|
@ -1297,7 +1297,6 @@ public:
|
|||
nsReflowStatus& aStatus) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
protected:
|
||||
|
|
@ -1338,11 +1337,10 @@ nsComboboxDisplayFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
void
|
||||
nsComboboxDisplayFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsDisplayListCollection set;
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, set);
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, set);
|
||||
|
||||
// remove background items if parent frame is themed
|
||||
if (mComboBox->IsThemed()) {
|
||||
|
|
@ -1543,13 +1541,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.
|
||||
|
|
@ -1558,7 +1551,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
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ public:
|
|||
nsEventStatus* aEventStatus) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
void PaintFocus(DrawTarget& aDrawTarget, nsPoint aPt);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ nsDisplayFieldSetBorderBackground::ComputeInvalidationRegion(nsDisplayListBuilde
|
|||
|
||||
void
|
||||
nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) {
|
||||
// Paint our background and border in a special way.
|
||||
// REVIEW: We don't really need to check frame emptiness here; if it's empty,
|
||||
|
|
@ -180,7 +179,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
if (GetPrevInFlow()) {
|
||||
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
|
||||
DisplayOverflowContainers(aBuilder, aLists);
|
||||
}
|
||||
|
||||
nsDisplayListCollection contentDisplayItems;
|
||||
|
|
@ -191,13 +190,13 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// legend. However, we want the inner frame's display items to be
|
||||
// after the legend's display items in z-order, so we need to save them
|
||||
// and append them later.
|
||||
BuildDisplayListForChild(aBuilder, inner, aDirtyRect, contentDisplayItems);
|
||||
BuildDisplayListForChild(aBuilder, inner, contentDisplayItems);
|
||||
}
|
||||
if (nsIFrame* legend = GetLegend()) {
|
||||
// The legend's background goes on our BlockBorderBackgrounds list because
|
||||
// it's a block child.
|
||||
nsDisplayListSet set(aLists, aLists.BlockBorderBackgrounds());
|
||||
BuildDisplayListForChild(aBuilder, legend, aDirtyRect, set);
|
||||
BuildDisplayListForChild(aBuilder, legend, set);
|
||||
}
|
||||
// Put the inner frame's display items on the master list. Note that this
|
||||
// moves its border/background display items to our BorderBackground() list,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ public:
|
|||
nscoord* aBaseline) const override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
|||
|
|
@ -485,10 +485,9 @@ nsFileControlFrame::SetFormProperty(nsIAtom* aName,
|
|||
|
||||
void
|
||||
nsFileControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForInline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public:
|
|||
nsIFrame* aPrevInFlow) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
NS_DECL_QUERYFRAME
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ public:
|
|||
|
||||
// nsIFrame replacements
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override {
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsFormControlFrame");
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
|
|
|||
|
|
@ -107,10 +107,9 @@ nsGfxCheckboxControlFrame::AccessibleType()
|
|||
//------------------------------------------------------------
|
||||
void
|
||||
nsGfxCheckboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
|
||||
|
||||
// Get current checked state through content model.
|
||||
if ((!IsChecked() && !IsIndeterminate()) || !IsVisibleForPainting(aBuilder))
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
|
|
|||
|
|
@ -70,10 +70,9 @@ PaintCheckedRadioButton(nsIFrame* aFrame,
|
|||
|
||||
void
|
||||
nsGfxRadioControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsFormControlFrame::BuildDisplayList(aBuilder, aLists);
|
||||
|
||||
if (!IsVisibleForPainting(aBuilder))
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ nsHTMLButtonControlFrame::ShouldClipPaintingToBorderBox()
|
|||
|
||||
void
|
||||
nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
// Clip to our border area for event hit testing.
|
||||
|
|
@ -132,7 +131,7 @@ nsHTMLButtonControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
||||
}
|
||||
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), aDirtyRect, set,
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), set,
|
||||
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
// That should put the display items in set.Content()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public:
|
|||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual nscoord GetMinISize(nsRenderingContext *aRenderingContext) override;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,6 @@ nsListControlFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||
|
||||
void
|
||||
nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
// We allow visibility:hidden <select>s to contain visible options.
|
||||
|
|
@ -180,7 +179,7 @@ nsListControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
mLastDropdownBackstopColor));
|
||||
}
|
||||
|
||||
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsHTMLScrollFrame::BuildDisplayList(aBuilder, aLists);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ public:
|
|||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual nsContainerFrame* GetContentInsertionFrame() override;
|
||||
|
|
|
|||
|
|
@ -98,10 +98,9 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
|||
|
||||
void
|
||||
nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForInline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ public:
|
|||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
|
|
|
|||
|
|
@ -255,7 +255,6 @@ nsDisplayRangeFocusRing::Paint(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
void
|
||||
nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
if (IsThemed()) {
|
||||
|
|
@ -270,10 +269,10 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsIFrame* thumb = mThumbDiv->GetPrimaryFrame();
|
||||
if (thumb) {
|
||||
nsDisplayListSet set(aLists, aLists.Content());
|
||||
BuildDisplayListForChild(aBuilder, thumb, aDirtyRect, set, DISPLAY_CHILD_INLINE);
|
||||
BuildDisplayListForChild(aBuilder, thumb, set, DISPLAY_CHILD_INLINE);
|
||||
}
|
||||
} else {
|
||||
BuildDisplayListForInline(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListForInline(aBuilder, aLists);
|
||||
}
|
||||
|
||||
// Draw a focus outline if appropriate:
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public:
|
|||
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
|
||||
|
||||
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
|
|
|
|||
|
|
@ -126,16 +126,15 @@ public:
|
|||
|
||||
void
|
||||
nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
if (!aBuilder->IsForEventDelivery()) {
|
||||
BuildDisplayListInternal(aBuilder, aDirtyRect, aLists);
|
||||
BuildDisplayListInternal(aBuilder, aLists);
|
||||
return;
|
||||
}
|
||||
|
||||
nsDisplayListCollection set;
|
||||
BuildDisplayListInternal(aBuilder, aDirtyRect, set);
|
||||
BuildDisplayListInternal(aBuilder, set);
|
||||
|
||||
nsOptionEventGrabberWrapper wrapper;
|
||||
wrapper.WrapLists(aBuilder, this, set, aLists);
|
||||
|
|
@ -143,10 +142,9 @@ nsSelectsAreaFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
void
|
||||
nsSelectsAreaFrame::BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||
nsBlockFrame::BuildDisplayList(aBuilder, aLists);
|
||||
|
||||
nsListControlFrame* listFrame = GetEnclosingListFrame(this);
|
||||
if (listFrame && listFrame->IsFocused()) {
|
||||
|
|
|
|||
|
|
@ -18,11 +18,9 @@ public:
|
|||
nsFrameState aFlags);
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
void BuildDisplayListInternal(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
|
||||
virtual void Reflow(nsPresContext* aCX,
|
||||
|
|
|
|||
|
|
@ -1419,7 +1419,6 @@ nsTextControlFrame::PeekOffset(nsPeekOffsetStruct *aPos)
|
|||
|
||||
void
|
||||
nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists)
|
||||
{
|
||||
/*
|
||||
|
|
@ -1447,7 +1446,7 @@ nsTextControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// placeholder has to be visible.
|
||||
if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
|
||||
txtCtrl->GetPlaceholderVisibility()) {
|
||||
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
|
||||
BuildDisplayListForChild(aBuilder, kid, set, 0);
|
||||
}
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ public:
|
|||
nsFrameList& aChildList) override;
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists) override;
|
||||
|
||||
virtual mozilla::dom::Element*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue