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

Unified Diff: Source/core/dom/Text.cpp

Issue 635353002: Fix assertion: !visualMetricsValues.isEmpty() in blink::SVGTextLayoutEngine::layoutTextOnLineOrPath (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/tspan-pre-wrap-whitespace-crash-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index 2426009c6edb92702b679096b4140bc7abb6aa20..3c94b1c2fb0934c02675e31ba8b86f8f0a8cfb5f 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -254,6 +254,9 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa
if (!parent.canHaveWhitespaceChildren())
return false;
+ if (style.whiteSpace() == PRE_WRAP && parent.isSVG()) // pre-wrap in SVG never makes renderer.
+ return false;
+
if (style.preserveNewline()) // pre/pre-wrap/pre-line always make renderers.
return true;
« no previous file with comments | « LayoutTests/svg/text/tspan-pre-wrap-whitespace-crash-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698