From d8d0538162defbb3e44be475c4781bb71f55c2ba Mon Sep 17 00:00:00 2001 From: win7-7 Date: Fri, 8 May 2020 01:13:51 +0300 Subject: Issue #1355 - SetNeedToCalcHasBCBorders to true when initialize nsTableFrame In the printing preview, we create continuous table frame if table is too long to containing in a page. But the default value of NeedToCalcHasBCBorders is false which means we don't calculate HasBCBorders for continuous table frame. Thus, the border collapse is not shown when printing preview. --- layout/tables/nsTableFrame.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'layout') diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 99838f217..57b249fb3 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -176,6 +176,9 @@ nsTableFrame::Init(nsIContent* aContent, const nsStyleTableBorder* tableStyle = StyleTableBorder(); bool borderCollapse = (NS_STYLE_BORDER_COLLAPSE == tableStyle->mBorderCollapse); SetBorderCollapse(borderCollapse); + if (borderCollapse) { + SetNeedToCalcHasBCBorders(true); + } if (!aPrevInFlow) { // If we're the first-in-flow, we manage the cell map & layout strategy that -- cgit v1.2.3