| Index: third_party/WebKit/Source/core/paint/TablePainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/TablePainter.cpp b/third_party/WebKit/Source/core/paint/TablePainter.cpp
|
| index 0e1ea132e9dc1facd49a7aaa19d08bcd1fdf3c12..8708ba5358ac3826ec684abbffd9a79d1a319efe 100644
|
| --- a/third_party/WebKit/Source/core/paint/TablePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/TablePainter.cpp
|
| @@ -13,6 +13,7 @@
|
| #include "core/paint/ObjectPainter.h"
|
| #include "core/paint/PaintInfo.h"
|
| #include "core/paint/ScopeRecorder.h"
|
| +#include "core/paint/TableCollapsedBorderPainter.h"
|
| #include "core/paint/TableSectionPainter.h"
|
|
|
| namespace blink {
|
| @@ -43,14 +44,24 @@ void TablePainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa
|
| }
|
|
|
| if (m_layoutTable.collapseBorders() && shouldPaintDescendantBlockBackgrounds(paintPhase) && m_layoutTable.style()->visibility() == VISIBLE) {
|
| + if (RuntimeEnabledFeatures::newTableCollapsedBordersEnabled()) {
|
| + // New collapsed border painter
|
| + TableCollapsedBorderPainter oldPainter(m_layoutTable.bottomSection());
|
| + for (LayoutTableSection* section = m_layoutTable.bottomSection(); section; section = m_layoutTable.sectionAbove(section, SkipEmptySections)) {
|
| + LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild(section, paintOffset);
|
| + TableSectionPainter(*section).paintCollapsedBorders2(paintInfoForDescendants, childPoint, oldPainter);
|
| + }
|
| +
|
| + } else {
|
| // Using our cached sorted styles, we then do individual passes,
|
| // painting each style of border from lowest precedence to highest precedence.
|
| - LayoutTable::CollapsedBorderValues collapsedBorders = m_layoutTable.collapsedBorders();
|
| - size_t count = collapsedBorders.size();
|
| - for (size_t i = 0; i < count; ++i) {
|
| - for (LayoutTableSection* section = m_layoutTable.bottomSection(); section; section = m_layoutTable.sectionAbove(section)) {
|
| - LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild(section, paintOffset);
|
| - TableSectionPainter(*section).paintCollapsedBorders(paintInfoForDescendants, childPoint, collapsedBorders[i]);
|
| + LayoutTable::CollapsedBorderValues collapsedBorders = m_layoutTable.collapsedBorders();
|
| + size_t count = collapsedBorders.size();
|
| + for (size_t i = 0; i < count; ++i) {
|
| + for (LayoutTableSection* section = m_layoutTable.bottomSection(); section; section = m_layoutTable.sectionAbove(section)) {
|
| + LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild(section, paintOffset);
|
| + TableSectionPainter(*section).paintCollapsedBorders(paintInfoForDescendants, childPoint, collapsedBorders[i]);
|
| + }
|
| }
|
| }
|
| }
|
|
|