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

Side by Side Diff: Source/core/rendering/svg/RenderSVGTransformableContainer.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2009 Google, Inc. 4 * Copyright (C) 2009 Google, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (element->hasTagName(SVGNames::useTag)) 48 if (element->hasTagName(SVGNames::useTag))
49 useElement = toSVGUseElement(element); 49 useElement = toSVGUseElement(element);
50 else if (element->isInShadowTree() && element->hasTagName(SVGNames::gTag)) { 50 else if (element->isInShadowTree() && element->hasTagName(SVGNames::gTag)) {
51 SVGElement* correspondingElement = element->correspondingElement(); 51 SVGElement* correspondingElement = element->correspondingElement();
52 if (correspondingElement && correspondingElement->hasTagName(SVGNames::u seTag)) 52 if (correspondingElement && correspondingElement->hasTagName(SVGNames::u seTag))
53 useElement = toSVGUseElement(correspondingElement); 53 useElement = toSVGUseElement(correspondingElement);
54 } 54 }
55 55
56 if (useElement) { 56 if (useElement) {
57 SVGLengthContext lengthContext(useElement); 57 SVGLengthContext lengthContext(useElement);
58 FloatSize translation(useElement->xCurrentValue().value(lengthContext), useElement->yCurrentValue().value(lengthContext)); 58 FloatSize translation(
59 useElement->x()->currentValue()->value(lengthContext),
60 useElement->y()->currentValue()->value(lengthContext));
59 if (translation != m_lastTranslation) 61 if (translation != m_lastTranslation)
60 m_needsTransformUpdate = true; 62 m_needsTransformUpdate = true;
61 m_lastTranslation = translation; 63 m_lastTranslation = translation;
62 } 64 }
63 65
64 m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::tra nsformToRootChanged(parent()); 66 m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::tra nsformToRootChanged(parent());
65 if (!m_needsTransformUpdate) 67 if (!m_needsTransformUpdate)
66 return false; 68 return false;
67 69
68 m_localTransform = element->animatedLocalTransform(); 70 m_localTransform = element->animatedLocalTransform();
69 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig ht()); 71 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig ht());
70 m_needsTransformUpdate = false; 72 m_needsTransformUpdate = false;
71 return true; 73 return true;
72 } 74 }
73 75
74 } 76 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGTextPath.cpp ('k') | Source/core/rendering/svg/RenderSVGViewportContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698