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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 if (!layoutObject) | 80 if (!layoutObject) |
81 return nullptr; | 81 return nullptr; |
82 | 82 |
83 ASSERT(layoutObject->style()); | 83 ASSERT(layoutObject->style()); |
84 const SVGComputedStyle& svgStyle = layoutObject->style()->svgStyle(); | 84 const SVGComputedStyle& svgStyle = layoutObject->style()->svgStyle(); |
85 | 85 |
86 Color color = svgStyle.floodColor(); | 86 Color color = svgStyle.floodColor(); |
87 float opacity = svgStyle.floodOpacity(); | 87 float opacity = svgStyle.floodOpacity(); |
88 | 88 |
89 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 89 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
90 if (!input1) | 90 ASSERT(input1); |
91 return nullptr; | |
92 | 91 |
93 // Clamp std.dev. to non-negative. (See SVGFEGaussianBlurElement::build) | 92 // Clamp std.dev. to non-negative. (See SVGFEGaussianBlurElement::build) |
94 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value()); | 93 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value()); |
95 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value()); | 94 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value()); |
96 RefPtrWillBeRawPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDe
vX, stdDevY, m_dx->currentValue()->value(), m_dy->currentValue()->value(), color
, opacity); | 95 RefPtrWillBeRawPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDe
vX, stdDevY, m_dx->currentValue()->value(), m_dy->currentValue()->value(), color
, opacity); |
97 effect->inputEffects().append(input1); | 96 effect->inputEffects().append(input1); |
98 return effect.release(); | 97 return effect.release(); |
99 } | 98 } |
100 | 99 |
101 } // namespace blink | 100 } // namespace blink |
OLD | NEW |