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

Unified Diff: Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp

Issue 7350005: Merge 90166 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | « Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
===================================================================
--- Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp (revision 90861)
+++ Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp (working copy)
@@ -39,7 +39,11 @@
{
ASSERT(textRoot);
- // Build list of x/y/dx/dy/rotate values for each subtree element that may define these values (tspan/textPath etc).
+ // We always clear our current attribute as we don't want to keep any stale ones that could survive DOM modification.
+ Vector<SVGTextLayoutAttributes>& allAttributes = textRoot->layoutAttributes();
+ allAttributes.clear();
+
+ // Build list of x/y/dx/dy/rotate values for each subtree element that may define these values (tspan/textPath etc).
unsigned atCharacter = 0;
UChar lastCharacter = '\0';
collectTextPositioningElements(textRoot, atCharacter, lastCharacter);
@@ -51,8 +55,6 @@
buildLayoutAttributesForAllCharacters(textRoot, atCharacter);
// Propagate layout attributes to each RenderSVGInlineText object, and the whole list to the RenderSVGText root.
- Vector<SVGTextLayoutAttributes>& allAttributes = textRoot->layoutAttributes();
- allAttributes.clear();
atCharacter = 0;
lastCharacter = '\0';
propagateLayoutAttributes(textRoot, allAttributes, atCharacter, lastCharacter);
« no previous file with comments | « Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698