mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1370833 Part 1 - make less table invalidations for non-border-collapse tables. r=mattwoodrow
For the most part, I tried to make less *manual* table invalidations for non-border-collapse tables and relied the table invalidations on the comparison of the display items. By doing so, we can avoid the over-painting issue. MozReview-Commit-ID: 4w1DUKHXIFO --HG-- extra : rebase_source : ac5e6de35a2b20318c70f8eed4375a5673ef6c31
This commit is contained in:
parent
b59d3c86ec
commit
f9aeb057f1
@ -960,9 +960,10 @@ nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
FinishReflowChild(firstKid, aPresContext, kidSize, &kidReflowInput,
|
||||
wm, kidOrigin, containerSize, 0);
|
||||
|
||||
nsTableFrame::InvalidateTableFrame(firstKid, origRect, origVisualOverflow,
|
||||
firstReflow);
|
||||
|
||||
if (tableFrame->IsBorderCollapse()) {
|
||||
nsTableFrame::InvalidateTableFrame(firstKid, origRect, origVisualOverflow,
|
||||
firstReflow);
|
||||
}
|
||||
// first, compute the bsize which can be set w/o being restricted by
|
||||
// available bsize
|
||||
LogicalSize cellSize(wm);
|
||||
|
@ -394,9 +394,13 @@ nsTableRowFrame::DidResize()
|
||||
|
||||
cellSize.BSize(wm) = cellBSize;
|
||||
cellFrame->SetSize(wm, cellSize);
|
||||
nsTableFrame::InvalidateTableFrame(cellFrame, cellOldRect,
|
||||
cellVisualOverflow,
|
||||
false);
|
||||
|
||||
nsTableFrame* tableFrame = GetTableFrame();
|
||||
if (tableFrame->IsBorderCollapse()) {
|
||||
nsTableFrame::InvalidateTableFrame(cellFrame, cellOldRect,
|
||||
cellVisualOverflow,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
// realign cell content based on the new bsize. We might be able to
|
||||
@ -957,8 +961,11 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
FinishReflowChild(kidFrame, aPresContext, desiredSize, nullptr,
|
||||
wm, kidPosition, containerSize, 0);
|
||||
|
||||
nsTableFrame::InvalidateTableFrame(kidFrame, kidRect, kidVisualOverflow,
|
||||
firstReflow);
|
||||
nsTableFrame* tableFrame = GetTableFrame();
|
||||
if (tableFrame->IsBorderCollapse()) {
|
||||
nsTableFrame::InvalidateTableFrame(kidFrame, kidRect, kidVisualOverflow,
|
||||
firstReflow);
|
||||
}
|
||||
|
||||
iCoord += desiredSize.ISize(wm);
|
||||
} else {
|
||||
|
@ -293,8 +293,11 @@ nsTableRowGroupFrame::PlaceChild(nsPresContext* aPresContext,
|
||||
FinishReflowChild(aKidFrame, aPresContext, aDesiredSize, nullptr,
|
||||
aWM, aKidPosition, aContainerSize, 0);
|
||||
|
||||
nsTableFrame::InvalidateTableFrame(aKidFrame, aOriginalKidRect,
|
||||
aOriginalKidVisualOverflow, isFirstReflow);
|
||||
nsTableFrame* tableFrame = GetTableFrame();
|
||||
if (tableFrame->IsBorderCollapse()) {
|
||||
nsTableFrame::InvalidateTableFrame(aKidFrame, aOriginalKidRect,
|
||||
aOriginalKidVisualOverflow, isFirstReflow);
|
||||
}
|
||||
|
||||
// Adjust the running block-offset
|
||||
aReflowInput.bCoord += aDesiredSize.BSize(aWM);
|
||||
|
@ -1036,9 +1036,12 @@ nsTableWrapperFrame::Reflow(nsPresContext* aPresContext,
|
||||
wm, innerOrigin, containerSize, 0);
|
||||
innerRI.reset();
|
||||
|
||||
nsTableFrame::InvalidateTableFrame(InnerTableFrame(), origInnerRect,
|
||||
origInnerVisualOverflow,
|
||||
innerFirstReflow);
|
||||
if (InnerTableFrame()->IsBorderCollapse()) {
|
||||
nsTableFrame::InvalidateTableFrame(InnerTableFrame(), origInnerRect,
|
||||
origInnerVisualOverflow,
|
||||
innerFirstReflow);
|
||||
}
|
||||
|
||||
if (mCaptionFrames.NotEmpty()) {
|
||||
nsTableFrame::InvalidateTableFrame(mCaptionFrames.FirstChild(),
|
||||
origCaptionRect,
|
||||
|
Loading…
Reference in New Issue
Block a user