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

Unified Diff: Source/core/rendering/svg/ReferenceFilterBuilder.cpp

Issue 21042009: [SVG2] Merge SVGStyledElement into SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/svg/RenderSVGContainer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/ReferenceFilterBuilder.cpp
diff --git a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
index b78922a10eeac94b7f847697afe4c2a1b9634fa4..11ce00e5e3d5b4c1040e6df3fbb76ec7e2774d6c 100644
--- a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
+++ b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
@@ -44,13 +44,13 @@
namespace WebCore {
-// Returns whether or not the SVGStyledElement object contains a valid color-interpolation-filters attribute
-static bool getSVGStyledElementColorSpace(SVGStyledElement* svgStyledElement, ColorSpace& cs)
+// Returns whether or not the SVGElement object contains a valid color-interpolation-filters attribute
+static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs)
{
- if (!svgStyledElement)
+ if (!svgElement)
return false;
- const RenderObject* renderer = svgStyledElement->renderer();
+ const RenderObject* renderer = svgElement->renderer();
const RenderStyle* style = renderer ? renderer->style() : 0;
const SVGRenderStyle* svgStyle = style ? style->svgStyle() : 0;
EColorInterpolation eColorInterpolation = CI_AUTO;
@@ -59,7 +59,7 @@ static bool getSVGStyledElementColorSpace(SVGStyledElement* svgStyledElement, Co
eColorInterpolation = svgStyle->colorInterpolationFilters();
} else {
// Otherwise, use the slow path by using string comparison (used by external svg files)
- RefPtr<CSSValue> cssValue = svgStyledElement->getPresentationAttribute(
+ RefPtr<CSSValue> cssValue = svgElement->getPresentationAttribute(
SVGNames::color_interpolation_filtersAttr.toString());
if (cssValue.get() && cssValue->isPrimitiveValue()) {
const CSSPrimitiveValue& primitiveValue = *((CSSPrimitiveValue*)cssValue.get());
@@ -125,7 +125,7 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren
RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(previousEffect, SourceAlpha::create(parentFilter));
ColorSpace filterColorSpace = ColorSpaceDeviceRGB;
- bool useFilterColorSpace = getSVGStyledElementColorSpace(filterElement, filterColorSpace);
+ bool useFilterColorSpace = getSVGElementColorSpace(filterElement, filterColorSpace);
for (Node* node = filterElement->firstChild(); node; node = node->nextSibling()) {
if (!node->isSVGElement())
@@ -144,7 +144,7 @@ PassRefPtr<FilterEffect> ReferenceFilterBuilder::build(Filter* parentFilter, Ren
effectElement->setStandardAttributes(effect.get());
effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrentValue(), parentFilter->sourceImageRect()));
ColorSpace colorSpace = filterColorSpace;
- if (useFilterColorSpace || getSVGStyledElementColorSpace(effectElement, colorSpace))
+ if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorSpace))
effect->setOperatingColorSpace(colorSpace);
builder->add(effectElement->resultCurrentValue(), effect);
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/svg/RenderSVGContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698