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

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

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 15 matching lines...) Expand all
26 #include "core/dom/ElementTraversal.h" 26 #include "core/dom/ElementTraversal.h"
27 #include "core/svg/SVGFEFuncAElement.h" 27 #include "core/svg/SVGFEFuncAElement.h"
28 #include "core/svg/SVGFEFuncBElement.h" 28 #include "core/svg/SVGFEFuncBElement.h"
29 #include "core/svg/SVGFEFuncGElement.h" 29 #include "core/svg/SVGFEFuncGElement.h"
30 #include "core/svg/SVGFEFuncRElement.h" 30 #include "core/svg/SVGFEFuncRElement.h"
31 #include "core/svg/graphics/filters/SVGFilterBuilder.h" 31 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
32 #include "platform/graphics/filters/FilterEffect.h" 32 #include "platform/graphics/filters/FilterEffect.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 SVGFEComponentTransferElement::SVGFEComponentTransferElement(Document& document) 36 inline SVGFEComponentTransferElement::SVGFEComponentTransferElement(Document& do cument)
37 : SVGFilterPrimitiveStandardAttributes(SVGNames::feComponentTransferTag, doc ument) 37 : SVGFilterPrimitiveStandardAttributes(SVGNames::feComponentTransferTag, doc ument)
38 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 38 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
39 { 39 {
40 ScriptWrappable::init(this); 40 ScriptWrappable::init(this);
41 addToPropertyMap(m_in1); 41 addToPropertyMap(m_in1);
42 } 42 }
43 43
44 DEFINE_NODE_FACTORY(SVGFEComponentTransferElement)
45
44 bool SVGFEComponentTransferElement::isSupportedAttribute(const QualifiedName& at trName) 46 bool SVGFEComponentTransferElement::isSupportedAttribute(const QualifiedName& at trName)
45 { 47 {
46 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 48 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
47 if (supportedAttributes.isEmpty()) 49 if (supportedAttributes.isEmpty())
48 supportedAttributes.add(SVGNames::inAttr); 50 supportedAttributes.add(SVGNames::inAttr);
49 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); 51 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
50 } 52 }
51 53
52 void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, co nst AtomicString& value) 54 void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, co nst AtomicString& value)
53 { 55 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 else if (isSVGFEFuncAElement(*element)) 90 else if (isSVGFEFuncAElement(*element))
89 alpha = toSVGFEFuncAElement(*element).transferFunction(); 91 alpha = toSVGFEFuncAElement(*element).transferFunction();
90 } 92 }
91 93
92 RefPtr<FilterEffect> effect = FEComponentTransfer::create(filter, red, green , blue, alpha); 94 RefPtr<FilterEffect> effect = FEComponentTransfer::create(filter, red, green , blue, alpha);
93 effect->inputEffects().append(input1); 95 effect->inputEffects().append(input1);
94 return effect.release(); 96 return effect.release();
95 } 97 }
96 98
97 } 99 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEComponentTransferElement.h ('k') | Source/core/svg/SVGFECompositeElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698