2010-04-20 Dirk Schulze <krit@webkit.org>
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 12:52:54 +0000 (12:52 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Apr 2010 12:52:54 +0000 (12:52 +0000)
commit1cdd92464e96ccec98f16e050c3911c01e52701a
tree0c6a88816e9005357fb87875d8a94dab7f91371b
parent4949d8f61d1ef99d12905695c755b88de0622fed
2010-04-20  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVGResourceFilter needs to be moved to under Renderers
        https://bugs.webkit.org/show_bug.cgi?id=35320

        This patch adds a renderer for SVGFilterElement. SVGFilterElement is now independent
        from the SVGResources.
        A clean-up solves the dependencies between SVGFilterElement, the filter primitives
        and SVGResources. This shall make the filter code more readable and better maintable.
        The Filter primitives get dumped now, as long as they have externalRepresentation
        implemented.

        No behavior changes, so no new tests were added.

        * Android.mk:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::paint):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::selfWillPaint):
        (WebCore::RenderSVGContainer::paint):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::paint):
        * rendering/RenderSVGResource.h:
        (WebCore::):
        (WebCore::RenderSVGResource::postApplyResource):
        * rendering/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::applyResource):
        * rendering/RenderSVGResourceClipper.h:
        * rendering/RenderSVGResourceFilter.cpp: Added.
        (WebCore::RenderSVGResourceFilter::RenderSVGResourceFilter):
        (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
        (WebCore::RenderSVGResourceFilter::invalidateClients):
        (WebCore::RenderSVGResourceFilter::invalidateClient):
        (WebCore::RenderSVGResourceFilter::buildPrimitives):
        (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize):
        (WebCore::RenderSVGResourceFilter::applyResource):
        (WebCore::RenderSVGResourceFilter::postApplyResource):
        (WebCore::RenderSVGResourceFilter::resourceBoundingBox):
        * rendering/RenderSVGResourceFilter.h: Added.
        (WebCore::FilterData::FilterData):
        (WebCore::RenderSVGResourceFilter::renderName):
        (WebCore::RenderSVGResourceFilter::filterUnits):
        (WebCore::RenderSVGResourceFilter::primitiveUnits):
        (WebCore::RenderSVGResourceFilter::resourceType):
        * rendering/RenderSVGResourceMarker.h:
        (WebCore::RenderSVGResourceMarker::applyResource):
        * rendering/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        * rendering/RenderSVGResourceMasker.h:
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::selfWillPaint):
        (WebCore::RenderSVGRoot::paint):
        * rendering/RenderSVGText.cpp:
        * rendering/SVGRenderSupport.cpp:
        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
        (WebCore::SVGRenderBase::finishRenderSVGContent):
        (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
        (WebCore::deregisterFromResources):
        * rendering/SVGRenderSupport.h:
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::writeStyle):
        (WebCore::writeSVGResource):
        (WebCore::writeResources):
        (WebCore::writeRenderResources):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::SVGRootInlineBoxPaintWalker):
        (WebCore::SVGRootInlineBox::paint):
        * svg/SVGFEBlendElement.cpp:
        (WebCore::SVGFEBlendElement::build):
        * svg/SVGFEBlendElement.h:
        * svg/SVGFEColorMatrixElement.cpp:
        (WebCore::SVGFEColorMatrixElement::build):
        * svg/SVGFEColorMatrixElement.h:
        * svg/SVGFEComponentTransferElement.cpp:
        (WebCore::SVGFEComponentTransferElement::build):
        * svg/SVGFEComponentTransferElement.h:
        * svg/SVGFECompositeElement.cpp:
        (WebCore::SVGFECompositeElement::build):
        * svg/SVGFECompositeElement.h:
        * svg/SVGFEDiffuseLightingElement.cpp:
        (WebCore::SVGFEDiffuseLightingElement::build):
        * svg/SVGFEDiffuseLightingElement.h:
        * svg/SVGFEDisplacementMapElement.cpp:
        (WebCore::SVGFEDisplacementMapElement::build):
        * svg/SVGFEDisplacementMapElement.h:
        * svg/SVGFEFloodElement.cpp:
        (WebCore::SVGFEFloodElement::build):
        * svg/SVGFEFloodElement.h:
        * svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::build):
        * svg/SVGFEGaussianBlurElement.h:
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::build):
        * svg/SVGFEImageElement.h:
        * svg/SVGFEMergeElement.cpp:
        (WebCore::SVGFEMergeElement::build):
        * svg/SVGFEMergeElement.h:
        * svg/SVGFEMorphologyElement.cpp:
        (WebCore::SVGFEMorphologyElement::build):
        * svg/SVGFEMorphologyElement.h:
        * svg/SVGFEOffsetElement.cpp:
        (WebCore::SVGFEOffsetElement::build):
        * svg/SVGFEOffsetElement.h:
        * svg/SVGFESpecularLightingElement.cpp:
        (WebCore::SVGFESpecularLightingElement::build):
        * svg/SVGFESpecularLightingElement.h:
        * svg/SVGFETileElement.cpp:
        (WebCore::SVGFETileElement::build):
        * svg/SVGFETileElement.h:
        * svg/SVGFETurbulenceElement.cpp:
        (WebCore::SVGFETurbulenceElement::build):
        * svg/SVGFETurbulenceElement.h:
        (WebCore::):
        * svg/SVGFilterElement.cpp:
        (WebCore::SVGFilterElement::createRenderer):
        * svg/SVGFilterElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        (WebCore::SVGFilterPrimitiveStandardAttributes::isFilterEffect):
        (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
        * svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::invalidateResources):
        * svg/graphics/SVGResource.cpp:
        * svg/graphics/SVGResource.h:
        (WebCore::):
        (WebCore::SVGResource::isPaintServer):
        * svg/graphics/SVGResourceFilter.cpp: Removed.
        * svg/graphics/SVGResourceFilter.h: Removed.
        * svg/graphics/filters/SVGFEDisplacementMap.cpp:
        (WebCore::FEDisplacementMap::externalRepresentation):
        * svg/graphics/filters/SVGFilterBuilder.h:
        (WebCore::SVGFilterBuilder::namedEffects):
2010-04-20  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVGResourceFilter needs to be moved to under Renderers
        https://bugs.webkit.org/show_bug.cgi?id=35320

        All SVG tests with filters need an update. A new renderer for
        SVGFilterElement was created. This renderer also dumps filter
        primitives as long as they have externalRepresentation implemented.

        * platform/gtk/svg/filters/filter-on-tspan-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-felem-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-image-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-light-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-specular-01-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-tile-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.txt:
        * platform/mac/svg/batik/filters/feTile-expected.txt:
        * platform/mac/svg/batik/filters/filterRegions-expected.txt:
        * platform/mac/svg/batik/text/textEffect-expected.txt:
        * platform/mac/svg/batik/text/textEffect3-expected.txt:
        * platform/mac/svg/batik/text/textFeatures-expected.txt:
        * platform/mac/svg/batik/text/textProperties-expected.txt:
        * platform/mac/svg/custom/empty-merge-expected.txt:
        * platform/mac/svg/custom/feComponentTransfer-Discrete-expected.txt:
        * platform/mac/svg/custom/feComponentTransfer-Gamma-expected.txt:
        * platform/mac/svg/custom/feComponentTransfer-Linear-expected.txt:
        * platform/mac/svg/custom/feComponentTransfer-Table-expected.txt:
        * platform/mac/svg/custom/feDisplacementMap-01-expected.txt:
        * platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt:
        * platform/mac/svg/custom/invalid-css-expected.txt:
        * platform/mac/svg/custom/non-opaque-filters-expected.txt:
        * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt:
        * platform/mac/svg/custom/text-filter-expected.txt:
        * platform/mac/svg/custom/visibility-override-filter-expected.txt:
        * platform/mac/svg/filters/big-sized-filter-2-expected.txt:
        * platform/mac/svg/filters/big-sized-filter-expected.txt:
        * platform/mac/svg/filters/feColorMatrix-values-expected.txt:
        * platform/mac/svg/filters/feComposite-expected.txt:
        * platform/mac/svg/filters/feDisplacementMap-expected.txt:
        * platform/mac/svg/filters/feGaussianBlur-expected.txt:
        * platform/mac/svg/filters/feMerge-expected.txt:
        * platform/mac/svg/filters/feMerge-wrong-input-expected.txt:
        * platform/mac/svg/filters/feOffset-expected.txt:
        * platform/mac/svg/filters/feTile-expected.txt:
        * platform/mac/svg/filters/filter-clip-expected.txt:
        * platform/mac/svg/filters/filter-on-tspan-expected.txt:
        * platform/mac/svg/filters/filter-source-position-expected.txt:
        * platform/mac/svg/filters/filterRes-expected.txt:
        * platform/mac/svg/filters/shadow-on-filter-expected.txt:
        * platform/mac/svg/filters/shadow-on-rect-with-filter-expected.txt:
        * platform/mac/svg/filters/sourceAlpha-expected.txt:
        * platform/mac/svg/filters/subRegion-in-userSpace-expected.txt:
        * platform/mac/svg/filters/subRegion-one-effect-expected.txt:
        * platform/mac/svg/filters/subRegion-two-effects-expected.txt:
        * platform/qt/svg/filters/feComposite-expected.txt:
        * platform/qt/svg/filters/feGaussianBlur-expected.txt:
        * platform/qt/svg/filters/feMerge-expected.txt:
        * platform/qt/svg/filters/feMerge-wrong-input-expected.txt:
        * platform/qt/svg/filters/feOffset-expected.txt:
        * platform/qt/svg/filters/feTile-expected.txt:
        * platform/qt/svg/filters/filter-on-tspan-expected.txt:
        * platform/qt/svg/filters/filter-source-position-expected.txt:
        * platform/qt/svg/filters/shadow-on-filter-expected.txt:
        * platform/qt/svg/filters/shadow-on-rect-with-filter-expected.txt:
        * platform/qt/svg/filters/sourceAlpha-expected.txt:
        * platform/qt/svg/filters/subRegion-in-userSpace-expected.txt:
        * platform/qt/svg/filters/subRegion-one-effect-expected.txt:
        * platform/qt/svg/filters/subRegion-two-effects-expected.txt:
        * platform/win/svg/custom/image-with-transform-clip-filter-expected.txt: Added.
        * platform/win/svg/filters/feColorMatrix-values-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
138 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/svg/filters/filter-on-tspan-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-conv-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-felem-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-image-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-light-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-specular-01-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-tile-01-b-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-turb-01-f-expected.txt
LayoutTests/platform/mac/svg/batik/filters/feTile-expected.txt
LayoutTests/platform/mac/svg/batik/filters/filterRegions-expected.txt
LayoutTests/platform/mac/svg/batik/text/textEffect-expected.txt
LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.txt
LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.txt
LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt
LayoutTests/platform/mac/svg/custom/empty-merge-expected.txt
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.txt
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.txt
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.txt
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.txt
LayoutTests/platform/mac/svg/custom/feDisplacementMap-01-expected.txt
LayoutTests/platform/mac/svg/custom/image-with-transform-clip-filter-expected.txt
LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt
LayoutTests/platform/mac/svg/custom/non-opaque-filters-expected.txt
LayoutTests/platform/mac/svg/custom/resource-invalidate-on-target-update-expected.txt
LayoutTests/platform/mac/svg/custom/text-filter-expected.txt
LayoutTests/platform/mac/svg/custom/visibility-override-filter-expected.txt
LayoutTests/platform/mac/svg/filters/big-sized-filter-2-expected.txt
LayoutTests/platform/mac/svg/filters/big-sized-filter-expected.txt
LayoutTests/platform/mac/svg/filters/feColorMatrix-values-expected.txt
LayoutTests/platform/mac/svg/filters/feComposite-expected.txt
LayoutTests/platform/mac/svg/filters/feDisplacementMap-expected.txt
LayoutTests/platform/mac/svg/filters/feGaussianBlur-expected.txt
LayoutTests/platform/mac/svg/filters/feMerge-expected.txt
LayoutTests/platform/mac/svg/filters/feMerge-wrong-input-expected.txt
LayoutTests/platform/mac/svg/filters/feOffset-expected.txt
LayoutTests/platform/mac/svg/filters/feTile-expected.txt
LayoutTests/platform/mac/svg/filters/filter-clip-expected.txt
LayoutTests/platform/mac/svg/filters/filter-on-tspan-expected.txt
LayoutTests/platform/mac/svg/filters/filter-source-position-expected.txt
LayoutTests/platform/mac/svg/filters/filterRes-expected.txt
LayoutTests/platform/mac/svg/filters/shadow-on-filter-expected.txt
LayoutTests/platform/mac/svg/filters/shadow-on-rect-with-filter-expected.txt
LayoutTests/platform/mac/svg/filters/sourceAlpha-expected.txt
LayoutTests/platform/mac/svg/filters/subRegion-in-userSpace-expected.txt
LayoutTests/platform/mac/svg/filters/subRegion-one-effect-expected.txt
LayoutTests/platform/mac/svg/filters/subRegion-two-effects-expected.txt
LayoutTests/platform/qt/svg/filters/feComposite-expected.txt
LayoutTests/platform/qt/svg/filters/feGaussianBlur-expected.txt
LayoutTests/platform/qt/svg/filters/feMerge-expected.txt
LayoutTests/platform/qt/svg/filters/feMerge-wrong-input-expected.txt
LayoutTests/platform/qt/svg/filters/feOffset-expected.txt
LayoutTests/platform/qt/svg/filters/feTile-expected.txt
LayoutTests/platform/qt/svg/filters/filter-on-tspan-expected.txt
LayoutTests/platform/qt/svg/filters/filter-source-position-expected.txt
LayoutTests/platform/qt/svg/filters/shadow-on-filter-expected.txt
LayoutTests/platform/qt/svg/filters/shadow-on-rect-with-filter-expected.txt
LayoutTests/platform/qt/svg/filters/sourceAlpha-expected.txt
LayoutTests/platform/qt/svg/filters/subRegion-in-userSpace-expected.txt
LayoutTests/platform/qt/svg/filters/subRegion-one-effect-expected.txt
LayoutTests/platform/qt/svg/filters/subRegion-two-effects-expected.txt
LayoutTests/platform/win/svg/custom/image-with-transform-clip-filter-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/svg/filters/feColorMatrix-values-expected.txt
WebCore/Android.mk
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderSVGContainer.cpp
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/RenderSVGResource.h
WebCore/rendering/RenderSVGResourceClipper.cpp
WebCore/rendering/RenderSVGResourceClipper.h
WebCore/rendering/RenderSVGResourceFilter.cpp [new file with mode: 0644]
WebCore/rendering/RenderSVGResourceFilter.h [new file with mode: 0644]
WebCore/rendering/RenderSVGResourceMarker.h
WebCore/rendering/RenderSVGResourceMasker.cpp
WebCore/rendering/RenderSVGResourceMasker.h
WebCore/rendering/RenderSVGRoot.cpp
WebCore/rendering/RenderSVGText.cpp
WebCore/rendering/SVGRenderSupport.cpp
WebCore/rendering/SVGRenderSupport.h
WebCore/rendering/SVGRenderTreeAsText.cpp
WebCore/rendering/SVGRootInlineBox.cpp
WebCore/svg/SVGFEBlendElement.cpp
WebCore/svg/SVGFEBlendElement.h
WebCore/svg/SVGFEColorMatrixElement.cpp
WebCore/svg/SVGFEColorMatrixElement.h
WebCore/svg/SVGFEComponentTransferElement.cpp
WebCore/svg/SVGFEComponentTransferElement.h
WebCore/svg/SVGFECompositeElement.cpp
WebCore/svg/SVGFECompositeElement.h
WebCore/svg/SVGFEDiffuseLightingElement.cpp
WebCore/svg/SVGFEDiffuseLightingElement.h
WebCore/svg/SVGFEDisplacementMapElement.cpp
WebCore/svg/SVGFEDisplacementMapElement.h
WebCore/svg/SVGFEFloodElement.cpp
WebCore/svg/SVGFEFloodElement.h
WebCore/svg/SVGFEGaussianBlurElement.cpp
WebCore/svg/SVGFEGaussianBlurElement.h
WebCore/svg/SVGFEImageElement.cpp
WebCore/svg/SVGFEImageElement.h
WebCore/svg/SVGFEMergeElement.cpp
WebCore/svg/SVGFEMergeElement.h
WebCore/svg/SVGFEMorphologyElement.cpp
WebCore/svg/SVGFEMorphologyElement.h
WebCore/svg/SVGFEOffsetElement.cpp
WebCore/svg/SVGFEOffsetElement.h
WebCore/svg/SVGFESpecularLightingElement.cpp
WebCore/svg/SVGFESpecularLightingElement.h
WebCore/svg/SVGFETileElement.cpp
WebCore/svg/SVGFETileElement.h
WebCore/svg/SVGFETurbulenceElement.cpp
WebCore/svg/SVGFETurbulenceElement.h
WebCore/svg/SVGFilterElement.cpp
WebCore/svg/SVGFilterElement.h
WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
WebCore/svg/SVGStyledElement.cpp
WebCore/svg/graphics/SVGResource.cpp
WebCore/svg/graphics/SVGResource.h
WebCore/svg/graphics/SVGResourceFilter.cpp [deleted file]
WebCore/svg/graphics/SVGResourceFilter.h [deleted file]
WebCore/svg/graphics/filters/SVGFEDisplacementMap.cpp
WebCore/svg/graphics/filters/SVGFilterBuilder.h