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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFEImageElement.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, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.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 18 matching lines...) Expand all
29 #include "core/svg/graphics/filters/SVGFEImage.h" 29 #include "core/svg/graphics/filters/SVGFEImage.h"
30 #include "platform/graphics/Image.h" 30 #include "platform/graphics/Image.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 inline SVGFEImageElement::SVGFEImageElement(Document& document) 34 inline SVGFEImageElement::SVGFEImageElement(Document& document)
35 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document), 35 : SVGFilterPrimitiveStandardAttributes(SVGNames::feImageTag, document),
36 SVGURIReference(this), 36 SVGURIReference(this),
37 m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create( 37 m_preserveAspectRatio(SVGAnimatedPreserveAspectRatio::create(
38 this, 38 this,
39 SVGNames::preserveAspectRatioAttr, 39 SVGNames::preserveAspectRatioAttr)) {
40 SVGPreserveAspectRatio::create())) {
41 addToPropertyMap(m_preserveAspectRatio); 40 addToPropertyMap(m_preserveAspectRatio);
42 } 41 }
43 42
44 DEFINE_NODE_FACTORY(SVGFEImageElement) 43 DEFINE_NODE_FACTORY(SVGFEImageElement)
45 44
46 SVGFEImageElement::~SVGFEImageElement() { 45 SVGFEImageElement::~SVGFEImageElement() {
47 if (m_cachedImage) { 46 if (m_cachedImage) {
48 m_cachedImage->removeClient(this); 47 m_cachedImage->removeClient(this);
49 m_cachedImage = nullptr; 48 m_cachedImage = nullptr;
50 } 49 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 m_cachedImage->errorOccurred() ? nullptr : m_cachedImage->getImage(); 155 m_cachedImage->errorOccurred() ? nullptr : m_cachedImage->getImage();
157 return FEImage::createWithImage(filter, image, 156 return FEImage::createWithImage(filter, image,
158 m_preserveAspectRatio->currentValue()); 157 m_preserveAspectRatio->currentValue());
159 } 158 }
160 159
161 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(), 160 return FEImage::createWithIRIReference(filter, treeScope(), hrefString(),
162 m_preserveAspectRatio->currentValue()); 161 m_preserveAspectRatio->currentValue());
163 } 162 }
164 163
165 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698