| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return; | 116 return; |
| 117 } | 117 } |
| 118 | 118 |
| 119 ASSERT_NOT_REACHED(); | 119 ASSERT_NOT_REACHED(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 PassRefPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuilder* filterB
uilder, Filter* filter) | 122 PassRefPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuilder* filterB
uilder, Filter* filter) |
| 123 { | 123 { |
| 124 RenderObject* renderer = this->renderer(); | 124 RenderObject* renderer = this->renderer(); |
| 125 if (!renderer) | 125 if (!renderer) |
| 126 return 0; | 126 return nullptr; |
| 127 | 127 |
| 128 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) | 128 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) |
| 129 return 0; | 129 return nullptr; |
| 130 | 130 |
| 131 ASSERT(renderer->style()); | 131 ASSERT(renderer->style()); |
| 132 const SVGRenderStyle* svgStyle = renderer->style()->svgStyle(); | 132 const SVGRenderStyle* svgStyle = renderer->style()->svgStyle(); |
| 133 | 133 |
| 134 Color color = svgStyle->floodColor(); | 134 Color color = svgStyle->floodColor(); |
| 135 float opacity = svgStyle->floodOpacity(); | 135 float opacity = svgStyle->floodOpacity(); |
| 136 | 136 |
| 137 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 137 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
| 138 if (!input1) | 138 if (!input1) |
| 139 return 0; | 139 return nullptr; |
| 140 | 140 |
| 141 RefPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDeviationX()->
currentValue()->value(), stdDeviationY()->currentValue()->value(), m_dx->current
Value()->value(), m_dy->currentValue()->value(), color, opacity); | 141 RefPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDeviationX()->
currentValue()->value(), stdDeviationY()->currentValue()->value(), m_dx->current
Value()->value(), m_dy->currentValue()->value(), color, opacity); |
| 142 effect->inputEffects().append(input1); | 142 effect->inputEffects().append(input1); |
| 143 return effect.release(); | 143 return effect.release(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } | 146 } |
| OLD | NEW |