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

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

Issue 1887933002: (CANCELED) Fix TextAutosizer not to scheduleRelayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplifiedLayout 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
Index: third_party/WebKit/Source/core/layout/TextAutosizer.cpp
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
index 3560c5c63396d603f8e6f1656cc48d9c8009c670..5035b957d06f8012559c06b9c09ee726f57e9e76 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
@@ -378,7 +378,7 @@ void TextAutosizer::beginLayout(LayoutBlock* block, SubtreeLayoutScope* layouter
inflate(block, layouter);
}
-void TextAutosizer::inflateAutoTable(LayoutTable* table)
+void TextAutosizer::inflateAutoTable(LayoutTable* table, SubtreeLayoutScope* layouter)
{
ASSERT(table);
ASSERT(!table->style()->isFixedTableLayout());
@@ -398,10 +398,8 @@ void TextAutosizer::inflateAutoTable(LayoutTable* table)
if (!cell->needsLayout())
continue;
- // TODO(kojii): Callers should pass SubtreeLayoutScope to give
- // to beginLayout/inflate.
- beginLayout(cell, nullptr);
- inflate(cell, nullptr, DescendToInnerBlocks);
+ beginLayout(cell, layouter);
+ inflate(cell, layouter, DescendToInnerBlocks);
endLayout(cell);
}
}
@@ -1134,12 +1132,12 @@ TextAutosizer::LayoutScope::~LayoutScope()
}
-TextAutosizer::TableLayoutScope::TableLayoutScope(LayoutTable* table)
- : LayoutScope(table)
+TextAutosizer::TableLayoutScope::TableLayoutScope(LayoutTable* table, SubtreeLayoutScope* layouter)
+ : LayoutScope(table, layouter)
{
if (m_textAutosizer) {
ASSERT(m_textAutosizer->shouldHandleLayout());
- m_textAutosizer->inflateAutoTable(table);
+ m_textAutosizer->inflateAutoTable(table, layouter);
}
}

Powered by Google App Engine
This is Rietveld 408576698