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

Unified Diff: Source/core/rendering/FastTextAutosizer.cpp

Issue 182443004: [FastTextAutosizer] Do not inflate blocks with no children (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « LayoutTests/fast/text-autosizing/empty-document-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/FastTextAutosizer.cpp
diff --git a/Source/core/rendering/FastTextAutosizer.cpp b/Source/core/rendering/FastTextAutosizer.cpp
index 7d9c5172dc9c58b62cd208684b087fa016f9e9ae..ffb22b3ce4578aa01c58886199bd4af081f36bdd 100644
--- a/Source/core/rendering/FastTextAutosizer.cpp
+++ b/Source/core/rendering/FastTextAutosizer.cpp
@@ -136,7 +136,7 @@ void FastTextAutosizer::beginLayout(RenderBlock* block)
inflateTable(toRenderTable(block));
}
- if (block->childrenInline())
+ if (block->childrenInline() && block->firstChild())
inflate(block);
}
@@ -198,9 +198,6 @@ void FastTextAutosizer::endLayout(RenderBlock* block)
{
ASSERT(enabled());
- if (currentCluster()->m_root == block)
- m_clusterStack.removeLast();
-
if (block == m_firstBlock) {
m_firstBlock = 0;
m_clusterStack.clear();
@@ -208,6 +205,8 @@ void FastTextAutosizer::endLayout(RenderBlock* block)
#ifndef NDEBUG
m_blocksThatHaveBegunLayout.clear();
#endif
+ } else if (currentCluster()->m_root == block) {
+ m_clusterStack.removeLast();
}
}
« no previous file with comments | « LayoutTests/fast/text-autosizing/empty-document-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698