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

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

Issue 1541923002: Make SVGElement::propertyFromAttribute return raw pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 bool SVGSVGElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrN ame) const 239 bool SVGSVGElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrN ame) const
240 { 240 {
241 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr) 241 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
242 return true; 242 return true;
243 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); 243 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName);
244 } 244 }
245 245
246 void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na me, const AtomicString& value, MutableStylePropertySet* style) 246 void SVGSVGElement::collectStyleForPresentationAttribute(const QualifiedName& na me, const AtomicString& value, MutableStylePropertySet* style)
247 { 247 {
248 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name); 248 SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
249 if (property == m_x) { 249 if (property == m_x) {
250 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren tValue()->asCSSPrimitiveValue()); 250 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren tValue()->asCSSPrimitiveValue());
251 } else if (property == m_y) { 251 } else if (property == m_y) {
252 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren tValue()->asCSSPrimitiveValue()); 252 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren tValue()->asCSSPrimitiveValue());
253 } else if (isOutermostSVGSVGElement() && (property == m_width || property == m_height)) { 253 } else if (isOutermostSVGSVGElement() && (property == m_width || property == m_height)) {
254 if (property == m_width) 254 if (property == m_width)
255 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_w idth->currentValue()->asCSSPrimitiveValue()); 255 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_w idth->currentValue()->asCSSPrimitiveValue());
256 else if (property == m_height) 256 else if (property == m_height)
257 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_ height->currentValue()->asCSSPrimitiveValue()); 257 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_ height->currentValue()->asCSSPrimitiveValue());
258 } else { 258 } else {
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 visitor->trace(m_width); 763 visitor->trace(m_width);
764 visitor->trace(m_height); 764 visitor->trace(m_height);
765 visitor->trace(m_translation); 765 visitor->trace(m_translation);
766 visitor->trace(m_timeContainer); 766 visitor->trace(m_timeContainer);
767 visitor->trace(m_viewSpec); 767 visitor->trace(m_viewSpec);
768 SVGGraphicsElement::trace(visitor); 768 SVGGraphicsElement::trace(visitor);
769 SVGFitToViewBox::trace(visitor); 769 SVGFitToViewBox::trace(visitor);
770 } 770 }
771 771
772 } // namespace blink 772 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698