Bug 1430869 - use mVisibleRect instead of GetRect. r=mstange

An ancient comment from 1998 assures us that GetRect is wrong if there are captions.
The painting code instead uses mVisibleRect which appears to be correct.

MozReview-Commit-ID: 6Lax4sjInJu

--HG--
extra : rebase_source : 79dd527173443fba8d0718c581852d7bfcc47a3c
This commit is contained in:
Alexis Beingessner 2018-04-23 15:08:04 -04:00
parent 9b2ccc4508
commit 79986e1bf8
2 changed files with 6 additions and 3 deletions

View File

@ -1295,6 +1295,7 @@ nsDisplayTableBorderCollapse::CreateWebRenderCommands(mozilla::wr::DisplayListBu
{
static_cast<nsTableFrame *>(mFrame)->CreateWebRenderCommandsForBCBorders(aBuilder,
aSc,
mVisibleRect,
ToReferenceFrame());
return true;
}
@ -8029,12 +8030,13 @@ nsTableFrame::PaintBCBorders(DrawTarget& aDrawTarget, const nsRect& aDirtyRect)
void
nsTableFrame::CreateWebRenderCommandsForBCBorders(wr::DisplayListBuilder& aBuilder,
const mozilla::layers::StackingContextHelper& aSc,
const nsRect& aVisibleRect,
const nsPoint& aOffsetToReferenceFrame)
{
BCPaintBorderAction action(aBuilder, aSc, aOffsetToReferenceFrame);
// We always draw whole table border for webrender. Passing the table rect as
// We always draw whole table border for webrender. Passing the visible rect
// dirty rect.
IterateBCBorders(action, GetRect());
IterateBCBorders(action, aVisibleRect - aOffsetToReferenceFrame);
LayoutDeviceRect allBorderRect;
wr::BorderSide wrSide[4];

View File

@ -301,7 +301,8 @@ public:
void PaintBCBorders(DrawTarget& aDrawTarget, const nsRect& aDirtyRect);
void CreateWebRenderCommandsForBCBorders(mozilla::wr::DisplayListBuilder& aBuilder,
const mozilla::layers::StackingContextHelper& aSc,
const nsPoint& aPt);
const nsRect& aVisibleRect,
const nsPoint& aOffsetToReferenceFrame);
virtual void MarkIntrinsicISizesDirty() override;
// For border-collapse tables, the caller must not add padding and