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

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

Issue 1901203002: Don't calculate overflow on tables that need layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@604095-2
Patch Set: Created 4 years, 8 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/fast/overflow/do-not-calc-overflow-on-tables-needing-layout-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 a9babf604e45a0e610eaf2e501aab4be93fc2b45..7c9b6d64fa861c825546e3a1dac926050a29bc55 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -418,6 +418,12 @@ bool LayoutTable::recalcChildOverflowAfterStyleChange()
{
ASSERT(childNeedsOverflowRecalcAfterStyleChange());
clearChildNeedsOverflowRecalcAfterStyleChange();
+
+ // If the table needs layout the sections we keep pointers to may have gone away and
+ // overflow will get recalculated anyway so return early.
+ if (needsLayout())
+ return false;
+
bool childrenOverflowChanged = false;
for (LayoutTableSection* section = topSection(); section; section = sectionBelow(section)) {
if (!section->childNeedsOverflowRecalcAfterStyleChange())
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/overflow/do-not-calc-overflow-on-tables-needing-layout-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698