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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix 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
« no previous file with comments | « Source/core/svg/SVGFESpecularLightingElement.h ('k') | Source/core/svg/SVGFESpotLightElement.h » ('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 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFESpecularLightingElement) 44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFESpecularLightingElement)
45 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) 45 REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
46 REGISTER_LOCAL_ANIMATED_PROPERTY(specularConstant) 46 REGISTER_LOCAL_ANIMATED_PROPERTY(specularConstant)
47 REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent) 47 REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent)
48 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale) 48 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale)
49 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) 49 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX)
50 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) 50 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY)
51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) 51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
52 END_REGISTER_ANIMATED_PROPERTIES 52 END_REGISTER_ANIMATED_PROPERTIES
53 53
54 inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const Qualifie dName& tagName, Document* document) 54 inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const Qualifie dName& tagName, Document& document)
55 : SVGFilterPrimitiveStandardAttributes(tagName, document) 55 : SVGFilterPrimitiveStandardAttributes(tagName, document)
56 , m_specularConstant(1) 56 , m_specularConstant(1)
57 , m_specularExponent(1) 57 , m_specularExponent(1)
58 , m_surfaceScale(1) 58 , m_surfaceScale(1)
59 { 59 {
60 ASSERT(hasTagName(SVGNames::feSpecularLightingTag)); 60 ASSERT(hasTagName(SVGNames::feSpecularLightingTag));
61 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
62 registerAnimatedPropertiesForSVGFESpecularLightingElement(); 62 registerAnimatedPropertiesForSVGFESpecularLightingElement();
63 } 63 }
64 64
65 PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(co nst QualifiedName& tagName, Document* document) 65 PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(co nst QualifiedName& tagName, Document& document)
66 { 66 {
67 return adoptRef(new SVGFESpecularLightingElement(tagName, document)); 67 return adoptRef(new SVGFESpecularLightingElement(tagName, document));
68 } 68 }
69 69
70 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthXIdentifier() 70 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthXIdentifier()
71 { 71 {
72 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato micString::ConstructFromLiteral)); 72 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato micString::ConstructFromLiteral));
73 return s_identifier; 73 return s_identifier;
74 } 74 }
75 75
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 ASSERT(renderer->style()); 230 ASSERT(renderer->style());
231 Color color = renderer->style()->svgStyle()->lightingColor(); 231 Color color = renderer->style()->svgStyle()->lightingColor();
232 232
233 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf aceScaleCurrentValue(), specularConstantCurrentValue(), 233 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf aceScaleCurrentValue(), specularConstantCurrentValue(),
234 specularExponentCurrentValue(), kernelUnitLengthXCurrentValue(), kernelU nitLengthYCurrentValue(), lightSource.release()); 234 specularExponentCurrentValue(), kernelUnitLengthXCurrentValue(), kernelU nitLengthYCurrentValue(), lightSource.release());
235 effect->inputEffects().append(input1); 235 effect->inputEffects().append(input1);
236 return effect.release(); 236 return effect.release();
237 } 237 }
238 238
239 } 239 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFESpecularLightingElement.h ('k') | Source/core/svg/SVGFESpotLightElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698