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

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

Issue 2708923011: Avoid duplicating the CSS property mapping for SVG pres. attrs. (Closed)
Patch Set: Created 3 years, 9 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
« 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 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 6 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
7 * Copyright (C) 2012 University of Szeged 7 * Copyright (C) 2012 University of Szeged
8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org> 8 * Copyright (C) 2012 Renata Hodovan <reni@webkit.org>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 : originalElement.getAttribute(SVGNames::heightAttr)); 173 : originalElement.getAttribute(SVGNames::heightAttr));
174 } 174 }
175 } 175 }
176 176
177 void SVGUseElement::collectStyleForPresentationAttribute( 177 void SVGUseElement::collectStyleForPresentationAttribute(
178 const QualifiedName& name, 178 const QualifiedName& name,
179 const AtomicString& value, 179 const AtomicString& value,
180 MutableStylePropertySet* style) { 180 MutableStylePropertySet* style) {
181 SVGAnimatedPropertyBase* property = propertyFromAttribute(name); 181 SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
182 if (property == m_x) { 182 if (property == m_x) {
183 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, 183 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
184 m_x->cssValue()); 184 m_x->cssValue());
185 } else if (property == m_y) { 185 } else if (property == m_y) {
186 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, 186 addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
187 m_y->cssValue()); 187 m_y->cssValue());
188 } else { 188 } else {
189 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, 189 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value,
190 style); 190 style);
191 } 191 }
192 } 192 }
193 193
194 bool SVGUseElement::isStructurallyExternal() const { 194 bool SVGUseElement::isStructurallyExternal() const {
195 return !m_elementIdentifierIsLocal; 195 return !m_elementIdentifierIsLocal;
196 } 196 }
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 if (m_resource) 725 if (m_resource)
726 m_resource->removeClient(this); 726 m_resource->removeClient(this);
727 727
728 m_resource = resource; 728 m_resource = resource;
729 if (m_resource) 729 if (m_resource)
730 m_resource->addClient(this); 730 m_resource->addClient(this);
731 } 731 }
732 732
733 } // namespace blink 733 } // namespace blink
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