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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGImageElement.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, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 4 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool SVGImageElement::isPresentationAttributeWithSVGDOM(const QualifiedName& att rName) const 83 bool SVGImageElement::isPresentationAttributeWithSVGDOM(const QualifiedName& att rName) const
84 { 84 {
85 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr 85 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr
86 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) 86 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
87 return true; 87 return true;
88 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); 88 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName);
89 } 89 }
90 90
91 void SVGImageElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 91 void SVGImageElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
92 { 92 {
93 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name); 93 SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
94 if (property == m_width) 94 if (property == m_width)
95 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width ->currentValue()->asCSSPrimitiveValue()); 95 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width ->currentValue()->asCSSPrimitiveValue());
96 else if (property == m_height) 96 else if (property == m_height)
97 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_heig ht->currentValue()->asCSSPrimitiveValue()); 97 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, m_heig ht->currentValue()->asCSSPrimitiveValue());
98 else if (property == m_x) 98 else if (property == m_x)
99 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren tValue()->asCSSPrimitiveValue()); 99 addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->curren tValue()->asCSSPrimitiveValue());
100 else if (property == m_y) 100 else if (property == m_y)
101 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren tValue()->asCSSPrimitiveValue()); 101 addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->curren tValue()->asCSSPrimitiveValue());
102 else 102 else
103 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle); 103 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return AtomicString(hrefString()); 200 return AtomicString(hrefString());
201 } 201 }
202 202
203 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) 203 void SVGImageElement::didMoveToNewDocument(Document& oldDocument)
204 { 204 {
205 imageLoader().elementDidMoveToNewDocument(); 205 imageLoader().elementDidMoveToNewDocument();
206 SVGGraphicsElement::didMoveToNewDocument(oldDocument); 206 SVGGraphicsElement::didMoveToNewDocument(oldDocument);
207 } 207 }
208 208
209 } // namespace blink 209 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGForeignObjectElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGMaskElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698