2006-01-22 Alexander Kellett <lypanov@kde.org>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Jan 2006 09:57:32 +0000 (09:57 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Jan 2006 09:57:32 +0000 (09:57 +0000)
        Reviewed by eseidel.

        Add support for custom fill/strokes on text.
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6448

        * kcanvas/RenderSVGText.cpp:
        (RenderSVGText::paint): use new painter setup/teardown infrastructure
        * kcanvas/device/KRenderingPaintServer.h:
        (KRenderingPaintServer::KRenderingPaintServer):
        (KRenderingPaintServer::setup):
        (KRenderingPaintServer::render):
        (KRenderingPaintServer::teardown):
        (KRenderingPaintServer::isPaintingText):
        (KRenderingPaintServer::setPaintingText):
        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
        (setupShadingWithStyle):
        (renderShadingWithStyle):
        (teardownShadingWithStyle):
        (KRenderingPaintServerLinearGradientQuartz::draw):
        (KRenderingPaintServerLinearGradientQuartz::setup):
        (KRenderingPaintServerLinearGradientQuartz::render):
        (KRenderingPaintServerLinearGradientQuartz::teardown):
        (KRenderingPaintServerRadialGradientQuartz::draw):
        (KRenderingPaintServerRadialGradientQuartz::setup):
        (KRenderingPaintServerRadialGradientQuartz::render):
        (KRenderingPaintServerRadialGradientQuartz::teardown):
        * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
        (KRenderingPaintServerPatternQuartz::KRenderingPaintServerPatternQuartz):
        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
        (KRenderingPaintServerQuartzHelper::strokePath):
        (KRenderingPaintServerQuartzHelper::clipToStrokePath):
        (KRenderingPaintServerQuartzHelper::fillPath):
        (KRenderingPaintServerQuartzHelper::clipToFillPath):
        (KRenderingPaintServerSolidQuartz::draw):
        (KRenderingPaintServerSolidQuartz::setup):
        (KRenderingPaintServerSolidQuartz::render):
        (KRenderingPaintServerSolidQuartz::teardown):
        (KRenderingPaintServerPatternQuartz::draw):
        (KRenderingPaintServerPatternQuartz::setup):
        (KRenderingPaintServerPatternQuartz::render):
        (KRenderingPaintServerPatternQuartz::teardown):
        * kcanvas/device/quartz/QuartzSupport.h: fix prototype
        * kcanvas/device/quartz/QuartzSupport.mm:
        (applyStrokeStyleToContext):
        * ksvg2/misc/KCanvasRenderingStyle.cpp:
        (KSVGPainterFactory::fillPaintServer):
        (KSVGPainterFactory::strokePaintServer):
        (KSVGPainterFactory::cssPrimitiveToLength):
        (KSVGPainterFactory::strokePainter):
        (KSVGPainterFactory::fillPainter):
        * ksvg2/misc/KCanvasRenderingStyle.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12281 268f45cc-cd09-0410-ab3c-d52691b4dbfc

120 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/W3C-SVG-1.1/animate-elem-02-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-02-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-04-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-04-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-05-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-05-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-06-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-06-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-07-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-07-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-08-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-13-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-13-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-14-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-14-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-15-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-15-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-16-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-16-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-17-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-17-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-18-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-18-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-19-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-19-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-20-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-20-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-21-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-21-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-24-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-24-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/animate-elem-29-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png
LayoutTests/svg/W3C-SVG-1.1/interact-events-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/interact-events-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/linking-uri-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/linking-uri-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/linking-uri-02-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/linking-uri-02-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/masking-mask-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/masking-path-04-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/masking-path-04-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/painting-fill-02-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/painting-fill-02-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/render-elems-06-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/render-elems-06-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/render-elems-07-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/render-elems-07-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/render-elems-08-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/render-elems-08-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-align-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-align-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-align-03-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-align-03-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-align-04-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-align-04-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-align-05-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-align-05-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-deco-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-deco-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-fonts-01-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-fonts-01-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-fonts-02-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-fonts-02-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-text-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-text-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-text-03-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-text-03-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-tref-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-tref-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-tspan-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-tspan-01-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-ws-01-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-ws-01-t-expected.png
LayoutTests/svg/W3C-SVG-1.1/text-ws-02-t-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/text-ws-02-t-expected.png
LayoutTests/svg/custom/text-clip-expected.checksum
LayoutTests/svg/custom/text-clip-expected.png
LayoutTests/svg/custom/text-filter-expected.checksum
LayoutTests/svg/custom/text-filter-expected.png
LayoutTests/svg/custom/text-image-opacity-expected.checksum
LayoutTests/svg/custom/text-image-opacity-expected.png
WebCore/ChangeLog
WebCore/kcanvas/KCanvasResources.cpp
WebCore/kcanvas/KCanvasTypes.h [deleted file]
WebCore/kcanvas/RenderSVGText.cpp
WebCore/kcanvas/device/KRenderingPaintServer.h
WebCore/kcanvas/device/KRenderingPaintServerGradient.h
WebCore/kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.h
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm
WebCore/kcanvas/device/quartz/QuartzSupport.h
WebCore/kcanvas/device/quartz/QuartzSupport.mm
WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp
WebCore/ksvg2/misc/KCanvasRenderingStyle.h

index 45991c81ba9c63c1bf1a622e54033f380e27b15a..5c7d905d7ad7f7969ee66992fee85037bec231d2 100644 (file)
@@ -1,3 +1,117 @@
+2006-01-22  Alexander Kellett  <lypanov@kde.org>
+
+        Reviewed by eseidel.
+
+        Add support for custom fill/strokes on text.
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=6448
+
+        * svg/W3C-SVG-1.1/animate-elem-02-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-02-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-03-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-04-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-04-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-05-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-05-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-06-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-06-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-07-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-07-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-08-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-08-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-13-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-13-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-14-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-14-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-15-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-15-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-16-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-16-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-17-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-17-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-18-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-18-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-19-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-19-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-20-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-20-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-21-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-21-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-24-t-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-24-t-expected.png:
+        * svg/W3C-SVG-1.1/animate-elem-29-b-expected.checksum:
+        * svg/W3C-SVG-1.1/animate-elem-29-b-expected.png:
+        * svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/filters-blend-01-b-expected.png:
+        * svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
+        * svg/W3C-SVG-1.1/fonts-elem-02-t-expected.checksum:
+        * svg/W3C-SVG-1.1/fonts-elem-02-t-expected.png:
+        * svg/W3C-SVG-1.1/interact-cursor-01-f-expected.checksum:
+        * svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png:
+        * svg/W3C-SVG-1.1/interact-events-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/interact-events-01-b-expected.png:
+        * svg/W3C-SVG-1.1/linking-uri-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/linking-uri-01-b-expected.png:
+        * svg/W3C-SVG-1.1/linking-uri-02-b-expected.checksum:
+        * svg/W3C-SVG-1.1/linking-uri-02-b-expected.png:
+        * svg/W3C-SVG-1.1/masking-mask-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/masking-mask-01-b-expected.png:
+        * svg/W3C-SVG-1.1/masking-path-04-b-expected.checksum:
+        * svg/W3C-SVG-1.1/masking-path-04-b-expected.png:
+        * svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/metadata-example-01-b-expected.png:
+        * svg/W3C-SVG-1.1/painting-fill-02-t-expected.checksum:
+        * svg/W3C-SVG-1.1/painting-fill-02-t-expected.png:
+        * svg/W3C-SVG-1.1/pservers-grad-05-b-expected.checksum:
+        * svg/W3C-SVG-1.1/pservers-grad-05-b-expected.png:
+        * svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum:
+        * svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
+        * svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum:
+        * svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png:
+        * svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png:
+        * svg/W3C-SVG-1.1/render-elems-06-t-expected.checksum:
+        * svg/W3C-SVG-1.1/render-elems-06-t-expected.png:
+        * svg/W3C-SVG-1.1/render-elems-07-t-expected.checksum:
+        * svg/W3C-SVG-1.1/render-elems-07-t-expected.png:
+        * svg/W3C-SVG-1.1/render-elems-08-t-expected.checksum:
+        * svg/W3C-SVG-1.1/render-elems-08-t-expected.png:
+        * svg/W3C-SVG-1.1/text-align-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-align-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-align-03-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-align-03-b-expected.png:
+        * svg/W3C-SVG-1.1/text-align-04-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-align-04-b-expected.png:
+        * svg/W3C-SVG-1.1/text-align-05-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-align-05-b-expected.png:
+        * svg/W3C-SVG-1.1/text-altglyph-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-deco-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-deco-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-fonts-01-t-expected.checksum:
+        * svg/W3C-SVG-1.1/text-fonts-01-t-expected.png:
+        * svg/W3C-SVG-1.1/text-fonts-02-t-expected.checksum:
+        * svg/W3C-SVG-1.1/text-fonts-02-t-expected.png:
+        * svg/W3C-SVG-1.1/text-text-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-text-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-text-03-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-text-03-b-expected.png:
+        * svg/W3C-SVG-1.1/text-tref-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-tref-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-tspan-01-b-expected.checksum:
+        * svg/W3C-SVG-1.1/text-tspan-01-b-expected.png:
+        * svg/W3C-SVG-1.1/text-ws-01-t-expected.checksum:
+        * svg/W3C-SVG-1.1/text-ws-01-t-expected.png:
+        * svg/W3C-SVG-1.1/text-ws-02-t-expected.checksum:
+        * svg/W3C-SVG-1.1/text-ws-02-t-expected.png:
+        * svg/custom/text-clip-expected.checksum:
+        * svg/custom/text-clip-expected.png:
+        * svg/custom/text-filter-expected.checksum:
+        * svg/custom/text-filter-expected.png:
+        * svg/custom/text-image-opacity-expected.checksum:
+        * svg/custom/text-image-opacity-expected.png:
+
 2006-01-21  Anders Carlsson  <andersca@mac.com>
 
         Reviewed by Darin.
index 1861e88071fffa337c344141f55075970471a36b..40765f2c1a00fdc3736b567fadf37110ca14c241 100644 (file)
@@ -1 +1 @@
-2128e4c830bd2cb6985038ffb2bd1454
\ No newline at end of file
+0537805e7bfd6deb13d1ee62b0a505f3
\ No newline at end of file
index fdaf7fef90fd8f4fee04867786f95b11dee296d6..9d03f7a01c71aaedba004b6810946c117924d9f6 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-02-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-02-t-expected.png differ
index 2335c72938597ee97efba392ff554e4114605d0f..015ac5d4b15721ae0aff640bf66b4349848df542 100644 (file)
@@ -1 +1 @@
-bfc2b987888bfb30c08276779891260e
\ No newline at end of file
+d531c235dd377eeb4a19aeff30c86d3c
\ No newline at end of file
index 5aae98e0abf8d5eba6ddb8b0ca87e1a7600ca434..f54ddd1b7fda6a3c70ea2f80e2618f440a0de125 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png differ
index 77df0f86d94f958dac8b6def40667c2344fa2498..79e854633243104bcde929f8d3e8b7b9514616ef 100644 (file)
@@ -1 +1 @@
-c5013b99c76a1f55ed482151c853eea4
\ No newline at end of file
+47a61cfa38b6ebae325841e1c5debbeb
\ No newline at end of file
index 04390c6a3e5a690416c2646cb8dffe57eddba99f..1c232d053f6ad31d3ead9701f3b008b1350beedf 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-04-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-04-t-expected.png differ
index 0bb803faa74d4ce67e7502c17e829485e0410397..70717d37a368acfe9851b3a5d1ca9ace10acc3ce 100644 (file)
@@ -1 +1 @@
-4e7419685f377af2910c21fa33727a59
\ No newline at end of file
+3f757ecc3ed2d330e01a400cebaa7f10
\ No newline at end of file
index 1bdf805624c6f7c6b51e97a4f1f73b92eef1c334..2a2af063791cf6e03509fbb72219b25e1fa12b53 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-05-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-05-t-expected.png differ
index 420c702b0d90e77874f84aebe0c3dea6b47f0b0c..f62a736d61ad99140504e3fb19f9d93113c96f7e 100644 (file)
@@ -1 +1 @@
-0705a8cc0ebdc593e347f804aaabff57
\ No newline at end of file
+df7ccca643776c8444639fcebb994492
\ No newline at end of file
index 91d85a9536a1d36075e6cdb1c94cace8b481bc75..65c5cc06cdb65d8e9fdc2fbffec1f21079d31167 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-06-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-06-t-expected.png differ
index 7e758fabf86fe15cddc3a0def2ccf3f2a95deb5d..45938d2109ac9bb137f6f3587cd8abe6f81da2d7 100644 (file)
@@ -1 +1 @@
-32c82ec3a545e08b624b45510abc8509
\ No newline at end of file
+1ca944932e31195355983a885b748700
\ No newline at end of file
index 1719bc9e58aabd5f87df86e6464882b16a8571c6..aebbdc77b7288ce79dc52f9847ff4c64eeb136f9 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-07-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-07-t-expected.png differ
index a10a57ebff8d2df53413540f6114b7bd3d30293d..155df7a291d4a681f752f1870a580622ae33bfd2 100644 (file)
@@ -1 +1 @@
-60c62a35f8b73c9dda531a0811f34064
\ No newline at end of file
+87be7dc5f659cd1c8242081aad84ce40
\ No newline at end of file
index 277907b7f78edbdf9ccb60445a39c3ee4f0ebcf0..c93fad6dd3b28270349c8f247e894d5496e43d62 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png differ
index 56214caa03b7f6bc1d462eb0be6c69a2b70b6fb5..c763087665f09491d5f6f20b581b8c8dcd30c91d 100644 (file)
@@ -1 +1 @@
-4231451aed04abec96930a01ee5d71a9
\ No newline at end of file
+1991c0e8c3cf364455f75ea6fc2f9719
\ No newline at end of file
index f4f4be4f6e9fbedeb1da68c4d313d75b7bb66d97..2d441335a6f25a6d05e18a41474e1b6c831de4ec 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-13-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-13-t-expected.png differ
index e8d40d66115a725f226bf05b08892ceb58dc9e0e..3877ea38e5872432bbd6b58a43bf793519a48a85 100644 (file)
@@ -1 +1 @@
-dbf30e429cc7b88f6c82594a5638e194
\ No newline at end of file
+5565f1b11272ceda79be36d10883698c
\ No newline at end of file
index 21cab2bf0327a1d084ef3b599b7795abe572d29e..910276a3da9b204ced584504f7454ecd1ce561e8 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-14-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-14-t-expected.png differ
index e6fe2ac45f4c6443fd4d98aa5fb1b25a953c718a..9eb8a335e3624afb89fcb828f2ef4e54e856b65a 100644 (file)
@@ -1 +1 @@
-86c367fe9a7d63e2179077811cd7a912
\ No newline at end of file
+69b5b7b3079616841982d9bf8bb53b23
\ No newline at end of file
index d75c7b5d80ec700365143afdcdaeb47ad975eee3..2db21f76be84facae7b8ae18971b7c5739ef31ba 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-15-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-15-t-expected.png differ
index 4554fbb09a0daf60a95b88ddb8742f1cfa127f5b..dbfb716204260a48a2cd73a8c572f430c3f8dce2 100644 (file)
@@ -1 +1 @@
-8f8e533b38cfc8917978c52f4678f5f9
\ No newline at end of file
+6352c81f37d0686fe60822acf99130e6
\ No newline at end of file
index 08423d3c30b2e71f9d42d45cea2f6243c43aaf60..09c6fd3779b1d9b8b193d9f5668c7651d26eab1e 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-16-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-16-t-expected.png differ
index e9ef84879b37c19546fceb05578da08c259a1f20..7480c5646ace7a662daae5c1aa0ff3d1919d180f 100644 (file)
@@ -1 +1 @@
-af55c5c06e213511d6d4c7f753c8dda2
\ No newline at end of file
+57af2926f2c51a59cd9accd4585398fb
\ No newline at end of file
index 42e971393d5dcdd37b3d093f3ee32f4e1effc76f..ee301b00b27221274f8e9409d23439ce8789b1e1 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-17-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-17-t-expected.png differ
index b2f224f98433b8b840511e1f03d83525255a7438..9b5769502a93118af373e46c17571c5f574ad0dc 100644 (file)
@@ -1 +1 @@
-c67bb07da1fe2fc508eb75035d16602c
\ No newline at end of file
+7ef987954700caf11d00404301b58085
\ No newline at end of file
index 61dee16cccc44c79c62308f23ce9891606404e94..68aeea16849739a1a825ba6fb1ddd7d50509fd14 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-18-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-18-t-expected.png differ
index b0f4e537ec077a621b9135e596ba7fbe994b5c19..e9d8c1acb637a004093a1725f99fa7f037ee26bf 100644 (file)
@@ -1 +1 @@
-cacdddb7a8fde78bbd2e1434984c1816
\ No newline at end of file
+8480b8e92d3afa956be7ee46e926b9a6
\ No newline at end of file
index e573463e76bc7cfdd3a23d4ea469f1b6e2ecfe66..b07d2e4be7b938ecdacb1ce9cdfd5181cfc51d81 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-19-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-19-t-expected.png differ
index 9f2cc1056ae2ac0a2e81c1e183e4f8f89aa8f48e..67a7e58457e9d3bfd6612804a35f7031e8b80dee 100644 (file)
@@ -1 +1 @@
-0622f9920535c8da5b447fe75e4a6227
\ No newline at end of file
+201ee423cdb0eea5ef4e3aaf8e527269
\ No newline at end of file
index 2241ae8c685c722339641d071f586b067d0a7ac2..7880129f59ac830bf108cf55e00bf2a5d5873875 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-20-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-20-t-expected.png differ
index 9f2cc1056ae2ac0a2e81c1e183e4f8f89aa8f48e..67a7e58457e9d3bfd6612804a35f7031e8b80dee 100644 (file)
@@ -1 +1 @@
-0622f9920535c8da5b447fe75e4a6227
\ No newline at end of file
+201ee423cdb0eea5ef4e3aaf8e527269
\ No newline at end of file
index 2241ae8c685c722339641d071f586b067d0a7ac2..7880129f59ac830bf108cf55e00bf2a5d5873875 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-21-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-21-t-expected.png differ
index cb02b3c05d47957676a35851d9f12835c586d36a..c6ac26e87ea87804691ce642bb6b85bec44e4313 100644 (file)
@@ -1 +1 @@
-32ca02a5a404ea20b47421b2b707aa00
\ No newline at end of file
+852b240766b3ffa14331741b9ce19c87
\ No newline at end of file
index 23fb4ac0b41fda7883bb2f793a7eeef5b0f7d29d..9494702587bb24a4f58d8277871a850cb8f965eb 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-24-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-24-t-expected.png differ
index aa74bc758321d3c84c217862c7b4cf8cf9ff7659..13649b1d70936e11260bea9e6e538c956cc449c0 100644 (file)
@@ -1 +1 @@
-be9ea3493e858afaf88dde71f271dc6c
\ No newline at end of file
+c9bacc2c42273e31fe861d1ee170728a
\ No newline at end of file
index 52764e899e7024552b3267f7db328b311fa4385b..8a1f574ff6012875195582edfeb8f0a33ed7d453 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/animate-elem-29-b-expected.png differ
index 1190f086308a050ae03b4482bf95c2c8590d0f6c..8866c81186d33dbcc88e513a7b17901161879d02 100644 (file)
@@ -1 +1 @@
-22fa36758c536f97ae27dc538fa55e41
\ No newline at end of file
+491d12e160f1547c59248c11e0282b4d
\ No newline at end of file
index d5a9e65020a51a95091b3f5721f3a686c241afbe..3190b45cd4c977004b05892b52e9eec3c1fa8128 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png differ
index faba6e5c29c58a03539e291ddc289e2eb175e75a..08d6d6b0645611595eeb69c3ac3b4d6d7891fd9c 100644 (file)
@@ -1 +1 @@
-ba744a88f0df4b7a874cec513f873bcd
\ No newline at end of file
+9c73c3ed1e9265ed6401bbc792aa93e5
\ No newline at end of file
index ee038e25b6f719a094291a4a495d7784efd055bb..be863ad062844e497c5b1aba82237d4048ebc153 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.png differ
index 58ff4421ad28e3bb4d8c9b17fb86d144aa713c8f..b5a4e5895a3b2bd98cb402447b6581fe0eaf9b5d 100644 (file)
@@ -1 +1 @@
-c667e81cab0e26b7d7d6e0b0333e76ab
\ No newline at end of file
+7bd1f0a914e000821ddc8bd3de0fb8ae
\ No newline at end of file
index dd605502fa11250804347666d658b5f349588040..bd62dc658e2d02e6833f59d709d52708bd355c51 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.png differ
index eb3d787428dc6bb537b6c1f9e94cd04b69e15638..29c9a74e2cd1618f1e4348abf02af7ea15c885dd 100644 (file)
@@ -1 +1 @@
-caa3cb70bae418c2ed64d1baabb876c3
\ No newline at end of file
+abab2a435c2caf7cfba21bc16791168f
\ No newline at end of file
index 34f720299e04e0a9ebf2fb9ebf3cfb10366d1ff6..606722e3125796bddafd084e70fa5d13d2590324 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png differ
index a5438d8e561ad3be8286c76190e4ede67f220a10..c52cd382b35172a38f1c0e6c0894659e04f9ed1d 100644 (file)
@@ -1 +1 @@
-939f09dc3a8029f14235111a8f7d80af
\ No newline at end of file
+055de7585c9b73a743a30d4f939a52f0
\ No newline at end of file
index a785acbd695300318bfd0229b71cc28b2640750f..ca9e980ba210a666ab7f6f7cf2897aa46a576f45 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/interact-events-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/interact-events-01-b-expected.png differ
index fe27fb88c103a25dff2c05eaa099d255f504644e..975b9670b965a8d776a7cee9e04f13b79c69ca54 100644 (file)
@@ -1 +1 @@
-b0323ceae5e36f4f92b8d55890a87468
\ No newline at end of file
+4e5b6214ef69658765e241c573bda667
\ No newline at end of file
index b296fddfa555a6dbb34add554f0f17a04f21f14f..1cfe6391ae7ecea975616d40070dd87082d6fff6 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/linking-uri-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/linking-uri-01-b-expected.png differ
index f92dbef96adaecc2e8b21b9387eaad908dc536b1..f65f8e035914a8937387703c3722811e927b0c2f 100644 (file)
@@ -1 +1 @@
-c9c424bb6305a71d5c4cb35c8e7be420
\ No newline at end of file
+2a675858c398aa65b91f845885bb3cb7
\ No newline at end of file
index 39ca84d5225f34708eb90e39181d5c9d74330be3..8addfdb753cf85d4ba0d8f5f000886b8bf36ab47 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/linking-uri-02-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/linking-uri-02-b-expected.png differ
index 0ef258a251c677ee0b89446888d31a56371eb5ef..a279c1bac4df0736e7b296cad4dc7f916f660584 100644 (file)
@@ -1 +1 @@
-786d797048fe0121cfb39d6e5e77c5c7
\ No newline at end of file
+1b63b9477baeb366c9dfdd2028f21808
\ No newline at end of file
index c3cc19fa6b7dde400aef7b0863c83acaa5f63bd1..93c10ef0c39fcd481f712355486576cbbe5331a6 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png differ
index cee2df6d266f640a03c71c02b742ff3cb64b4764..f82ac17b61d6678d0ebb7fb6bfccca358c9f282f 100644 (file)
@@ -1 +1 @@
-21e9afa5fc570381f835f0e66f76508c
\ No newline at end of file
+bb3ea479fc9ca60f89c68fa57734d6ce
\ No newline at end of file
index 178166cbe66c7e75b0772c2f117880d849f7d01e..d5c6d9b2968d0fbd6ae56879c0051630e71ae2ee 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/masking-path-04-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/masking-path-04-b-expected.png differ
index b4974fe9ff1ad7b2d5358016de08bd204f641ff1..28cce6a237f6b0ee8cce1cd26631f52182f2c9e5 100644 (file)
@@ -1 +1 @@
-4fe919376334cc67c4b3dd3b6217808a
\ No newline at end of file
+8e90454258cd0cdf6e2d1e5d2868e358
\ No newline at end of file
index 585b7e6dddac9502f2328de6cef8a38f99675da3..c16f49ff4a0655171f871eb6f90a5579d2b0c12d 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png differ
index bad13823975d7830cbd828c51b0c40e157efba75..c65f7426e3a8e9bf97332a067d6a5849c025d0dd 100644 (file)
@@ -1 +1 @@
-1b804756f06d1b67c6656632862b03b7
\ No newline at end of file
+14d8986e0a466540fc8385cd7dab839b
\ No newline at end of file
index 081055e256d3f015e2aeb9eb5cb6e5960e5c1036..08f49fac196ff1c6225710b870c30221796e39ec 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/painting-fill-02-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/painting-fill-02-t-expected.png differ
index c95afeee46e3d14a34135ed09034fcc5263edcf1..3b0c0d1d0ee5c051895ce355f164abea2777b679 100644 (file)
@@ -1 +1 @@
-5f10ed71968b9ee9c9592f4f7a2fc71f
\ No newline at end of file
+e7c2b9fe3536d69a7a529487ee475d69
\ No newline at end of file
index e554fad04a11d4b415c702ea748c1ceadc8454d3..1c7d976883ceb073dcd6d5a8f6c6baeb4ea16597 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-05-b-expected.png differ
index f069e019745468d7cea2884445045ed56b1c9741..f52789d27a24c71c6672991dee8d6b2181317bb8 100644 (file)
@@ -1 +1 @@
-da1784abf74b987fed85194e67638bd8
\ No newline at end of file
+db6851570e4e9816e16f2451ffe9de64
\ No newline at end of file
index 4f60d3c60a29e4a95515d22be668732675953693..2f61fc2156ecd7d5d800ff86c77b441b143e7ae2 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png differ
index 9b04d10fb2d98f5a866c95496dd6e9288e08724a..30131f732e5a3068babebc9a6223688f8181a1d2 100644 (file)
@@ -1 +1 @@
-543435e7ba4cd804b9800f316f706280
\ No newline at end of file
+652084ca0ecefc2e2edc7f7be10795e7
\ No newline at end of file
index 16a1dbedd1cc98eb4c4f9b327a7a9f18a13de259..e6794739cd9cb710bb3fb0c0199f52787e4eb805 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png differ
index eae67983e2736f5fd683ad57713b895a85637fd8..27041448cc93f9871009c54af7a1a7cea0f37c25 100644 (file)
@@ -1 +1 @@
-80a4264c5d959bfc94b777ee016b532a
\ No newline at end of file
+86262fcd07583fb4292152d120c5a36e
\ No newline at end of file
index 8d274e57a7c603f18827e12d7311250ea0a0d8ff..2b8b59f427f2e25cc30e2bce8b3b6d1318615e5c 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png differ
index ec2a6cd46349fb7dd67d44754c6265864e8021be..fbda67e1186ba595d527049ac5cc20ba9f5a6d9a 100644 (file)
@@ -1 +1 @@
-96d3f7bbc2a96182719eae52cc993433
\ No newline at end of file
+438043db6264dd8e9c578c2bcfa5fb13
\ No newline at end of file
index 537b57a3d8a6e4695d76b1108e48e6e935adc872..5e697df670dcdbb3c29c094dfa3be0cd7bc088d4 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/render-elems-06-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/render-elems-06-t-expected.png differ
index 1c738f624e830600c34a93ad4f5eca9640bbeaa3..dafd27e19476fd3ac2206430af40761b940e8c4a 100644 (file)
@@ -1 +1 @@
-eba73cdbe507bcb606767155cd9c99d8
\ No newline at end of file
+4bfbf1469197ce56ea4008acb1433ca5
\ No newline at end of file
index 44400ed99456a9deb4ad0923d7180d45150e170e..f325c9aec06b98102e268ae7937f3204ff331b73 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/render-elems-07-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/render-elems-07-t-expected.png differ
index 943677478b504e12cfe8a671fbef1566420f55b1..56f6c3731ef78e0fde4f3a9a3ec63a113d29f29b 100644 (file)
@@ -1 +1 @@
-9d17dfd0420135fdd11f8a95f161791a
\ No newline at end of file
+6a9c4f168b177b485bece57c710acfd3
\ No newline at end of file
index 72e493ca838a68400e88687933ea5938002570f6..c6f98c39e2d6f086e16e554ea302dc2e525186cd 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/render-elems-08-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/render-elems-08-t-expected.png differ
index 85ff9119f3efa9bc2eb4baef0030aa66c03ae5c0..f7b7fe7ea26db1612b2a4833a2f2531ed2dd8e62 100644 (file)
@@ -1 +1 @@
-878642d32f1e8bab4c60e71beb5375ec
\ No newline at end of file
+3e011a9d3771574175218a41d97cf7f9
\ No newline at end of file
index 12df884a6b1f864c46da493dee638139d0c32497..09ac7dd26ab1d11e21293fbbadfd9f584ddddbbb 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-align-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-align-01-b-expected.png differ
index db296178248412ce8c7678712cce0f6b7db60e08..6186550bd433a9a42072e5b80d496aeb656af4cc 100644 (file)
@@ -1 +1 @@
-b43a0fb210e7ce4b05f9e2c56644517f
\ No newline at end of file
+e3d8191441a861eb4d0b0e172711f756
\ No newline at end of file
index 11d6daeabed28709041c13f723e174813ace6f96..e19d81bb297713f52d1ffb2c44f43b6c9eff1fd1 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-align-03-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-align-03-b-expected.png differ
index 3f85c903b18542ad43a30637d411292bdac1847a..a44003f774e4f5923e96e46c7d9e89fc1de5ea53 100644 (file)
@@ -1 +1 @@
-92e640343355208816f3f63dea7d0ac3
\ No newline at end of file
+a80d2a12090643a4767e892bbe95f91f
\ No newline at end of file
index 90b74164714ee982acfd1e3845122c1f63319310..393a74035216d32fc7c352cfe6dd79a669cc6ac0 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-align-04-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-align-04-b-expected.png differ
index ec898c3011055304221a9e38a35f5ff008d666a3..033f750ad9b48d076a5231482ea75e6b26c7f1f0 100644 (file)
@@ -1 +1 @@
-d03ed9cbc2a81c112f7d3d49d465cc2c
\ No newline at end of file
+d022ec3c31ed7d895a69001776a11e4f
\ No newline at end of file
index f696377838c8b8feef24773f1331fe01bd0b7ca4..da558467073ef89069988847803745bad5c5d09b 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-align-05-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-align-05-b-expected.png differ
index a33d32164084b5632f8b515bf8599df81fab2c4a..0707a8a9daa621991cf7357434ad0d335e8f360d 100644 (file)
@@ -1 +1 @@
-df753055af04dfe4ec35abf0273d9318
\ No newline at end of file
+5f10f6ce6ce4f8de6b6ce0ac7a4fd9e1
\ No newline at end of file
index 288b5513c85c25e8ae7b71aca5ee356ed2237f89..47a31f0d72acaa1356398021599e8ecf9b8bdbc2 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png differ
index 97758a7b448970f3c7eff3e82b6b3b02152541cd..a325ecb9e4f954e563193cf283a6a4257d410aa6 100644 (file)
@@ -1 +1 @@
-61f8fdeeaf81129364798026d5fb4aff
\ No newline at end of file
+525a80a342588b4af122d8384ccb4e9b
\ No newline at end of file
index f159247760c01ba3957576bbdbbe5956a62ffad5..17093059b7468950984a144659584f68bf58d78e 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-deco-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-deco-01-b-expected.png differ
index 95ab967ec3ab9b4036c86d89709fc1b2f2f0e722..f744db14bb926030e6e4c95e441b1db06aaecb91 100644 (file)
@@ -1 +1 @@
-299e8fa809991b312912c3b0c19652bb
\ No newline at end of file
+82692b8a48ba716bb4524bcc1dc8a247
\ No newline at end of file
index 152832930a5d75646a635ab37dbc4cd18a2c9ff0..1b5ad16c7152b5c55244fd32eaba409bf69113aa 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-fonts-01-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-fonts-01-t-expected.png differ
index 9e1609d9e4f73d854dcfebb8130c35b2a197f713..4e98241fd3e1f0dd43ed97a8f1eff2a6e21ec906 100644 (file)
@@ -1 +1 @@
-96800801df298563cd0947c885a72d8b
\ No newline at end of file
+89f6fb237a8bbca5bd2ed70ad3f0efb1
\ No newline at end of file
index 539516354a7bb1e069376647c13e545a305fa919..be1d2f3ca1e64effddbcee5a21c680f492aefedc 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-fonts-02-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-fonts-02-t-expected.png differ
index baf56ffdafc44712a495f926acdeefd4e424a6dd..018bdcd04c3285f3c5726dcfc9ab844f3aaea86a 100644 (file)
@@ -1 +1 @@
-645eecbffc5172a0e9c8af35fdbc8e5f
\ No newline at end of file
+3604a3d704a0853f893eaa359072833a
\ No newline at end of file
index a24e4736026e601a8b095c456a1839e24a9081a4..97ded6d19ee0b024cd18b16f5635ea15b7dd1cc3 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-text-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-text-01-b-expected.png differ
index fa7407a7ffc47a1cbd983385554860b2d99a93a3..74eb9dc8c7a645c0391d720ac958957f95bd3c4a 100644 (file)
@@ -1 +1 @@
-bad8be6e50b261412fd5330fbd24ad28
\ No newline at end of file
+56f06845b5e0b0154d1279225c2831af
\ No newline at end of file
index e21bff883ace115a08ecb0f7b06036bad2b21d7b..35aaaf318e07d79a298629940d5c1d979af95968 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-text-03-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-text-03-b-expected.png differ
index 96b40447a261d7d39e423c3602579ae75c32ab76..25465a52b951d874186ff8bc4e9feb3baafddf7e 100644 (file)
@@ -1 +1 @@
-0f501240ec8199f387f3273ed98e6eb2
\ No newline at end of file
+4117d981d125702db6cea1a3d16d25a4
\ No newline at end of file
index bc74b3e6edf608796dff75ae59e5b33677ac8c38..93eab8efe342920e1f7e9b1cd91d30100eb25bdc 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-tref-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-tref-01-b-expected.png differ
index b870de1375a8a83129f2d1906f08e60a1fc3907b..94d96f40150d47d78ea48211945080222583200a 100644 (file)
@@ -1 +1 @@
-dc63dbac9689a21d21c3df66c086fabd
\ No newline at end of file
+e6fe104033c0002df2c22b7d195fed69
\ No newline at end of file
index 56accb01eab91feb6cebad64cf314e7d079c6803..9908f9a096b29e251c1ef28b61001c0990de6449 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-tspan-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-tspan-01-b-expected.png differ
index 96c423eeadb8f33b1610be8be5f8f24c9e735ad9..19d064bd25149b585a816cd598357ec0fc43f532 100644 (file)
@@ -1 +1 @@
-a1af5c32fba056c7942707478384af2d
\ No newline at end of file
+a753ae83f5e958e851109082a980c14a
\ No newline at end of file
index abd19b01f5e0a56d5081ade7d857af3cc4c900b9..c7ba6082a3ae6e0188443b7ed9ad54914d2d789c 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-ws-01-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-ws-01-t-expected.png differ
index 7c48b58cb2411be7524ed44bbc91c643be8666d2..db37719571a32d3d3362b9451ff195f21fd5a3e5 100644 (file)
@@ -1 +1 @@
-77f1d8136f14d55ad00eba417f989b1d
\ No newline at end of file
+9c15e2586091b61bd262bcf12f987903
\ No newline at end of file
index a65c2fe364ca1db43ae8e16ada12de7a1d262a4a..31ae8f5586e3af9de3ab6e0286ef5fe4b4437f86 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/text-ws-02-t-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/text-ws-02-t-expected.png differ
index 40fd91e6eaddaf90aad533bd6861a87b6bb9a0e6..a057f63642114df9c76fc7fa0322ca112793fd77 100644 (file)
@@ -1 +1 @@
-827cd2c6ec0ba4b5e41b42d1e4e6fa2e
\ No newline at end of file
+109d323a668c4f823d72a5de1e3ed58c
\ No newline at end of file
index eaba94c1a7bf22447c3fc8edc8d07cd1d71028d8..6333cfc6f47541269d06b6de06e92d876bec533c 100644 (file)
Binary files a/LayoutTests/svg/custom/text-clip-expected.png and b/LayoutTests/svg/custom/text-clip-expected.png differ
index c9e535a9fb68563cc2898fedaa9fe39634d9aa57..774439f65d31a9fd211e51923f5db0fed0ba116c 100644 (file)
@@ -1 +1 @@
-45e13566cfe6b85dd5fa8ed5ef00d05d
\ No newline at end of file
+7f843dddfdabff32e3635aea5329069b
\ No newline at end of file
index 0b16057716ce74d0f2ce2db3bb1fa02f2bbc6f73..468873a55a2377797f29b5bd5ecdfda74b341cb6 100644 (file)
Binary files a/LayoutTests/svg/custom/text-filter-expected.png and b/LayoutTests/svg/custom/text-filter-expected.png differ
index a2e1b881f8e7506183df8187c6486c456b6a75ee..5899934cefbdced574d2b9f2e825c2efddb90162 100644 (file)
@@ -1 +1 @@
-4e3556185f05f4c6dd8abcc854e6f04f
\ No newline at end of file
+2e9be163822a3a1fbaa07f031e901b30
\ No newline at end of file
index 4ece62d1dc98087a33fcae29d2af82de6ced39e6..2573905ef607c2bbda64d8b06e26994136c06151 100644 (file)
Binary files a/LayoutTests/svg/custom/text-image-opacity-expected.png and b/LayoutTests/svg/custom/text-image-opacity-expected.png differ
index 8dee72a48c1d0c65d41412dbc40db0144394872d..4e992c9af0a808f2729ccf0f51b890ba9a6b99c0 100644 (file)
@@ -1,3 +1,57 @@
+2006-01-22  Alexander Kellett  <lypanov@kde.org>
+
+        Reviewed by eseidel.
+
+        Add support for custom fill/strokes on text.
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=6448
+
+        * kcanvas/RenderSVGText.cpp:
+        (RenderSVGText::paint): use new painter setup/teardown infrastructure
+        * kcanvas/device/KRenderingPaintServer.h:
+        (KRenderingPaintServer::KRenderingPaintServer):
+        (KRenderingPaintServer::setup):
+        (KRenderingPaintServer::render):
+        (KRenderingPaintServer::teardown):
+        (KRenderingPaintServer::isPaintingText):
+        (KRenderingPaintServer::setPaintingText):
+        * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
+        (setupShadingWithStyle):
+        (renderShadingWithStyle):
+        (teardownShadingWithStyle):
+        (KRenderingPaintServerLinearGradientQuartz::draw):
+        (KRenderingPaintServerLinearGradientQuartz::setup):
+        (KRenderingPaintServerLinearGradientQuartz::render):
+        (KRenderingPaintServerLinearGradientQuartz::teardown):
+        (KRenderingPaintServerRadialGradientQuartz::draw):
+        (KRenderingPaintServerRadialGradientQuartz::setup):
+        (KRenderingPaintServerRadialGradientQuartz::render):
+        (KRenderingPaintServerRadialGradientQuartz::teardown):
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.h:
+        (KRenderingPaintServerPatternQuartz::KRenderingPaintServerPatternQuartz):
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
+        (KRenderingPaintServerQuartzHelper::strokePath):
+        (KRenderingPaintServerQuartzHelper::clipToStrokePath):
+        (KRenderingPaintServerQuartzHelper::fillPath):
+        (KRenderingPaintServerQuartzHelper::clipToFillPath):
+        (KRenderingPaintServerSolidQuartz::draw):
+        (KRenderingPaintServerSolidQuartz::setup):
+        (KRenderingPaintServerSolidQuartz::render):
+        (KRenderingPaintServerSolidQuartz::teardown):
+        (KRenderingPaintServerPatternQuartz::draw):
+        (KRenderingPaintServerPatternQuartz::setup):
+        (KRenderingPaintServerPatternQuartz::render):
+        (KRenderingPaintServerPatternQuartz::teardown):
+        * kcanvas/device/quartz/QuartzSupport.h: fix prototype
+        * kcanvas/device/quartz/QuartzSupport.mm:
+        (applyStrokeStyleToContext):
+        * ksvg2/misc/KCanvasRenderingStyle.cpp:
+        (KSVGPainterFactory::fillPaintServer):
+        (KSVGPainterFactory::strokePaintServer):
+        (KSVGPainterFactory::cssPrimitiveToLength):
+        (KSVGPainterFactory::strokePainter):
+        (KSVGPainterFactory::fillPainter):
+        * ksvg2/misc/KCanvasRenderingStyle.h:
+
 2006-01-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
 
         Reviewed by Darin.
index d09d8a717e0a19b3bff75f8b7a2ea5d5b6206fa6..b264524d0a3c799d9c78a3d772e3e14f5019d775 100644 (file)
@@ -31,7 +31,6 @@
 #include "KCanvasContainer.h"
 #include "KCanvasResources.h"
 #include "KRenderingDevice.h"
-#include "KCanvasResourceListener.h"
 
 #include "SVGStyledElementImpl.h"
 
diff --git a/WebCore/kcanvas/KCanvasTypes.h b/WebCore/kcanvas/KCanvasTypes.h
deleted file mode 100644 (file)
index e69de29..0000000
index 8879a1414e5e90c2dc667591c9af6d8bd2dc3d33..b87dcb03bc5c7283fab4c3d555a9fbd443003abc 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the WebKit project.
  *
  * Copyright (C) 2006 Apple Computer, Inc.
+ *               2006 Alexander Kellett <lypanov@kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "RenderSVGText.h"
 
+#include "render_object.h"
 #include "SVGTextElementImpl.h"
 #include "SVGAnimatedLengthListImpl.h"
 #include "KRenderingDevice.h"
 #include "KCanvasMatrix.h"
+#include "KCanvasRenderingStyle.h"
 
 RenderSVGText::RenderSVGText(KSVG::SVGTextElementImpl *node) 
     : RenderBlock(node)
@@ -64,7 +67,7 @@ void RenderSVGText::paint(PaintInfo& paintInfo, int parentX, int parentY)
         shouldPopContext = true;
     } else
         paintInfo.p->save();
-
+    
     context->concatCTM(localTransform());
     context->concatCTM(QMatrix().translate(parentX, parentY));
     context->concatCTM(translationForAttributes());
@@ -83,8 +86,28 @@ void RenderSVGText::paint(PaintInfo& paintInfo, int parentX, int parentY)
     if (filter)
         filter->prepareFilter(boundingBox);
         
-    RenderBlock::paint(paintInfo, 0, 0);
+    KRenderingPaintServer *fillPaintServer = KSVG::KSVGPainterFactory::fillPaintServer(style(), this);
+    if (fillPaintServer) {
+        fillPaintServer->setPaintingText(true);
+        // fillPaintServer->setActiveClient(this);
+        if (fillPaintServer->setup(context, this, APPLY_TO_FILL)) {
+            RenderBlock::paint(paintInfo, 0, 0);
+            fillPaintServer->teardown(context, this, APPLY_TO_FILL);
+        }
+        fillPaintServer->setPaintingText(false);
+    }
     
+    KRenderingPaintServer *strokePaintServer = KSVG::KSVGPainterFactory::strokePaintServer(style(), this);
+    if (strokePaintServer) {
+        strokePaintServer->setPaintingText(true);
+        // strokePaintServer->setActiveClient(this);
+        if (strokePaintServer->setup(context, this, APPLY_TO_STROKE)) {
+            RenderBlock::paint(paintInfo, 0, 0);
+            strokePaintServer->teardown(context, this, APPLY_TO_STROKE);
+        }
+        strokePaintServer->setPaintingText(false);
+    }
+
     if (filter)
         filter->applyFilter(boundingBox);
 
index 72e4ca21031f8df353c1ece1a27f9fb6b9d8d1af..f09d10998cd47cb38926432d679b06657e9cb584 100644 (file)
@@ -1,6 +1,7 @@
 /*
     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
                   2004, 2005 Rob Buis <buis@kde.org>
+                  2006 Alexander Kellett <lypanov@kde.org>
 
     This file is part of the KDE project
 
@@ -42,7 +43,7 @@ typedef enum
     APPLY_TO_STROKE = 2
 } KCPaintTargetType;
 
-namespace khtml {
+namespace WebCore {
     class RenderStyle;
 }
 
@@ -52,7 +53,7 @@ class KRenderingDeviceContext;
 class KRenderingPaintServer : public KCanvasResource
 {
 public:
-    KRenderingPaintServer() : KCanvasResource() { m_activeClient = 0; }
+    KRenderingPaintServer() : KCanvasResource(), m_activeClient(0), m_paintingText(false) { }
     virtual ~KRenderingPaintServer() { }
     
     virtual bool isPaintServer() const { return true; }
@@ -64,14 +65,23 @@ public:
     void setIdInRegistry(const QString& newId) { m_registryId = newId; } 
     
     virtual KCPaintServerType type() const = 0;
-
+    
     // Actual rendering function
-    virtual void draw(KRenderingDeviceContext *context, const RenderPath *renderPath, KCPaintTargetType type) const = 0;
+    virtual void draw(KRenderingDeviceContext*, const RenderPath* renderPath, KCPaintTargetType) const = 0;
+
+    virtual bool setup(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const = 0;
+    virtual void teardown(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const = 0;
+    
+    bool isPaintingText() const { return m_paintingText; }
+    void setPaintingText(bool paintingText) { m_paintingText = paintingText; }
 
     virtual QTextStream &externalRepresentation(QTextStream &) const = 0;
+protected:
+    virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const = 0;
 private:
     const RenderPath *m_activeClient;
     QString m_registryId;
+    bool m_paintingText;
 };
 
 QTextStream &operator<<(QTextStream &, const KRenderingPaintServer &);
index 2a7d1172657868b7abb1c214933e93082ac00d3f..e14a6bca4e87a70f80f44200852ddeb63990a022 100644 (file)
@@ -83,7 +83,7 @@ public:
 
     KCanvasMatrix gradientTransform() const;
     void setGradientTransform(const KCanvasMatrix &mat);
-
+    
     KCanvasResourceListener *listener() const;
     void setListener(KCanvasResourceListener *listener);
 
index 551a727c267778ae50812da7c11df5b32c686559..45e08c1d2b16a92beaaa25b1a26b271983d9cd6c 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ *               2006 Alexander Kellett <lypanov@kde.org>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,6 +29,8 @@
 #import "KRenderingPaintServerQuartz.h"
 #import "QuartzSupport.h"
 
+#import "render_object.h"
+
 #import "kcanvas/KCanvas.h"
 #import "KCanvasRenderingStyle.h"
 #import "KRenderingPaintServer.h"
 #import "KCanvasMatrix.h"
 #import "KRenderingDeviceQuartz.h"
 
+#import "KCanvasResourcesQuartz.h"
+#import "KCanvasImage.h"
+
+
 #import <kxmlcore/Assertions.h>
 
 
 // Maybe this should be in a base class instead...
-static void drawShadingWithStyle(const KRenderingPaintServerGradient *server, CGShadingRef shading, const RenderPath *renderPath, KCPaintTargetType type)
+static KCanvasImage* setupShadingWithStyle(const KRenderingPaintServerGradient *server, CGShadingRef shading, const khtml::RenderObject* renderObject, KCPaintTargetType type, bool paintingText)
 {
     KRenderingDeviceQuartz *quartzDevice = static_cast<KRenderingDeviceQuartz *>(QPainter::renderingDevice());
     CGContextRef context = quartzDevice->currentCGContext();
-    khtml::RenderStyle *renderStyle = renderPath->style();
+    khtml::RenderStyle *renderStyle = renderObject->style();
     ASSERT(context != NULL);
     
     CGContextSaveGState(context);
     // make the gradient fit in the bbox if necessary.
-    if(server->boundingBoxMode())
-    {
+    if (server->boundingBoxMode() && renderObject->isRenderPath()) { // no support for bounding boxes around text yet!
         // get the object bbox
         CGRect objectBBox = CGContextGetPathBoundingBox(context);
-        
         CGRect gradientBBox = CGRectMake(0,0,100,100);
-        
         // generate a transform to map between the two.
         CGAffineTransform gradientIntoObjectBBox = CGAffineTransformMakeMapBetweenRects(gradientBBox, objectBBox);
         CGContextConcatCTM(context, gradientIntoObjectBBox);
@@ -69,23 +73,75 @@ static void drawShadingWithStyle(const KRenderingPaintServerGradient *server, CG
     
     if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle)) {
         CGContextSaveGState(context);
-        if (KSVG::KSVGPainterFactory::fillPainter(renderStyle, renderPath).fillRule() == RULE_EVENODD) {
-            CGContextEOClip(context);
-        } else {
-            CGContextClip(context);
+        if (paintingText)
+            CGContextSetTextDrawingMode(context, kCGTextClip);
+    }
+
+    KCanvasImage *maskImage = 0;
+    
+    if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle)) {
+        CGContextSaveGState(context);
+        applyStrokeStyleToContext(context, renderStyle, renderObject); // FIXME: this seems like the wrong place for this.
+        if (paintingText) {
+            maskImage = static_cast<KCanvasImage *>(quartzDevice->createResource(RS_IMAGE));
+            int width  = 2048;
+            int height = 2048; // FIXME???
+            IntSize size = IntSize(width, height);
+            maskImage->init(size);
+            KRenderingDeviceContext* maskImageContext = quartzDevice->contextForImage(maskImage);
+            quartzDevice->pushContext(maskImageContext);
+            CGContextRef maskContext = static_cast<KRenderingDeviceContextQuartz*>(maskImageContext)->cgContext();
+            const_cast<khtml::RenderObject *>(renderObject)->style()->setColor(QColor(255, 255, 255));
+            CGContextSetTextDrawingMode(maskContext, kCGTextStroke);
         }
+    }
+    return maskImage;
+}
+
+static void renderShadingWithStyle(const KRenderingPaintServerGradient *server, CGShadingRef shading, const RenderPath* path, KCPaintTargetType type)
+{
+    KRenderingDeviceQuartz *quartzDevice = static_cast<KRenderingDeviceQuartz *>(QPainter::renderingDevice());
+    CGContextRef context = quartzDevice->currentCGContext();
+    khtml::RenderStyle *renderStyle = path->style();
+    ASSERT(context != NULL);
+    
+    if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle))
+        KRenderingPaintServerQuartzHelper::clipToFillPath(context, path);
+    if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle))
+        KRenderingPaintServerQuartzHelper::clipToStrokePath(context, path);
+}
+
+static void teardownShadingWithStyle(const KRenderingPaintServerGradient *server, CGShadingRef shading, const khtml::RenderObject *renderObject, KCPaintTargetType type, bool paintingText, KCanvasImage *maskImage)
+{
+    KRenderingDeviceQuartz *quartzDevice = static_cast<KRenderingDeviceQuartz *>(QPainter::renderingDevice());
+    CGContextRef context = quartzDevice->currentCGContext();
+    khtml::RenderStyle *renderStyle = renderObject->style();
+    ASSERT(context != NULL);
+    
+    if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle)) {
         CGContextDrawShading(context, shading);
         CGContextRestoreGState(context);
     }
     
     if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle)) {
-        CGContextSaveGState(context);
-        applyStrokeStyleToContext(context, renderStyle, renderPath); // FIXME: this seems like the wrong place for this.
-        CGContextReplacePathWithStrokedPath(context);
-        CGContextClip(context);
+        if (paintingText) {
+            int width  = 2048;
+            int height = 2048; // FIXME??? SEE ABOVE
+            delete quartzDevice->popContext();
+            context = quartzDevice->currentCGContext();
+            void *imageBuffer = fastMalloc(width * height);
+            CGColorSpaceRef grayColorSpace = CGColorSpaceCreateDeviceGray();
+            CGContextRef grayscaleContext = CGBitmapContextCreate(imageBuffer, width, height, 8, width, grayColorSpace, kCGImageAlphaNone);
+            CGColorSpaceRelease(grayColorSpace);
+            KCanvasImageQuartz *qMaskImage = static_cast<KCanvasImageQuartz *>(maskImage);
+            CGContextDrawLayerAtPoint(grayscaleContext, CGPointMake(0, 0), qMaskImage->cgLayer());
+            CGImageRef grayscaleImage = CGBitmapContextCreateImage(grayscaleContext);
+            CGContextClipToMask(context, CGRectMake(0, 0, width, height), grayscaleImage);
+        }
         CGContextDrawShading(context, shading);
         CGContextRestoreGState(context);
     }
+    
     CGContextRestoreGState(context);
 }
 
@@ -289,7 +345,15 @@ void KRenderingPaintServerRadialGradientQuartz::invalidate()
     KRenderingPaintServerRadialGradient::invalidate();
 }
 
-void KRenderingPaintServerLinearGradientQuartz::draw(KRenderingDeviceContext *renderingContext, const RenderPath *renderPath, KCPaintTargetType type) const
+void KRenderingPaintServerLinearGradientQuartz::draw(KRenderingDeviceContext* renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{
+    if (!setup(renderingContext, path, type))
+        return;
+    renderPath(renderingContext, path, type);
+    teardown(renderingContext, path, type);
+}
+
+bool KRenderingPaintServerLinearGradientQuartz::setup(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
 {
     if(listener()) // this seems like bad design to me, should be in a common baseclass. -- ecs 8/6/05
         listener()->resourceNotification();
@@ -298,11 +362,31 @@ void KRenderingPaintServerLinearGradientQuartz::draw(KRenderingDeviceContext *re
     // We need a hook to call this when the gradient gets updated, before drawn.
     if (!m_shadingCache)
         const_cast<KRenderingPaintServerLinearGradientQuartz *>(this)->updateQuartzGradientCache(this);
-    
-    drawShadingWithStyle(this, m_shadingCache, renderPath, type);
+
+    m_maskImage = setupShadingWithStyle(this, m_shadingCache, renderObject, type, isPaintingText());
+
+    return true;
+}
+
+void KRenderingPaintServerLinearGradientQuartz::renderPath(KRenderingDeviceContext* renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{    
+    renderShadingWithStyle(this, m_shadingCache, path, type);
+}
+
+void KRenderingPaintServerLinearGradientQuartz::teardown(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
+{ 
+    teardownShadingWithStyle(this, m_shadingCache, renderObject, type, isPaintingText(), m_maskImage);
 }
 
-void KRenderingPaintServerRadialGradientQuartz::draw(KRenderingDeviceContext *renderingContext, const RenderPath *renderPath, KCPaintTargetType type) const
+void KRenderingPaintServerRadialGradientQuartz::draw(KRenderingDeviceContext* renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{
+    if (!setup(renderingContext, path, type))
+        return;
+    renderPath(renderingContext, path, type);
+    teardown(renderingContext, path, type);
+}
+
+bool KRenderingPaintServerRadialGradientQuartz::setup(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
 {
     if(listener()) // this seems like bad design to me, should be in a common baseclass. -- ecs 8/6/05
         listener()->resourceNotification();
@@ -311,6 +395,18 @@ void KRenderingPaintServerRadialGradientQuartz::draw(KRenderingDeviceContext *re
     // We need a hook to call this when the gradient gets updated, before drawn.
     if (!m_shadingCache)
         const_cast<KRenderingPaintServerRadialGradientQuartz *>(this)->updateQuartzGradientCache(this);
-    
-    drawShadingWithStyle(this, m_shadingCache, renderPath, type);
+
+    m_maskImage = setupShadingWithStyle(this, m_shadingCache, renderObject, type, isPaintingText());
+        
+    return true;
+}
+
+void KRenderingPaintServerRadialGradientQuartz::renderPath(KRenderingDeviceContext* renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{
+    renderShadingWithStyle(this, m_shadingCache, path, type);
+}
+
+void KRenderingPaintServerRadialGradientQuartz::teardown(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
+{
+    teardownShadingWithStyle(this, m_shadingCache, renderObject, type, isPaintingText(), m_maskImage);
 }
index cb6777c0491e7d0285f19165594ad0d3f3a511d0..53326b42036a01e0c2c54a83a78052ae1ee08ecf 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved. 
+ *               2006 Alexander Kellett <lypanov@kde.org>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import <kcanvas/device/KRenderingPaintServerPattern.h>
 #import <kcanvas/device/KRenderingPaintServerGradient.h>
 
+class KCanvasImage;
+
+class KRenderingPaintServerQuartzHelper {
+public:
+    static void strokePath(CGContextRef, const RenderPath *renderPath);
+    static void clipToStrokePath(CGContextRef, const RenderPath *renderPath);
+    static void fillPath(CGContextRef, const RenderPath *renderPath);
+    static void clipToFillPath(CGContextRef, const RenderPath *renderPath);
+};
+
 class KRenderingPaintServerSolidQuartz : public KRenderingPaintServerSolid {
 public:
     KRenderingPaintServerSolidQuartz() {};
-    virtual void draw(KRenderingDeviceContext *context, const RenderPath *renderPath, KCPaintTargetType type) const;
+    virtual void draw(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
+    virtual bool setup(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+    virtual void teardown(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+protected:
+    virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
 };
 
 class KRenderingPaintServerPatternQuartz : public KRenderingPaintServerPattern {
 public:
-    KRenderingPaintServerPatternQuartz() {};
-    virtual void draw(KRenderingDeviceContext *context, const RenderPath *renderPath, KCPaintTargetType type) const;
+    KRenderingPaintServerPatternQuartz() {}
+    virtual void draw(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
+    virtual bool setup(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+    virtual void teardown(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+protected:
+    virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
+private:
+    mutable CGColorSpaceRef m_patternSpace;
+    mutable CGPatternRef m_pattern;
 };
 
 typedef struct {
@@ -64,21 +86,30 @@ public:
 
 protected:
     void invalidateCaches();
-    CGShadingRef        m_shadingCache;
+    CGShadingRef m_shadingCache;
+    mutable KCanvasImage *m_maskImage;
 };
 
 class KRenderingPaintServerLinearGradientQuartz : public KRenderingPaintServerLinearGradient,
                                                   public KRenderingPaintServerGradientQuartz {
 public:
-    KRenderingPaintServerLinearGradientQuartz() {};
+    KRenderingPaintServerLinearGradientQuartz() { }
     virtual void invalidate();
-    virtual void draw(KRenderingDeviceContext *context, const RenderPath *renderPath, KCPaintTargetType type) const;
+    virtual void draw(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
+    virtual bool setup(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+    virtual void teardown(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+protected:
+    virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
 };
 
 class KRenderingPaintServerRadialGradientQuartz : public KRenderingPaintServerRadialGradient,
                                                   public KRenderingPaintServerGradientQuartz {
 public:
-    KRenderingPaintServerRadialGradientQuartz() {};
+    KRenderingPaintServerRadialGradientQuartz() { }
     virtual void invalidate();
-    virtual void draw(KRenderingDeviceContext *context, const RenderPath *renderPath, KCPaintTargetType type) const;
+    virtual void draw(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
+    virtual bool setup(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+    virtual void teardown(KRenderingDeviceContext*, const WebCore::RenderObject*, KCPaintTargetType) const;
+protected:
+    virtual void renderPath(KRenderingDeviceContext*, const RenderPath*, KCPaintTargetType) const;
 };
index 7522f0217ef3bbf4c10fb2bb76f13d435ed06eea..c8018f505388cc714feaec51d44176ee69c80462 100644 (file)
 
 #import "KWQLogging.h"
 
-void KRenderingPaintServerSolidQuartz::draw(KRenderingDeviceContext *renderingContext, const RenderPath *renderPath, KCPaintTargetType type) const
+void KRenderingPaintServerQuartzHelper::strokePath(CGContextRef context, const RenderPath *renderPath)
+{
+    CGContextStrokePath(context);
+}
+
+void KRenderingPaintServerQuartzHelper::clipToStrokePath(CGContextRef context, const RenderPath *renderPath)
+{
+    CGContextReplacePathWithStrokedPath(context);
+    CGContextClip(context);
+}    
+
+void KRenderingPaintServerQuartzHelper::fillPath(CGContextRef context, const RenderPath *renderPath)
+{
+    if (KSVG::KSVGPainterFactory::fillPainter(renderPath->style(), renderPath).fillRule() == RULE_EVENODD)
+        CGContextEOFillPath(context);
+    else
+        CGContextFillPath(context);
+}
+
+void KRenderingPaintServerQuartzHelper::clipToFillPath(CGContextRef context, const RenderPath *renderPath)
+{
+    if (KSVG::KSVGPainterFactory::fillPainter(renderPath->style(), renderPath).fillRule() == RULE_EVENODD)
+        CGContextEOClip(context);
+    else
+        CGContextClip(context);
+}    
+
+void KRenderingPaintServerSolidQuartz::draw(KRenderingDeviceContext *renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{
+    if (!setup(renderingContext, path, type))
+        return;
+    renderPath(renderingContext, path, type);
+    teardown(renderingContext, path, type);
+}
+
+bool KRenderingPaintServerSolidQuartz::setup(KRenderingDeviceContext *renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
 {
     KRenderingDeviceContextQuartz *quartzContext = static_cast<KRenderingDeviceContextQuartz *>(renderingContext);
     CGContextRef context = quartzContext->cgContext();
-    khtml::RenderStyle *renderStyle = renderPath->style();
+    khtml::RenderStyle *renderStyle = renderObject->style();
 
     CGContextSetAlpha(context, renderStyle->opacity());
         
     if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle)) {
         CGColorRef colorCG = cgColor(color());
-        CGColorRef withAlpha = CGColorCreateCopyWithAlpha(colorCG, KSVG::KSVGPainterFactory::fillPainter(renderStyle, renderPath).opacity());
+        CGColorRef withAlpha = CGColorCreateCopyWithAlpha(colorCG, KSVG::KSVGPainterFactory::fillPainter(renderStyle, renderObject).opacity());
         CGContextSetFillColorWithColor(context, withAlpha);
         CGColorRelease(colorCG);
         CGColorRelease(withAlpha);
-        if (KSVG::KSVGPainterFactory::fillPainter(renderStyle, renderPath).fillRule() == RULE_EVENODD)
-            CGContextEOFillPath(context);
-        else
-            CGContextFillPath(context);
+        if (isPaintingText()) {
+            const_cast<khtml::RenderObject *>(renderObject)->style()->setColor(color());
+            CGContextSetTextDrawingMode(context, kCGTextFill);
+        }
     }
 
     if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle)) {
         CGColorRef colorCG = cgColor(color());
-        CGColorRef withAlpha = CGColorCreateCopyWithAlpha(colorCG, KSVG::KSVGPainterFactory::strokePainter(renderStyle, renderPath).opacity());         
+        CGColorRef withAlpha = CGColorCreateCopyWithAlpha(colorCG, KSVG::KSVGPainterFactory::strokePainter(renderStyle, renderObject).opacity());         
         CGContextSetStrokeColorWithColor(context, withAlpha);
         CGColorRelease(colorCG);
         CGColorRelease(withAlpha);
-        
-        applyStrokeStyleToContext(context, renderStyle, renderPath);
-        
-        CGContextStrokePath(context);
+        applyStrokeStyleToContext(context, renderStyle, renderObject);
+        if (isPaintingText()) {
+            const_cast<khtml::RenderObject *>(renderObject)->style()->setColor(color());
+            CGContextSetTextDrawingMode(context, kCGTextStroke);
+        }
     }
+    
+    return true;
 }
 
+void KRenderingPaintServerSolidQuartz::renderPath(KRenderingDeviceContext* renderingContext, const RenderPath* renderPath, KCPaintTargetType type) const
+{
+    khtml::RenderStyle *renderStyle = renderPath->style();
+    KRenderingDeviceContextQuartz *quartzContext = static_cast<KRenderingDeviceContextQuartz *>(renderingContext);
+    CGContextRef context = quartzContext->cgContext();    
+    if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle))
+        KRenderingPaintServerQuartzHelper::fillPath(context, renderPath);
+    if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle))
+        KRenderingPaintServerQuartzHelper::strokePath(context, renderPath);
+}
+
+void KRenderingPaintServerSolidQuartz::teardown(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
+{
+}
 
 void patternCallback(void *info, CGContextRef context)
 {
@@ -81,19 +133,27 @@ void patternCallback(void *info, CGContextRef context)
     CGContextDrawLayerAtPoint(context, CGPointZero, layer);
 }
 
-void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext *renderingContext, const RenderPath *renderPath, KCPaintTargetType type) const
+void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext* renderingContext, const RenderPath* path, KCPaintTargetType type) const
+{
+    if (!setup(renderingContext, path, type))
+        return;
+    renderPath(renderingContext, path, type);
+    teardown(renderingContext, path, type);
+}
+
+bool KRenderingPaintServerPatternQuartz::setup(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
 {
     if(listener()) // this seems like bad design to me, should be in a common baseclass. -- ecs 8/6/05
         listener()->resourceNotification();
 
-    khtml::RenderStyle *renderStyle = renderPath->style();
+    khtml::RenderStyle *renderStyle = renderObject->style();
 
     KRenderingDeviceContextQuartz *quartzContext = static_cast<KRenderingDeviceContextQuartz *>(renderingContext);
     CGContextRef context = quartzContext->cgContext();
 
     KCanvasImage *cell = tile();
     if (!cell)
-        return;
+        return false;
 
     CGContextSaveGState(context);
 
@@ -110,7 +170,7 @@ void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext *rendering
     CGContextSetPatternPhase(context, phase);
 
     CGPatternCallbacks callbacks = {0, patternCallback, NULL};
-    CGPatternRef pattern = CGPatternCreate (
+    m_pattern = CGPatternCreate(
         tile(),
         CGRectMake(0,0,cellSize.width,cellSize.height),
         transform,
@@ -118,30 +178,53 @@ void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext *rendering
         bbox().height(), //cellSize.height,
         kCGPatternTilingConstantSpacing,  // FIXME: should ask CG guys.
         true, // has color
-        &callbacks );
+        &callbacks);
 
     CGContextSetAlpha(context, renderStyle->opacity()); // or do I set the alpha above?
 
-    CGColorSpaceRef patternSpace = CGColorSpaceCreatePattern(NULL);
+    m_patternSpace = CGColorSpaceCreatePattern(NULL);
 
     if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle)) {
-        CGContextSetFillColorSpace(context, patternSpace);
-        CGContextSetFillPattern(context, pattern, &alpha);
-        if (KSVG::KSVGPainterFactory::fillPainter(renderStyle, renderPath).fillRule() == RULE_EVENODD)
-            CGContextEOFillPath(context);
-        else
-            CGContextFillPath(context);
+        CGContextSetFillColorSpace(context, m_patternSpace);
+        CGContextSetFillPattern(context, m_pattern, &alpha);
+        if (isPaintingText()) {
+            const_cast<khtml::RenderObject *>(renderObject)->style()->setColor(QColor());
+            CGContextSetTextDrawingMode(context, kCGTextFill);
+        }
     }
     
     if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle)) {
-        CGContextSetStrokeColorSpace(context, patternSpace);
-        CGContextSetStrokePattern(context, pattern, &alpha);
-        applyStrokeStyleToContext(context, renderStyle, renderPath);
-        CGContextStrokePath(context);
+        CGContextSetStrokeColorSpace(context, m_patternSpace);
+        CGContextSetStrokePattern(context, m_pattern, &alpha);
+        applyStrokeStyleToContext(context, renderStyle, renderObject);
+        if (isPaintingText()) {
+            const_cast<khtml::RenderObject *>(renderObject)->style()->setColor(QColor());
+            CGContextSetTextDrawingMode(context, kCGTextStroke);
+        }
     }
+    
+    return true;
+}
+
+void KRenderingPaintServerPatternQuartz::renderPath(KRenderingDeviceContext* renderingContext, const RenderPath* renderPath, KCPaintTargetType type) const
+{
+    khtml::RenderStyle *renderStyle = renderPath->style();
 
-    CGPatternRelease(pattern);
-    CGColorSpaceRelease (patternSpace);
+    KRenderingDeviceContextQuartz *quartzContext = static_cast<KRenderingDeviceContextQuartz *>(renderingContext);
+    CGContextRef context = quartzContext->cgContext();
 
+    if ((type & APPLY_TO_FILL) && KSVG::KSVGPainterFactory::isFilled(renderStyle))
+        KRenderingPaintServerQuartzHelper::fillPath(context, renderPath);
+    
+    if ((type & APPLY_TO_STROKE) && KSVG::KSVGPainterFactory::isStroked(renderStyle))
+        KRenderingPaintServerQuartzHelper::strokePath(context, renderPath);
+}
+
+void KRenderingPaintServerPatternQuartz::teardown(KRenderingDeviceContext* renderingContext, const khtml::RenderObject* renderObject, KCPaintTargetType type) const
+{
+    KRenderingDeviceContextQuartz *quartzContext = static_cast<KRenderingDeviceContextQuartz *>(renderingContext);
+    CGContextRef context = quartzContext->cgContext();
+    CGPatternRelease(m_pattern);
+    CGColorSpaceRelease(m_patternSpace);
     CGContextRestoreGState(context);
-}
\ No newline at end of file
+}
index 1bf72ae718912e2052cad5ab9087028f37868895..f7bd6db5251d8e3633a0ddc46a9c8cc071f48883 100644 (file)
 
 
 #import "KCanvasRenderingStyle.h" // for all the CAP_BUTT contstants, etc.
-class RenderPath;
 
 namespace WebCore {
     class IntRect;
-}
-
-namespace khtml {
     class RenderStyle;
+    class RenderObject;
 }
 
 #ifndef NDEBUG
 void debugDumpCGImageToFile(NSString *filename, CGImageRef image, int width, int height);
-void debugDumpCGImageToFile(NSString *filename, CGImageRef image, int width, int height);
+void debugDumpCGLayerToFile(NSString *filename, CGLayerRef layer, int width, int height);
 void debugDumpCIImageToFile(NSString *filename, CIImage *ciImage, int width, int height);
 #endif
 
@@ -45,9 +42,9 @@ CFStringRef CFStringFromCGPath(CGPathRef path);
 CFStringRef CFStringFromCGAffineTransform(CGAffineTransform t);
 CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect dest);
 
-void applyStrokeStyleToContext(CGContextRef context, khtml::RenderStyle *style, const RenderPath *renderPath);
+void applyStrokeStyleToContext(CGContextRef, WebCore::RenderStyle*, const WebCore::RenderObject*);
 
-static inline CGLineCap CGLineCapFromKC( KCCapStyle cap) {
+static inline CGLineCap CGLineCapFromKC(KCCapStyle cap) {
     if (cap == CAP_BUTT)
         return kCGLineCapButt;
     else if (cap == CAP_ROUND)
@@ -58,7 +55,7 @@ static inline CGLineCap CGLineCapFromKC( KCCapStyle cap) {
     return kCGLineCapButt;
 }
 
-static inline CGLineJoin CGLineJoinFromKC( KCJoinStyle join) {
+static inline CGLineJoin CGLineJoinFromKC(KCJoinStyle join) {
     if (join == JOIN_MITER)
         return kCGLineJoinMiter;
     else if (join == JOIN_ROUND)
index 16a71cb755cc7c4d7b9d5bfc0b35e2e5d639d4ed..e8b8dd3ee64738444693af64faa3052585d6b695 100644 (file)
@@ -89,9 +89,9 @@ CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect des
     return transform;
 }
 
-void applyStrokeStyleToContext(CGContextRef context, khtml::RenderStyle *renderStyle, const RenderPath *renderPath)
+void applyStrokeStyleToContext(CGContextRef context, khtml::RenderStyle* renderStyle, const khtml::RenderObject* renderObject)
 {
-    KRenderingStrokePainter strokePainter = KSVG::KSVGPainterFactory::strokePainter(renderStyle, renderPath);
+    KRenderingStrokePainter strokePainter = KSVG::KSVGPainterFactory::strokePainter(renderStyle, renderObject);
 
     /* Shouldn't all these be in the stroke painter? */
     CGContextSetLineWidth(context, strokePainter.strokeWidth());
index 1cac5dba18cba2f49dc9a78e6be0d328b6a81627..1b6adc579be07e57b4252f3ca8b4bab17ffd119b 100644 (file)
@@ -25,6 +25,8 @@
 #include <q3paintdevicemetrics.h>
 #include <qpaintdevice.h>
 
+#include <render_object.h>
+
 #include <kcanvas/KCanvas.h>
 #include <kcanvas/KCanvasPath.h>
 #include <kcanvas/device/KRenderingDevice.h>
 #include "KCanvasRenderingStyle.h"
 #include "SVGRenderStyle.h"
 
-using namespace KSVG;
+namespace WebCore {
+
+static KRenderingPaintServerSolid* sharedSolidPaintServer()
+{
+    KRenderingPaintServerSolid* _sharedSolidPaintServer = 0;
+    if (!_sharedSolidPaintServer)
+        _sharedSolidPaintServer = static_cast<KRenderingPaintServerSolid *>(QPainter::renderingDevice()->createPaintServer(PS_SOLID));
+    return _sharedSolidPaintServer;
+}
 
-bool KSVGPainterFactory::isFilled(const khtml::RenderStyle *style)
+bool KSVGPainterFactory::isFilled(const RenderStyle *style)
 {
     SVGPaintImpl *fill = style->svgStyle()->fillPaint();
     if (fill && fill->paintType() == SVG_PAINTTYPE_NONE)
@@ -55,7 +65,7 @@ bool KSVGPainterFactory::isFilled(const khtml::RenderStyle *style)
     return true;
 }
 
-KRenderingPaintServer *KSVGPainterFactory::fillPaintServer(const khtml::RenderStyle *style, const RenderPath* item)
+KRenderingPaintServer *KSVGPainterFactory::fillPaintServer(const RenderStyle* style, const RenderObject* item)
 {
     if (!isFilled(style))
         return 0;
@@ -65,16 +75,15 @@ KRenderingPaintServer *KSVGPainterFactory::fillPaintServer(const khtml::RenderSt
     KRenderingPaintServer *fillPaintServer;
     if (!fill) {
         // initial value (black)
-        fillPaintServer = QPainter::renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID));
-        KRenderingPaintServerSolid *fillPaintServerSolid = static_cast<KRenderingPaintServerSolid *>(fillPaintServer);
-        fillPaintServerSolid->setColor(Qt::black);
+        fillPaintServer = sharedSolidPaintServer();
+        static_cast<KRenderingPaintServerSolid *>(fillPaintServer)->setColor(Qt::black);
     } else if (fill->paintType() == SVG_PAINTTYPE_URI) {
-        KDOM::DOMString id(fill->uri());
+        DOMString id(fill->uri());
         fillPaintServer = getPaintServerById(item->document(), id.qstring().mid(1));
-        if (item && fillPaintServer)
-            fillPaintServer->addClient(item);
+        if (item && fillPaintServer && item->isRenderPath())
+            fillPaintServer->addClient(static_cast<const RenderPath*>(item));
     } else {
-        fillPaintServer = QPainter::renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID));
+        fillPaintServer = sharedSolidPaintServer();
         KRenderingPaintServerSolid *fillPaintServerSolid = static_cast<KRenderingPaintServerSolid *>(fillPaintServer);
         if (fill->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
             fillPaintServerSolid->setColor(style->color());
@@ -86,7 +95,7 @@ KRenderingPaintServer *KSVGPainterFactory::fillPaintServer(const khtml::RenderSt
 }
 
 
-bool KSVGPainterFactory::isStroked(const khtml::RenderStyle *style)
+bool KSVGPainterFactory::isStroked(const RenderStyle *style)
 {
     SVGPaintImpl *stroke = style->svgStyle()->strokePaint();
     if (!stroke || stroke->paintType() == SVG_PAINTTYPE_NONE)
@@ -94,7 +103,7 @@ bool KSVGPainterFactory::isStroked(const khtml::RenderStyle *style)
     return true;
 }
 
-KRenderingPaintServer *KSVGPainterFactory::strokePaintServer(const khtml::RenderStyle *style, const RenderPath* item)
+KRenderingPaintServer *KSVGPainterFactory::strokePaintServer(const RenderStyle* style, const RenderObject* item)
 {
     if (!isStroked(style))
         return 0;
@@ -103,12 +112,12 @@ KRenderingPaintServer *KSVGPainterFactory::strokePaintServer(const khtml::Render
 
     KRenderingPaintServer *strokePaintServer;
     if (stroke && stroke->paintType() == SVG_PAINTTYPE_URI) {
-        KDOM::DOMString id(stroke->uri());
+        DOMString id(stroke->uri());
         strokePaintServer = getPaintServerById(item->document(), id.qstring().mid(1));
-        if(item && strokePaintServer)
-            strokePaintServer->addClient(item);
+        if(item && strokePaintServer && item->isRenderPath())
+            strokePaintServer->addClient(static_cast<const RenderPath*>(item));
     } else {
-        strokePaintServer = QPainter::renderingDevice()->createPaintServer(KCPaintServerType(PS_SOLID));
+        strokePaintServer = sharedSolidPaintServer();
         KRenderingPaintServerSolid *strokePaintServerSolid = static_cast<KRenderingPaintServerSolid *>(strokePaintServer);
         if (stroke->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
             strokePaintServerSolid->setColor(style->color());
@@ -119,12 +128,12 @@ KRenderingPaintServer *KSVGPainterFactory::strokePaintServer(const khtml::Render
     return strokePaintServer;
 }
 
-double KSVGPainterFactory::cssPrimitiveToLength(const RenderPath *item, KDOM::CSSValueImpl *value, double defaultValue)
+double KSVGPainterFactory::cssPrimitiveToLength(const RenderObject* item, CSSValueImpl *value, double defaultValue)
 {
-    KDOM::CSSPrimitiveValueImpl *primitive = static_cast<KDOM::CSSPrimitiveValueImpl *>(value);
+    CSSPrimitiveValueImpl *primitive = static_cast<CSSPrimitiveValueImpl *>(value);
 
-    unsigned short cssType = (primitive ? primitive->primitiveType() : (unsigned short) KDOM::CSSPrimitiveValue::CSS_UNKNOWN);
-    if(!(cssType > KDOM::CSSPrimitiveValue::CSS_UNKNOWN && cssType <= KDOM::CSSPrimitiveValue::CSS_PC))
+    unsigned short cssType = (primitive ? primitive->primitiveType() : (unsigned short) CSSPrimitiveValue::CSS_UNKNOWN);
+    if(!(cssType > CSSPrimitiveValue::CSS_UNKNOWN && cssType <= CSSPrimitiveValue::CSS_PC))
         return defaultValue;
 
     Q3PaintDeviceMetrics *paintDeviceMetrics = 0;
@@ -133,29 +142,29 @@ double KSVGPainterFactory::cssPrimitiveToLength(const RenderPath *item, KDOM::CS
     if(element && element->ownerDocument())
         paintDeviceMetrics = element->ownerDocument()->paintDeviceMetrics();
 
-    if(cssType == KDOM::CSSPrimitiveValue::CSS_PERCENTAGE)
+    if(cssType == CSSPrimitiveValue::CSS_PERCENTAGE)
     {
         SVGElementImpl *viewportElement = (element ? element->viewportElement() : 0);
         if(viewportElement)
         {
-            double result = primitive->getFloatValue(KDOM::CSSPrimitiveValue::CSS_PERCENTAGE) / 100.0;
+            double result = primitive->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100.0;
             return SVGHelper::PercentageOfViewport(result, viewportElement, LM_OTHER);
         }
     }
 
-    return primitive->computeLengthFloat(const_cast<khtml::RenderStyle *>(item->style()), paintDeviceMetrics);
+    return primitive->computeLengthFloat(const_cast<RenderStyle *>(item->style()), paintDeviceMetrics);
 }
 
-KRenderingStrokePainter KSVGPainterFactory::strokePainter(const khtml::RenderStyle *style, const RenderPath *item)
+KRenderingStrokePainter KSVGPainterFactory::strokePainter(const RenderStyle* style, const RenderObject* item)
 {
     KRenderingStrokePainter strokePainter;
 
     strokePainter.setOpacity(style->svgStyle()->strokeOpacity());
     strokePainter.setStrokeWidth(KSVGPainterFactory::cssPrimitiveToLength(item, style->svgStyle()->strokeWidth(), 1.0));
 
-    KDOM::CSSValueListImpl *dashes = style->svgStyle()->strokeDashArray();
+    CSSValueListImpl *dashes = style->svgStyle()->strokeDashArray();
     if (dashes) {
-        KDOM::CSSPrimitiveValueImpl *dash = 0;
+        CSSPrimitiveValueImpl *dash = 0;
         Q3PaintDeviceMetrics *paintDeviceMetrics = 0;
 
         SVGElementImpl *element = static_cast<SVGElementImpl *>(item->element());
@@ -165,9 +174,9 @@ KRenderingStrokePainter KSVGPainterFactory::strokePainter(const khtml::RenderSty
         KCDashArray array;
         unsigned long len = dashes->length();
         for (unsigned long i = 0; i < len; i++) {
-            dash = static_cast<KDOM::CSSPrimitiveValueImpl *>(dashes->item(i));
+            dash = static_cast<CSSPrimitiveValueImpl *>(dashes->item(i));
             if (dash)
-                array.append((float) dash->computeLengthFloat(const_cast<khtml::RenderStyle *>(style), paintDeviceMetrics));
+                array.append((float) dash->computeLengthFloat(const_cast<RenderStyle *>(style), paintDeviceMetrics));
         }
 
         strokePainter.setDashArray(array);
@@ -181,7 +190,7 @@ KRenderingStrokePainter KSVGPainterFactory::strokePainter(const khtml::RenderSty
     return strokePainter;
 }
 
-KRenderingFillPainter KSVGPainterFactory::fillPainter(const khtml::RenderStyle *style, const RenderPath *item)
+KRenderingFillPainter KSVGPainterFactory::fillPainter(const RenderStyle* style, const RenderObject* item)
 {
     KRenderingFillPainter fillPainter;
     
@@ -191,4 +200,6 @@ KRenderingFillPainter KSVGPainterFactory::fillPainter(const khtml::RenderStyle *
     return fillPainter;
 }
 
+}
+
 // vim:ts=4:noet
index 14a1af8f452a0d6607e0a5f5f8761839bf96c930..4c369805a33552ed4316070f50a9ed95c469a579 100644 (file)
 #ifndef KSVG_KCanvasRenderingStyle_H
 #define KSVG_KCanvasRenderingStyle_H
 
-#include <qvaluelist.h>
-
 #include "css_valueimpl.h"
-
 #include <kcanvas/KCanvasMatrix.h>
+#include <qvaluelist.h>
 
 // FIXME: these should be removed, use KSVG ones instead
 typedef enum
@@ -49,31 +47,27 @@ typedef enum
 // Special types
 typedef Q3ValueList<float> KCDashArray;
 
-
-namespace khtml {
-    class RenderStyle;
-}
-
 class KRenderingFillPainter;
 class KRenderingStrokePainter;
 class KRenderingPaintServer;
-class RenderPath;
 
-namespace KSVG
+namespace WebCore
 {
+    class RenderStyle;
+    class RenderObject;
     class KSVGPainterFactory
     {
     public:
-        static KRenderingFillPainter fillPainter(const khtml::RenderStyle *style, const RenderPath *item);
-        static KRenderingStrokePainter strokePainter(const khtml::RenderStyle *style, const RenderPath *item);
+        static KRenderingFillPainter fillPainter(const RenderStyle*, const RenderObject*);
+        static KRenderingStrokePainter strokePainter(const RenderStyle*, const RenderObject*);
 
-        static bool isStroked(const khtml::RenderStyle *style);
-        static KRenderingPaintServer *strokePaintServer(const khtml::RenderStyle *style, const RenderPath*);
+        static bool isStroked(const RenderStyle*);
+        static KRenderingPaintServer* strokePaintServer(const RenderStyle*, const RenderObject*);
 
-        static bool isFilled(const khtml::RenderStyle *style);
-        static KRenderingPaintServer *fillPaintServer(const khtml::RenderStyle *style, const RenderPath*);
+        static bool isFilled(const RenderStyle*);
+        static KRenderingPaintServer* fillPaintServer(const RenderStyle*, const RenderObject*);
 
-        static double cssPrimitiveToLength(const RenderPath *item, KDOM::CSSValueImpl *value, double defaultValue = 0.0);
+        static double cssPrimitiveToLength(const RenderObject*, CSSValueImpl*, double defaultValue = 0.0);
     };
 };