Commit 2bbdd98c authored by rob.buis@samsung.com's avatar rob.buis@samsung.com

Avoid using getPresentationAttribute in ReferenceFilterBuilder

Avoid using getPresentationAttribute in ReferenceFilterBuilder because it is deprecated, instead use getPropertyValue. This is the last internal use of getPresentationAttribute so a follow-up patch can remove it.

Review URL: https://codereview.chromium.org/201463003

git-svn-id: svn://svn.chromium.org/blink/trunk@169780 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2e1a94e9
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "SVGNames.h" #include "SVGNames.h"
#include "core/css/CSSPrimitiveValue.h" #include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSPrimitiveValueMappings.h" #include "core/css/CSSPrimitiveValueMappings.h"
#include "core/css/StylePropertySet.h"
#include "core/dom/Element.h" #include "core/dom/Element.h"
#include "core/fetch/DocumentResource.h" #include "core/fetch/DocumentResource.h"
#include "core/rendering/svg/RenderSVGResourceFilter.h" #include "core/rendering/svg/RenderSVGResourceFilter.h"
...@@ -80,9 +81,11 @@ static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs) ...@@ -80,9 +81,11 @@ static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs)
if (svgStyle) { if (svgStyle) {
// If a layout has been performed, then we can use the fast path to get this attribute // If a layout has been performed, then we can use the fast path to get this attribute
eColorInterpolation = svgStyle->colorInterpolationFilters(); eColorInterpolation = svgStyle->colorInterpolationFilters();
} else if (!svgElement->presentationAttributeStyle()) {
return false;
} else { } else {
// Otherwise, use the slow path by using string comparison (used by external svg files) // Otherwise, use the slow path by using string comparison (used by external svg files)
RefPtrWillBeRawPtr<CSSValue> cssValue = svgElement->getPresentationAttribute(AtomicString(SVGNames::color_interpolation_filtersAttr.toString())); RefPtrWillBeRawPtr<CSSValue> cssValue = svgElement->presentationAttributeStyle()->getPropertyCSSValue(CSSPropertyColorInterpolationFilters);
if (cssValue.get() && cssValue->isPrimitiveValue()) { if (cssValue.get() && cssValue->isPrimitiveValue()) {
const CSSPrimitiveValue& primitiveValue = *((CSSPrimitiveValue*)cssValue.get()); const CSSPrimitiveValue& primitiveValue = *((CSSPrimitiveValue*)cssValue.get());
eColorInterpolation = (EColorInterpolation)primitiveValue; eColorInterpolation = (EColorInterpolation)primitiveValue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment