2011-11-10 Nikolas Zimmermann <nzimmermann@rim.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 15:33:06 +0000 (15:33 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 15:33:06 +0000 (15:33 +0000)
commit5f3d2e98b280631750d5d35d980ac499ff132ec7
tree35d44c541ef528a6c684b20fdb31b9f76976e495
parenta5807453f0c861922d2ee7f3d5ec82edfce8f313
2011-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>

        Move unit resolving for all resources to rendering/
        https://bugs.webkit.org/show_bug.cgi?id=72011

        Reviewed by Andreas Kling.

        Update expected results for some filters tests, now that their bounding box is correctly dumped.

        * platform/mac/svg/batik/text/textEffect-expected.txt:
        * platform/mac/svg/batik/text/textEffect3-expected.txt:
        * platform/mac/svg/custom/text-filter-expected.txt:
        * platform/mac/svg/filters/feColorMatrix-values-expected.txt:
        * platform/mac/svg/filters/feMerge-wrong-input-expected.txt:
        * platform/mac/svg/filters/filter-on-filter-for-text-expected.txt:
        * platform/mac/svg/filters/filter-on-tspan-expected.txt:

2011-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>

        Move unit resolving for all resources to rendering/
        https://bugs.webkit.org/show_bug.cgi?id=72011

        Reviewed by Andreas Kling.

        Remove maskBoundingBox()/filterBoundingBox(), to avoid doing length resolution in svg/.
        RenderSVGResource* now uses SVGLengthContext::resolveRectangle, to do this while laying out.

        Move linear gradient start/end point, radial gradient focal/center point, radius calculations into
        their RenderSVGResource classes, cleanup code a bit.

        Convert filters to use SVGLengthContext. Fix DRT dumps for filters, while I'm at it, to give
        meaningful values, when objectBoundingBox is used as primitive units, when applying to <text>/<tspan>s.

        Several tests results need rebaselines on all platforms.

        * platform/graphics/filters/Filter.h:
        * rendering/svg/RenderSVGInlineText.h:
        (WebCore::RenderSVGInlineText::objectBoundingBox):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::buildPrimitives):
        (WebCore::RenderSVGResourceFilter::applyResource):
        (WebCore::RenderSVGResourceFilter::resourceBoundingBox):
        * rendering/svg/RenderSVGResourceFilter.h:
        * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
        (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::RenderSVGResourceGradient::applyResource):
        * rendering/svg/RenderSVGResourceGradient.h:
        * rendering/svg/RenderSVGResourceLinearGradient.cpp:
        (WebCore::RenderSVGResourceLinearGradient::startPoint):
        (WebCore::RenderSVGResourceLinearGradient::endPoint):
        (WebCore::RenderSVGResourceLinearGradient::buildGradient):
        * rendering/svg/RenderSVGResourceLinearGradient.h:
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
        * rendering/svg/RenderSVGResourceRadialGradient.cpp:
        (WebCore::RenderSVGResourceRadialGradient::centerPoint):
        (WebCore::RenderSVGResourceRadialGradient::focalPoint):
        (WebCore::RenderSVGResourceRadialGradient::radius):
        (WebCore::RenderSVGResourceRadialGradient::adjustFocalPointIfNeeded):
        (WebCore::RenderSVGResourceRadialGradient::buildGradient):
        * rendering/svg/RenderSVGResourceRadialGradient.h:
        * rendering/svg/SVGRenderTreeAsText.cpp:
        (WebCore::writeSVGResourceContainer):
        * svg/SVGFilterElement.cpp:
        * svg/SVGFilterElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        * svg/SVGLinearGradientElement.cpp:
        * svg/SVGLinearGradientElement.h:
        * svg/SVGMaskElement.cpp:
        * svg/SVGMaskElement.h:
        * svg/SVGRadialGradientElement.cpp:
        * svg/SVGRadialGradientElement.h:
        * svg/graphics/filters/SVGFilter.h:
        (WebCore::SVGFilter::filterRegionInUserSpace):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/batik/text/textEffect-expected.txt
LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.txt
LayoutTests/platform/mac/svg/custom/text-filter-expected.txt
LayoutTests/platform/mac/svg/filters/feColorMatrix-values-expected.txt
LayoutTests/platform/mac/svg/filters/feMerge-wrong-input-expected.txt
LayoutTests/platform/mac/svg/filters/filter-on-filter-for-text-expected.txt
LayoutTests/platform/mac/svg/filters/filter-on-tspan-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/Filter.h
Source/WebCore/rendering/svg/RenderSVGInlineText.h
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.h
Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.h
Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.h
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.h
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
Source/WebCore/svg/SVGFilterElement.cpp
Source/WebCore/svg/SVGFilterElement.h
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
Source/WebCore/svg/SVGLinearGradientElement.cpp
Source/WebCore/svg/SVGLinearGradientElement.h
Source/WebCore/svg/SVGMaskElement.cpp
Source/WebCore/svg/SVGMaskElement.h
Source/WebCore/svg/SVGRadialGradientElement.cpp
Source/WebCore/svg/SVGRadialGradientElement.h
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/filters/SVGFilter.h