Bug 1370575 - Do less manual invalidation when tables changes, and rely on DLBI instead. r=mstange

This commit is contained in:
Matt Woodrow
2018-04-04 16:17:49 +12:00
parent e037d14d46
commit 4e885ca8c2
3 changed files with 3 additions and 17 deletions

View File

@@ -7141,6 +7141,9 @@ nsIFrame::InvalidateFrame(uint32_t aDisplayItemKey, bool aRebuildDisplayItems /*
void void
nsIFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems /* = true */) nsIFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey, bool aRebuildDisplayItems /* = true */)
{ {
if (aRect.IsEmpty()) {
return;
}
bool hasDisplayItem = bool hasDisplayItem =
!aDisplayItemKey || FrameLayerBuilder::HasRetainedDataFor(this, aDisplayItemKey); !aDisplayItemKey || FrameLayerBuilder::HasRetainedDataFor(this, aDisplayItemKey);
bool alreadyInvalid = false; bool alreadyInvalid = false;

View File

@@ -2218,11 +2218,6 @@ nsTableFrame::Reflow(nsPresContext* aPresContext,
} }
aDesiredSize.mOverflowAreas.UnionAllWith(tableRect); aDesiredSize.mOverflowAreas.UnionAllWith(tableRect);
if (HasAnyStateBits(NS_FRAME_FIRST_REFLOW) ||
nsSize(aDesiredSize.Width(), aDesiredSize.Height()) != mRect.Size()) {
nsIFrame::InvalidateFrame();
}
FinishAndStoreOverflow(&aDesiredSize); FinishAndStoreOverflow(&aDesiredSize);
NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize); NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize);
} }
@@ -8153,8 +8148,6 @@ nsTableFrame::InvalidateTableFrame(nsIFrame* aFrame,
aOrigVisualOverflow.Size() != visualOverflow.Size()){ aOrigVisualOverflow.Size() != visualOverflow.Size()){
aFrame->InvalidateFrameWithRect(aOrigVisualOverflow); aFrame->InvalidateFrameWithRect(aOrigVisualOverflow);
aFrame->InvalidateFrame(); aFrame->InvalidateFrame();
parent->InvalidateFrameWithRect(aOrigRect);
parent->InvalidateFrame();
} }
} }

View File

@@ -874,10 +874,6 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
Maybe<ReflowInput> captionRI; Maybe<ReflowInput> captionRI;
Maybe<ReflowInput> innerRI; Maybe<ReflowInput> innerRI;
nsRect origInnerRect = InnerTableFrame()->GetRect();
nsRect origInnerVisualOverflow = InnerTableFrame()->GetVisualOverflowRect();
bool innerFirstReflow =
InnerTableFrame()->HasAnyStateBits(NS_FRAME_FIRST_REFLOW);
nsRect origCaptionRect; nsRect origCaptionRect;
nsRect origCaptionVisualOverflow; nsRect origCaptionVisualOverflow;
bool captionFirstReflow = false; bool captionFirstReflow = false;
@@ -1041,12 +1037,6 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
wm, innerOrigin, containerSize, 0); wm, innerOrigin, containerSize, 0);
innerRI.reset(); innerRI.reset();
if (InnerTableFrame()->IsBorderCollapse()) {
nsTableFrame::InvalidateTableFrame(InnerTableFrame(), origInnerRect,
origInnerVisualOverflow,
innerFirstReflow);
}
if (mCaptionFrames.NotEmpty()) { if (mCaptionFrames.NotEmpty()) {
nsTableFrame::InvalidateTableFrame(mCaptionFrames.FirstChild(), nsTableFrame::InvalidateTableFrame(mCaptionFrames.FirstChild(),
origCaptionRect, origCaptionRect,