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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 1549693002: Optimize collapsed border painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/layout/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index 40ca5ea321701a5af3aaa059d5d63132947aff6d..c08c5b8bc0f19c400501f557ca1780f4e18afc91 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1614,43 +1614,6 @@ bool LayoutTableSection::nodeAtPoint(HitTestResult& result, const HitTestLocatio
return false;
}
-void LayoutTableSection::removeCachedCollapsedBorders(const LayoutTableCell* cell)
-{
- if (!table()->collapseBorders())
- return;
-
- for (int side = CBSBefore; side <= CBSEnd; ++side)
- m_cellsCollapsedBorders.remove(std::make_pair(cell, side));
-}
-
-bool LayoutTableSection::setCachedCollapsedBorder(const LayoutTableCell* cell, CollapsedBorderSide side, const CollapsedBorderValue& border)
-{
- ASSERT(table()->collapseBorders());
- CellsCollapsedBordersMap::iterator it = m_cellsCollapsedBorders.find(std::make_pair(cell, side));
- if (it == m_cellsCollapsedBorders.end()) {
- if (!border.isVisible())
- return false;
- m_cellsCollapsedBorders.add(std::make_pair(cell, side), border);
- return true;
- }
- if (!border.isVisible()) {
- m_cellsCollapsedBorders.remove(it);
- return true;
- }
- if (!it->value.equals(border)) {
- it->value = border;
- return true;
- }
- return false;
-}
-
-const CollapsedBorderValue* LayoutTableSection::cachedCollapsedBorder(const LayoutTableCell* cell, CollapsedBorderSide side) const
-{
- ASSERT(table()->collapseBorders());
- CellsCollapsedBordersMap::const_iterator it = m_cellsCollapsedBorders.find(std::make_pair(cell, side));
- return it == m_cellsCollapsedBorders.end() ? nullptr : &it->value;
-}
-
LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutObject* parent)
{
RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), TABLE_ROW_GROUP);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.h ('k') | third_party/WebKit/Source/core/paint/TableCellPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698