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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFEDropShadowElement.cpp

Issue 2436793002: Simplify SVGAnimated* initialization (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
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 23 matching lines...) Expand all
34 SVGNames::dxAttr, 34 SVGNames::dxAttr,
35 SVGNumber::create(2))), 35 SVGNumber::create(2))),
36 m_dy(SVGAnimatedNumber::create(this, 36 m_dy(SVGAnimatedNumber::create(this,
37 SVGNames::dyAttr, 37 SVGNames::dyAttr,
38 SVGNumber::create(2))), 38 SVGNumber::create(2))),
39 m_stdDeviation( 39 m_stdDeviation(
40 SVGAnimatedNumberOptionalNumber::create(this, 40 SVGAnimatedNumberOptionalNumber::create(this,
41 SVGNames::stdDeviationAttr, 41 SVGNames::stdDeviationAttr,
42 2, 42 2,
43 2)), 43 2)),
44 m_in1(SVGAnimatedString::create(this, 44 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)) {
45 SVGNames::inAttr,
46 SVGString::create())) {
47 addToPropertyMap(m_dx); 45 addToPropertyMap(m_dx);
48 addToPropertyMap(m_dy); 46 addToPropertyMap(m_dy);
49 addToPropertyMap(m_stdDeviation); 47 addToPropertyMap(m_stdDeviation);
50 addToPropertyMap(m_in1); 48 addToPropertyMap(m_in1);
51 } 49 }
52 50
53 DEFINE_TRACE(SVGFEDropShadowElement) { 51 DEFINE_TRACE(SVGFEDropShadowElement) {
54 visitor->trace(m_dx); 52 visitor->trace(m_dx);
55 visitor->trace(m_dy); 53 visitor->trace(m_dy);
56 visitor->trace(m_stdDeviation); 54 visitor->trace(m_stdDeviation);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value()); 115 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value());
118 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value()); 116 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value());
119 FilterEffect* effect = FEDropShadow::create( 117 FilterEffect* effect = FEDropShadow::create(
120 filter, stdDevX, stdDevY, m_dx->currentValue()->value(), 118 filter, stdDevX, stdDevY, m_dx->currentValue()->value(),
121 m_dy->currentValue()->value(), color, opacity); 119 m_dy->currentValue()->value(), color, opacity);
122 effect->inputEffects().append(input1); 120 effect->inputEffects().append(input1);
123 return effect; 121 return effect;
124 } 122 }
125 123
126 } // namespace blink 124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698