OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 || attrName == SVGNames::dyAttr) { | 92 || attrName == SVGNames::dyAttr) { |
93 invalidate(); | 93 invalidate(); |
94 return; | 94 return; |
95 } | 95 } |
96 | 96 |
97 ASSERT_NOT_REACHED(); | 97 ASSERT_NOT_REACHED(); |
98 } | 98 } |
99 | 99 |
100 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuil
der* filterBuilder, Filter* filter) | 100 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuil
der* filterBuilder, Filter* filter) |
101 { | 101 { |
102 LayoutObject* renderer = this->renderer(); | 102 LayoutObject* renderer = this->layoutObject(); |
103 if (!renderer) | 103 if (!renderer) |
104 return nullptr; | 104 return nullptr; |
105 | 105 |
106 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) | 106 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) |
107 return nullptr; | 107 return nullptr; |
108 | 108 |
109 ASSERT(renderer->style()); | 109 ASSERT(renderer->style()); |
110 const SVGLayoutStyle& svgStyle = renderer->style()->svgStyle(); | 110 const SVGLayoutStyle& svgStyle = renderer->style()->svgStyle(); |
111 | 111 |
112 Color color = svgStyle.floodColor(); | 112 Color color = svgStyle.floodColor(); |
113 float opacity = svgStyle.floodOpacity(); | 113 float opacity = svgStyle.floodOpacity(); |
114 | 114 |
115 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 115 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
116 if (!input1) | 116 if (!input1) |
117 return nullptr; | 117 return nullptr; |
118 | 118 |
119 RefPtrWillBeRawPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDe
viationX()->currentValue()->value(), stdDeviationY()->currentValue()->value(), m
_dx->currentValue()->value(), m_dy->currentValue()->value(), color, opacity); | 119 RefPtrWillBeRawPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDe
viationX()->currentValue()->value(), stdDeviationY()->currentValue()->value(), m
_dx->currentValue()->value(), m_dy->currentValue()->value(), color, opacity); |
120 effect->inputEffects().append(input1); | 120 effect->inputEffects().append(input1); |
121 return effect.release(); | 121 return effect.release(); |
122 } | 122 } |
123 | 123 |
124 } // namespace blink | 124 } // namespace blink |
OLD | NEW |