Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: third_party/WebKit/Source/core/paint/TableCellPainter.cpp

Issue 1379213002: Remove LayoutTable::m_currentBorder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/TableCellPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
index f467cf40040927cf0874c18c606c4240ef041f4d..08fad67ecd12f19dd5227d97107414b8841cb3d9 100644
--- a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
@@ -53,7 +53,6 @@ inline const CollapsedBorderValue& TableCellPainter::cachedCollapsedBottomBorder
void TableCellPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- ASSERT(paintInfo.phase != PaintPhaseCollapsedTableBorders);
BlockPainter(m_layoutTableCell).paint(paintInfo, paintOffset);
}
@@ -66,17 +65,11 @@ static EBorderStyle collapsedBorderStyle(EBorderStyle style)
return style;
}
-void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const CollapsedBorderValue& currentBorderValue)
{
- ASSERT(paintInfo.phase == PaintPhaseCollapsedTableBorders);
-
if (!paintInfo.shouldPaintWithinRoot(&m_layoutTableCell) || m_layoutTableCell.style()->visibility() != VISIBLE)
return;
- const CollapsedBorderValue* tableCurrentBorderValue = m_layoutTableCell.table()->currentBorderValue();
- if (!tableCurrentBorderValue)
- return;
-
const ComputedStyle& styleForCellFlow = m_layoutTableCell.styleForCellFlow();
const CollapsedBorderValue& leftBorderValue = cachedCollapsedLeftBorder(styleForCellFlow);
const CollapsedBorderValue& rightBorderValue = cachedCollapsedRightBorder(styleForCellFlow);
@@ -84,13 +77,13 @@ void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const L
const CollapsedBorderValue& bottomBorderValue = cachedCollapsedBottomBorder(styleForCellFlow);
int displayItemType = DisplayItem::TableCollapsedBorderBase;
- if (topBorderValue.shouldPaint(*tableCurrentBorderValue))
+ if (topBorderValue.shouldPaint(currentBorderValue))
displayItemType |= DisplayItem::TableCollapsedBorderTop;
- if (bottomBorderValue.shouldPaint(*tableCurrentBorderValue))
+ if (bottomBorderValue.shouldPaint(currentBorderValue))
displayItemType |= DisplayItem::TableCollapsedBorderBottom;
- if (leftBorderValue.shouldPaint(*tableCurrentBorderValue))
+ if (leftBorderValue.shouldPaint(currentBorderValue))
displayItemType |= DisplayItem::TableCollapsedBorderLeft;
- if (rightBorderValue.shouldPaint(*tableCurrentBorderValue))
+ if (rightBorderValue.shouldPaint(currentBorderValue))
displayItemType |= DisplayItem::TableCollapsedBorderRight;
if (displayItemType == DisplayItem::TableCollapsedBorderBase)
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableCellPainter.h ('k') | third_party/WebKit/Source/core/paint/TablePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698