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

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

Issue 2128193004: Update FilterEffect colorspace on color-interpolation-filters changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle(); 67 const SVGComputedStyle& svgStyle = layoutObject()->styleRef().svgStyle();
68 if (attrName == SVGNames::flood_colorAttr) { 68 if (attrName == SVGNames::flood_colorAttr) {
69 dropShadow->setShadowColor(svgStyle.floodColor()); 69 dropShadow->setShadowColor(svgStyle.floodColor());
70 return true; 70 return true;
71 } 71 }
72 if (attrName == SVGNames::flood_opacityAttr) { 72 if (attrName == SVGNames::flood_opacityAttr) {
73 dropShadow->setShadowOpacity(svgStyle.floodOpacity()); 73 dropShadow->setShadowOpacity(svgStyle.floodOpacity());
74 return true; 74 return true;
75 } 75 }
76 76 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect , attrName);
77 NOTREACHED();
78 return false;
79 } 77 }
80 78
81 void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName) 79 void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName)
82 { 80 {
83 if (attrName == SVGNames::inAttr 81 if (attrName == SVGNames::inAttr
84 || attrName == SVGNames::stdDeviationAttr 82 || attrName == SVGNames::stdDeviationAttr
85 || attrName == SVGNames::dxAttr 83 || attrName == SVGNames::dxAttr
86 || attrName == SVGNames::dyAttr) { 84 || attrName == SVGNames::dyAttr) {
87 SVGElement::InvalidationGuard invalidationGuard(this); 85 SVGElement::InvalidationGuard invalidationGuard(this);
88 invalidate(); 86 invalidate();
(...skipping 20 matching lines...) Expand all
109 107
110 // Clamp std.dev. to non-negative. (See SVGFEGaussianBlurElement::build) 108 // Clamp std.dev. to non-negative. (See SVGFEGaussianBlurElement::build)
111 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value()); 109 float stdDevX = std::max(0.0f, stdDeviationX()->currentValue()->value());
112 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value()); 110 float stdDevY = std::max(0.0f, stdDeviationY()->currentValue()->value());
113 FilterEffect* effect = FEDropShadow::create(filter, stdDevX, stdDevY, m_dx-> currentValue()->value(), m_dy->currentValue()->value(), color, opacity); 111 FilterEffect* effect = FEDropShadow::create(filter, stdDevX, stdDevY, m_dx-> currentValue()->value(), m_dy->currentValue()->value(), color, opacity);
114 effect->inputEffects().append(input1); 112 effect->inputEffects().append(input1);
115 return effect; 113 return effect;
116 } 114 }
117 115
118 } // namespace blink 116 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698