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

Side by Side Diff: Source/core/svg/SVGFETurbulenceElement.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
« no previous file with comments | « Source/core/svg/SVGFETileElement.cpp ('k') | Source/core/svg/SVGFilterElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 inline SVGFETurbulenceElement::SVGFETurbulenceElement(Document& document) 50 inline SVGFETurbulenceElement::SVGFETurbulenceElement(Document& document)
51 : SVGFilterPrimitiveStandardAttributes(SVGNames::feTurbulenceTag, document) 51 : SVGFilterPrimitiveStandardAttributes(SVGNames::feTurbulenceTag, document)
52 , m_baseFrequency(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::ba seFrequencyAttr)) 52 , m_baseFrequency(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::ba seFrequencyAttr))
53 , m_seed(SVGAnimatedNumber::create(this, SVGNames::seedAttr, SVGNumber::crea te(0))) 53 , m_seed(SVGAnimatedNumber::create(this, SVGNames::seedAttr, SVGNumber::crea te(0)))
54 , m_stitchTiles(SVGAnimatedEnumeration<SVGStitchOptions>::create(this, SVGNa mes::stitchTilesAttr, SVG_STITCHTYPE_NOSTITCH)) 54 , m_stitchTiles(SVGAnimatedEnumeration<SVGStitchOptions>::create(this, SVGNa mes::stitchTilesAttr, SVG_STITCHTYPE_NOSTITCH))
55 , m_type(SVGAnimatedEnumeration<TurbulenceType>::create(this, SVGNames::type Attr, FETURBULENCE_TYPE_TURBULENCE)) 55 , m_type(SVGAnimatedEnumeration<TurbulenceType>::create(this, SVGNames::type Attr, FETURBULENCE_TYPE_TURBULENCE))
56 , m_numOctaves(SVGAnimatedInteger::create(this, SVGNames::numOctavesAttr, SV GInteger::create(1))) 56 , m_numOctaves(SVGAnimatedInteger::create(this, SVGNames::numOctavesAttr, SV GInteger::create(1)))
57 { 57 {
58 ScriptWrappable::init(this);
59
60 addToPropertyMap(m_baseFrequency); 58 addToPropertyMap(m_baseFrequency);
61 addToPropertyMap(m_seed); 59 addToPropertyMap(m_seed);
62 addToPropertyMap(m_stitchTiles); 60 addToPropertyMap(m_stitchTiles);
63 addToPropertyMap(m_type); 61 addToPropertyMap(m_type);
64 addToPropertyMap(m_numOctaves); 62 addToPropertyMap(m_numOctaves);
65 } 63 }
66 64
67 DEFINE_NODE_FACTORY(SVGFETurbulenceElement) 65 DEFINE_NODE_FACTORY(SVGFETurbulenceElement)
68 66
69 bool SVGFETurbulenceElement::isSupportedAttribute(const QualifiedName& attrName) 67 bool SVGFETurbulenceElement::isSupportedAttribute(const QualifiedName& attrName)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ASSERT_NOT_REACHED(); 124 ASSERT_NOT_REACHED();
127 } 125 }
128 126
129 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter * filter) 127 PassRefPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter * filter)
130 { 128 {
131 if (baseFrequencyX()->currentValue()->value() < 0 || baseFrequencyY()->curre ntValue()->value() < 0) 129 if (baseFrequencyX()->currentValue()->value() < 0 || baseFrequencyY()->curre ntValue()->value() < 0)
132 return nullptr; 130 return nullptr;
133 return FETurbulence::create(filter, m_type->currentValue()->enumValue(), bas eFrequencyX()->currentValue()->value(), baseFrequencyY()->currentValue()->value( ), m_numOctaves->currentValue()->value(), m_seed->currentValue()->value(), m_sti tchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH); 131 return FETurbulence::create(filter, m_type->currentValue()->enumValue(), bas eFrequencyX()->currentValue()->value(), baseFrequencyY()->currentValue()->value( ), m_numOctaves->currentValue()->value(), m_seed->currentValue()->value(), m_sti tchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH);
134 } 132 }
135 133
136 } 134 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFETileElement.cpp ('k') | Source/core/svg/SVGFilterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698