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

Side by Side Diff: Source/core/svg/SVGImageElement.cpp

Issue 933663002: Make use of new method for setting lengths in presentation style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) 103 || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
104 return true; 104 return true;
105 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName); 105 return SVGGraphicsElement::isPresentationAttributeWithSVGDOM(attrName);
106 } 106 }
107 107
108 void SVGImageElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 108 void SVGImageElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
109 { 109 {
110 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name); 110 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute (name);
111 111
112 if (property == m_width) 112 if (property == m_width)
113 addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, value); 113 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth , *m_width->currentValue());
114 else if (property == m_height) 114 else if (property == m_height)
115 addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, value) ; 115 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeigh t, *m_height->currentValue());
116 else if (property == m_x) 116 else if (property == m_x)
117 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m _x->currentValue()); 117 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m _x->currentValue());
118 else if (property == m_y) 118 else if (property == m_y)
119 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m _y->currentValue()); 119 addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m _y->currentValue());
120 else 120 else
121 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle); 121 SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, st yle);
122 } 122 }
123 123
124 void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value) 124 void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value)
125 { 125 {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 return AtomicString(hrefString()); 229 return AtomicString(hrefString());
230 } 230 }
231 231
232 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) 232 void SVGImageElement::didMoveToNewDocument(Document& oldDocument)
233 { 233 {
234 imageLoader().elementDidMoveToNewDocument(); 234 imageLoader().elementDidMoveToNewDocument();
235 SVGGraphicsElement::didMoveToNewDocument(oldDocument); 235 SVGGraphicsElement::didMoveToNewDocument(oldDocument);
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698