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

Unified Diff: Source/core/layout/svg/LayoutSVGText.cpp

Issue 1078193002: Clear LayoutSVGText's frame rect if no line boxes are produced (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « LayoutTests/svg/text/text-bbox-of-empty-after-change.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGText.cpp
diff --git a/Source/core/layout/svg/LayoutSVGText.cpp b/Source/core/layout/svg/LayoutSVGText.cpp
index 77badd66b6301b33606001631a76f818fb8f98ce..458fb85b4f7dfefb6a3199e04c41bad8e0e2f526 100644
--- a/Source/core/layout/svg/LayoutSVGText.cpp
+++ b/Source/core/layout/svg/LayoutSVGText.cpp
@@ -395,6 +395,10 @@ void LayoutSVGText::layout()
if (m_needsReordering)
m_needsReordering = false;
+ // If we don't have any line boxes, then make sure the frame rect is still cleared.
+ if (!firstLineBox())
+ setFrameRect(LayoutRect());
+
if (!updateCachedBoundariesInParents)
updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox();
« no previous file with comments | « LayoutTests/svg/text/text-bbox-of-empty-after-change.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698