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

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

Issue 2153283002: [css-tables] Clean up code that detects significant border changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: the big refactor Created 4 years, 5 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 b688d71ae1d43651ec015713a35d0dc3cc0546d7..a35134e7d3db9cf8cbedba5a3a342006ab8b5f02 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -119,17 +119,23 @@ LayoutTableSection::~LayoutTableSection()
void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
{
+ DCHECK(style()->display() == TABLE_FOOTER_GROUP || style()->display() == TABLE_ROW_GROUP || style()->display() == TABLE_HEADER_GROUP);
+
LayoutTableBoxComponent::styleDidChange(diff, oldStyle);
propagateStyleToAnonymousChildren();
- // If border was changed, notify table.
+ if (!oldStyle)
+ return;
+
LayoutTable* table = this->table();
- if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
+ if (!table)
+ return;
+
+ if (!table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle->border() != style()->border())
table->invalidateCollapsedBorders();
- if (table && oldStyle && diff.needsFullLayout() && needsLayout() && table->collapseBorders() && oldStyle->border() != style()->border()) {
+ if (LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *table, diff, *oldStyle))
markAllCellsWidthsDirtyAndOrNeedsLayout(MarkDirtyAndNeedsLayout);
- }
}
void LayoutTableSection::willBeRemovedFromTree()

Powered by Google App Engine
This is Rietveld 408576698