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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGUseElement.cpp

Issue 1481123002: Use SVGLength's wrapped CSSPrimitiveValue for pres.attr. style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
6 * Copyright (C) 2012 University of Szeged 6 * Copyright (C) 2012 University of Szeged
7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 { 184 {
185 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) 185 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
186 return true; 186 return true;
187 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); 187 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName);
188 } 188 }
189 189
190 void SVGUseElement::collectStyleForPresentationAttribute(const QualifiedName& na me, const AtomicString& value, MutableStylePropertySet* style) 190 void SVGUseElement::collectStyleForPresentationAttribute(const QualifiedName& na me, const AtomicString& value, MutableStylePropertySet* style)
191 { 191 {
192 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name); 192 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name);
193 if (property == m_x) 193 if (property == m_x)
194 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m _x->currentValue()); 194 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren tValue()->asCSSPrimitiveValue());
195 else if (property == m_y) 195 else if (property == m_y)
196 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m _y->currentValue()); 196 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren tValue()->asCSSPrimitiveValue());
197 else 197 else
198 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle); 198 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle);
199 } 199 }
200 200
201 void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) 201 void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
202 { 202 {
203 if (attrName == SVGNames::xAttr 203 if (attrName == SVGNames::xAttr
204 || attrName == SVGNames::yAttr 204 || attrName == SVGNames::yAttr
205 || attrName == SVGNames::widthAttr 205 || attrName == SVGNames::widthAttr
206 || attrName == SVGNames::heightAttr) { 206 || attrName == SVGNames::heightAttr) {
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 817
818 if (m_resource) 818 if (m_resource)
819 m_resource->removeClient(this); 819 m_resource->removeClient(this);
820 820
821 m_resource = resource; 821 m_resource = resource;
822 if (m_resource) 822 if (m_resource)
823 m_resource->addClient(this); 823 m_resource->addClient(this);
824 } 824 }
825 825
826 } 826 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698