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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests build Created 7 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 26 matching lines...) Expand all
37 37
38 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement) 38 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement)
39 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) 39 REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
40 REGISTER_LOCAL_ANIMATED_PROPERTY(in2) 40 REGISTER_LOCAL_ANIMATED_PROPERTY(in2)
41 REGISTER_LOCAL_ANIMATED_PROPERTY(xChannelSelector) 41 REGISTER_LOCAL_ANIMATED_PROPERTY(xChannelSelector)
42 REGISTER_LOCAL_ANIMATED_PROPERTY(yChannelSelector) 42 REGISTER_LOCAL_ANIMATED_PROPERTY(yChannelSelector)
43 REGISTER_LOCAL_ANIMATED_PROPERTY(scale) 43 REGISTER_LOCAL_ANIMATED_PROPERTY(scale)
44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) 44 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
45 END_REGISTER_ANIMATED_PROPERTIES 45 END_REGISTER_ANIMATED_PROPERTIES
46 46
47 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedN ame& tagName, Document* document) 47 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedN ame& tagName, Document& document)
48 : SVGFilterPrimitiveStandardAttributes(tagName, document) 48 : SVGFilterPrimitiveStandardAttributes(tagName, document)
49 , m_xChannelSelector(CHANNEL_A) 49 , m_xChannelSelector(CHANNEL_A)
50 , m_yChannelSelector(CHANNEL_A) 50 , m_yChannelSelector(CHANNEL_A)
51 { 51 {
52 ASSERT(hasTagName(SVGNames::feDisplacementMapTag)); 52 ASSERT(hasTagName(SVGNames::feDisplacementMapTag));
53 ScriptWrappable::init(this); 53 ScriptWrappable::init(this);
54 registerAnimatedPropertiesForSVGFEDisplacementMapElement(); 54 registerAnimatedPropertiesForSVGFEDisplacementMapElement();
55 } 55 }
56 56
57 PassRefPtr<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(cons t QualifiedName& tagName, Document* document) 57 PassRefPtr<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(cons t QualifiedName& tagName, Document& document)
58 { 58 {
59 return adoptRef(new SVGFEDisplacementMapElement(tagName, document)); 59 return adoptRef(new SVGFEDisplacementMapElement(tagName, document));
60 } 60 }
61 61
62 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr Name) 62 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr Name)
63 { 63 {
64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
65 if (supportedAttributes.isEmpty()) { 65 if (supportedAttributes.isEmpty()) {
66 supportedAttributes.add(SVGNames::inAttr); 66 supportedAttributes.add(SVGNames::inAttr);
67 supportedAttributes.add(SVGNames::in2Attr); 67 supportedAttributes.add(SVGNames::in2Attr);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, xChannelSele ctorCurrentValue(), yChannelSelectorCurrentValue(), scaleCurrentValue()); 158 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, xChannelSele ctorCurrentValue(), yChannelSelectorCurrentValue(), scaleCurrentValue());
159 FilterEffectVector& inputEffects = effect->inputEffects(); 159 FilterEffectVector& inputEffects = effect->inputEffects();
160 inputEffects.reserveCapacity(2); 160 inputEffects.reserveCapacity(2);
161 inputEffects.append(input1); 161 inputEffects.append(input1);
162 inputEffects.append(input2); 162 inputEffects.append(input2);
163 return effect.release(); 163 return effect.release();
164 } 164 }
165 165
166 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698