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

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

Issue 2436793002: Simplify SVGAnimated* initialization (Closed)
Patch Set: Created 4 years, 2 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 29 matching lines...) Expand all
40 m_width( 40 m_width(
41 SVGAnimatedLength::create(this, 41 SVGAnimatedLength::create(this,
42 SVGNames::widthAttr, 42 SVGNames::widthAttr,
43 SVGLength::create(SVGLengthMode::Width))), 43 SVGLength::create(SVGLengthMode::Width))),
44 m_height( 44 m_height(
45 SVGAnimatedLength::create(this, 45 SVGAnimatedLength::create(this,
46 SVGNames::heightAttr, 46 SVGNames::heightAttr,
47 SVGLength::create(SVGLengthMode::Height))), 47 SVGLength::create(SVGLengthMode::Height))),
48 m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create( 48 m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(
49 this, 49 this,
50 SVGNames::preserveAspectRatioAttr, 50 SVGNames::preserveAspectRatioAttr)),
51 SVGPreserveAspectRatio::create())),
52 m_imageLoader(SVGImageLoader::create(this)), 51 m_imageLoader(SVGImageLoader::create(this)),
53 m_needsLoaderURIUpdate(true) { 52 m_needsLoaderURIUpdate(true) {
54 addToPropertyMap(m_x); 53 addToPropertyMap(m_x);
55 addToPropertyMap(m_y); 54 addToPropertyMap(m_y);
56 addToPropertyMap(m_width); 55 addToPropertyMap(m_width);
57 addToPropertyMap(m_height); 56 addToPropertyMap(m_height);
58 addToPropertyMap(m_preserveAspectRatio); 57 addToPropertyMap(m_preserveAspectRatio);
59 } 58 }
60 59
61 DEFINE_NODE_FACTORY(SVGImageElement) 60 DEFINE_NODE_FACTORY(SVGImageElement)
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 const AtomicString SVGImageElement::imageSourceURL() const { 212 const AtomicString SVGImageElement::imageSourceURL() const {
214 return AtomicString(hrefString()); 213 return AtomicString(hrefString());
215 } 214 }
216 215
217 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) { 216 void SVGImageElement::didMoveToNewDocument(Document& oldDocument) {
218 imageLoader().elementDidMoveToNewDocument(); 217 imageLoader().elementDidMoveToNewDocument();
219 SVGGraphicsElement::didMoveToNewDocument(oldDocument); 218 SVGGraphicsElement::didMoveToNewDocument(oldDocument);
220 } 219 }
221 220
222 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698