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

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: Field instead of global HashMap Created 5 years 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 baae67a67e1add2ff80ab2d4d35a5e2e8975557f..f3cd14c9101604c0518c7dabd8e02c61286bd554 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1622,38 +1622,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()) {
- m_cellsCollapsedBorders.add(std::make_pair(cell, side), border);
- 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));
- ASSERT_WITH_SECURITY_IMPLICATION(it != m_cellsCollapsedBorders.end());
- return it->value;
-}
-
LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutObject* parent)
{
RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisplay(parent->styleRef(), TABLE_ROW_GROUP);

Powered by Google App Engine
This is Rietveld 408576698