haikuwebkit/LayoutTests/svg/dynamic-updates/SVGFEGaussianBlurElement-sv...

14 lines
433 B
Plaintext
Raw Permalink Normal View History

Source/WebCore: Add 'edgeMode' attribute to SVGFEGaussianBlur https://bugs.webkit.org/show_bug.cgi?id=120582 Add 'edgeMode' attribute to the SVGFEGaussianBlur element. This attribute allows users to define the behavior on edges with the values 'none' where pixel values outside the input image are treated as transparent black. (The current blurring behavior.) 'duplicate' which repeats the values on the nearest edge and 'warp', which takes the pixel of the opposite site of the input image. Beside the attribute, this patch implements the behavior of 'duplicate'. http://dev.w3.org/fxtf/filters/#feGaussianBlurEdgeModeAttribute Reviewed by Rob Buis. Tests: svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg svg/filters/svg-gaussianblur-edgeMode-duplicate.svg * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::FEGaussianBlur): (WebCore::FEGaussianBlur::create): (WebCore::FEGaussianBlur::edgeMode): (WebCore::FEGaussianBlur::setEdgeMode): (WebCore::boxBlur): (WebCore::FEGaussianBlur::platformApplyGeneric): (WebCore::FEGaussianBlur::determineAbsolutePaintRect): * platform/graphics/filters/FEGaussianBlur.h: * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement): (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): (WebCore::SVGFEGaussianBlurElement::parseAttribute): (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): (WebCore::SVGFEGaussianBlurElement::build): * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEGaussianBlurElement.idl: LayoutTests: Add edgeMode attribtue. Add 'edgeMode' attribute to SVGFEGaussianBlur https://bugs.webkit.org/show_bug.cgi?id=120582 Added DOM and SVGDOM tests for the attribute 'edgeMode'. Also added a reftest to test edgeMode='duplicate'. Reviewed by Rob Buis. * platform/mac/svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop-expected.png: Added. * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr-expected.txt: Added. * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-edgeMode-attr.html: Added. * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop-expected.txt: Added. * svg/dynamic-updates/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.html: Added. * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-dom-edgeMode-attr.js: Added. (repaintTest): * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-edgeMode-prop.js: Added. (repaintTest): * svg/filters/svg-gaussianblur-edgeMode-duplicate-expected.svg: Added. * svg/filters/svg-gaussianblur-edgeMode-duplicate.svg: Added. Canonical link: https://commits.webkit.org/138574@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-02 04:53:46 +00:00
SVG 1.1 dynamic update tests
Tests dynamic updates of the 'edgeMode' property of the SVGFEGaussianBlurElement object
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS gaussianBlurElement.edgeMode.baseVal is SVGFEGaussianBlurElement.SVG_EDGEMODE_WRAP
PASS gaussianBlurElement.edgeMode.baseVal is SVGFEGaussianBlurElement.SVG_EDGEMODE_DUPLICATE
PASS successfullyParsed is true
TEST COMPLETE