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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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) 2006 Oliver Hunt <oliver@nerget.com> 2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(Document& docume nt) 42 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(Document& docume nt)
43 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, docum ent) 43 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, docum ent)
44 , m_scale(SVGAnimatedNumber::create(this, SVGNames::scaleAttr, SVGNumber::cr eate(0))) 44 , m_scale(SVGAnimatedNumber::create(this, SVGNames::scaleAttr, SVGNumber::cr eate(0)))
45 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 45 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
46 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create ())) 46 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create ()))
47 , m_xChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi s, SVGNames::xChannelSelectorAttr, CHANNEL_A)) 47 , m_xChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi s, SVGNames::xChannelSelectorAttr, CHANNEL_A))
48 , m_yChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi s, SVGNames::yChannelSelectorAttr, CHANNEL_A)) 48 , m_yChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi s, SVGNames::yChannelSelectorAttr, CHANNEL_A))
49 { 49 {
50 ScriptWrappable::init(this);
51
52 addToPropertyMap(m_scale); 50 addToPropertyMap(m_scale);
53 addToPropertyMap(m_in1); 51 addToPropertyMap(m_in1);
54 addToPropertyMap(m_in2); 52 addToPropertyMap(m_in2);
55 addToPropertyMap(m_xChannelSelector); 53 addToPropertyMap(m_xChannelSelector);
56 addToPropertyMap(m_yChannelSelector); 54 addToPropertyMap(m_yChannelSelector);
57 } 55 }
58 56
59 DEFINE_NODE_FACTORY(SVGFEDisplacementMapElement) 57 DEFINE_NODE_FACTORY(SVGFEDisplacementMapElement)
60 58
61 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr Name) 59 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr Name)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return nullptr; 139 return nullptr;
142 140
143 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, m_xChannelSe lector->currentValue()->enumValue(), m_yChannelSelector->currentValue()->enumVal ue(), m_scale->currentValue()->value()); 141 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, m_xChannelSe lector->currentValue()->enumValue(), m_yChannelSelector->currentValue()->enumVal ue(), m_scale->currentValue()->value());
144 FilterEffectVector& inputEffects = effect->inputEffects(); 142 FilterEffectVector& inputEffects = effect->inputEffects();
145 inputEffects.reserveCapacity(2); 143 inputEffects.reserveCapacity(2);
146 inputEffects.append(input1); 144 inputEffects.append(input1);
147 inputEffects.append(input2); 145 inputEffects.append(input2);
148 return effect.release(); 146 return effect.release();
149 } 147 }
150 148
151 } 149 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEDiffuseLightingElement.cpp ('k') | Source/core/svg/SVGFEDistantLightElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698