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

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

Issue 273613002: [FastTextAutosizer] Check for containingBlock in deepestBlockContainingAllText (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | 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 2dea427fd5d3e084551eb6a921d051a28f0eab79..a0983990ea7aba85b03aaf5f3a332dbd9a8fc8e3 100644
--- a/Source/core/rendering/FastTextAutosizer.cpp
+++ b/Source/core/rendering/FastTextAutosizer.cpp
@@ -921,8 +921,10 @@ const RenderBlock* FastTextAutosizer::deepestBlockContainingAllText(const Render
// its text node's lowest common ancestor as isAutosizingCluster would have made them into their
// own independent cluster.
const RenderBlock* containingBlock = firstNode->containingBlock();
- ASSERT(containingBlock->isDescendantOf(root));
+ if (!containingBlock)
+ return root;
+ ASSERT(containingBlock->isDescendantOf(root));
return containingBlock;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698