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

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

Issue 2358663003: [css-tables] Set needsLayout on cells when table border width changes (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index 3c82b36e11aeea371d7277de86e9acffc1d438bf..9585c0ff358eab95ce40cbdbf90d499d83de457f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -101,6 +101,14 @@ void LayoutTable::styleDidChange(StyleDifference diff, const ComputedStyle* oldS
// If border was changed, invalidate collapsed borders cache.
if (!needsLayout() && oldStyle && oldStyle->border() != style()->border())
invalidateCollapsedBorders();
+ if (LayoutTableBoxComponent::doCellsHaveDirtyWidth(*this, *this, diff, *oldStyle)) {
mstensho (USE GERRIT) 2016/09/21 07:02:45 The code here is almost identical to what we alrea
dgrogan 2016/09/21 18:35:11 Good catch, refactored.
+ for (LayoutObject* child = children()->firstChild(); child; child = child->nextSibling()) {
+ if (!child->isTableSection())
+ continue;
+ LayoutTableSection* section = toLayoutTableSection(child);
+ section->markAllCellsWidthsDirtyAndOrNeedsLayout(LayoutTableSection::MarkDirtyAndNeedsLayout);
+ }
+ }
}
static inline void resetSectionPointerIfNotBefore(LayoutTableSection*& ptr, LayoutObject* before)
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698