Changeset 25175 in webkit


Ignore:
Timestamp:
Aug 21, 2007, 2:28:31 PM (18 years ago)
Author:
zimmermann
Message:

Reviewed by Oliver.

Large SVG filter rework. Bring it back in a useable state.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=5527 (Filters need subregion support)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=5579 (WebKit+SVG renders full-filters-example incorrectly)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=5976 (filterUnits="userSpaceOnUse" is broken (breaking feTile test case))
Fixes: http://bugs.webkit.org/show_bug.cgi?id=12064 (Need function for manual style-resolution for things like gradient stops)

filters-blend-01-b.svg & filters-example-01-b.svg & filters-displace-01-b.svg & filters-diffuse-01-f.svg are fixed now.

In detail:

  • flood-color & flood-opacity have been incorrectly resolved on the <feBlend> parent element!
  • sizing of filter region was truncated in some cases, as the bbox was used to resolve the needed filter region instead of the filter rect
  • add subregion support to all filter primitives (primitiveUnits & filterUnits handled in all cases)
  • WKDisplacmentMap.cikernel incorrectly flipped the y-axis.
  • Correctly specify default values for all filter primitives in ksvg2/svg!
  • Initialize all variables of the SVGFE* classes in platform/graphics/svg/filters.
  • Fix 'flood-color' initial value (was set to the _stop_ color initial value)

-> both initial values were pointing to 'black' though, so it was no visible problem.

  • Parse 'lighting-color' css property, no more hacking in SVGFEDiffuseLighting.

-> Correct it's initial from black to white value fixes SVG lighting filters!

  • Add diffuseConstant support to feDiffuseLighting filter.
  • Centralize manual style resolution (needed for stop-color, flood-color & flood-opacity, lighting-color)
Location:
branches/feature-branch
Files:
195 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-branch/LayoutTests/ChangeLog

    r25155 r25175  
     12007-08-21  Nikolas Zimmermann  <zimmermann@kde.org>
     2
     3        Reviewed by Oliver.
     4
     5        Updated layout tests results after the SVG filter rework.
     6
     7        * svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum:
     8        * svg/W3C-SVG-1.1/filters-blend-01-b-expected.png:
     9        * svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt:
     10        * svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum:
     11        * svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
     12        * svg/W3C-SVG-1.1/filters-color-01-b-expected.txt:
     13        * svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt:
     14        * svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum:
     15        * svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
     16        * svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt:
     17        * svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.checksum:
     18        * svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.png:
     19        * svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.txt:
     20        * svg/W3C-SVG-1.1/filters-displace-01-f-expected.checksum:
     21        * svg/W3C-SVG-1.1/filters-displace-01-f-expected.png:
     22        * svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt:
     23        * svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum:
     24        * svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
     25        * svg/W3C-SVG-1.1/filters-example-01-b-expected.txt:
     26        * svg/W3C-SVG-1.1/filters-gauss-01-b-expected.checksum:
     27        * svg/W3C-SVG-1.1/filters-gauss-01-b-expected.png:
     28        * svg/W3C-SVG-1.1/filters-gauss-01-b-expected.txt:
     29        * svg/W3C-SVG-1.1/filters-image-01-b-expected.checksum:
     30        * svg/W3C-SVG-1.1/filters-image-01-b-expected.png:
     31        * svg/W3C-SVG-1.1/filters-light-01-f-expected.checksum:
     32        * svg/W3C-SVG-1.1/filters-light-01-f-expected.png:
     33        * svg/W3C-SVG-1.1/filters-light-01-f-expected.txt:
     34        * svg/W3C-SVG-1.1/filters-offset-01-b-expected.checksum:
     35        * svg/W3C-SVG-1.1/filters-offset-01-b-expected.png:
     36        * svg/W3C-SVG-1.1/filters-offset-01-b-expected.txt:
     37        * svg/W3C-SVG-1.1/filters-specular-01-f-expected.checksum:
     38        * svg/W3C-SVG-1.1/filters-specular-01-f-expected.png:
     39        * svg/W3C-SVG-1.1/filters-specular-01-f-expected.txt:
     40        * svg/W3C-SVG-1.1/filters-tile-01-b-expected.txt:
     41        * svg/batik/text/textEffect-expected.checksum:
     42        * svg/batik/text/textEffect-expected.png:
     43        * svg/batik/text/textEffect-expected.txt:
     44        * svg/batik/text/textEffect3-expected.checksum:
     45        * svg/batik/text/textEffect3-expected.png:
     46        * svg/batik/text/textEffect3-expected.txt:
     47        * svg/batik/text/textFeatures-expected.checksum:
     48        * svg/batik/text/textFeatures-expected.png:
     49        * svg/batik/text/textFeatures-expected.txt:
     50        * svg/batik/text/textProperties-expected.checksum:
     51        * svg/batik/text/textProperties-expected.png:
     52        * svg/custom/empty-merge-expected.txt:
     53        * svg/custom/feComponentTransfer-Discrete-expected.checksum:
     54        * svg/custom/feComponentTransfer-Discrete-expected.png:
     55        * svg/custom/feComponentTransfer-Discrete-expected.txt:
     56        * svg/custom/feComponentTransfer-Gamma-expected.checksum:
     57        * svg/custom/feComponentTransfer-Gamma-expected.png:
     58        * svg/custom/feComponentTransfer-Gamma-expected.txt:
     59        * svg/custom/feComponentTransfer-Linear-expected.checksum:
     60        * svg/custom/feComponentTransfer-Linear-expected.png:
     61        * svg/custom/feComponentTransfer-Linear-expected.txt:
     62        * svg/custom/feComponentTransfer-Table-expected.checksum:
     63        * svg/custom/feComponentTransfer-Table-expected.png:
     64        * svg/custom/feComponentTransfer-Table-expected.txt:
     65        * svg/custom/filter-source-alpha-expected.txt:
     66        * svg/custom/image-with-transform-clip-filter-expected.checksum:
     67        * svg/custom/image-with-transform-clip-filter-expected.png:
     68        * svg/custom/image-with-transform-clip-filter-expected.txt:
     69        * svg/custom/invalid-css-expected.txt:
     70        * svg/custom/non-opaque-filters-expected.checksum:
     71        * svg/custom/non-opaque-filters-expected.png:
     72        * svg/custom/non-opaque-filters-expected.txt:
     73        * svg/custom/text-filter-expected.checksum:
     74        * svg/custom/text-filter-expected.png:
     75        * svg/custom/text-filter-expected.txt:
     76        * svg/custom/visibility-override-filter-expected.txt:
     77
    1782007-08-20  Rob Buis  <buis@kde.org>
    279
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.checksum

    r24988 r25175  
    1 d1c2f2a2b232e368e0bf18e09d1ad3bd
     12ebb47652af5fe733082c63d53d8fb22
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="BlendNormal" [type=FILTER]  [effects=[[type=FLOOD] [in="BackgroundAlpha"] [result="img1"] [subregion="at (0,0) size 160x120"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 160x120"] [in2="img1"] [blend mode=NORMAL]]]}
    2 KCanvasResource {id="BlendMultiply" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 160x120"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 160x120"] [in2="img2"] [blend mode=MULTIPLY]]]}
    3 KCanvasResource {id="BlendScreen" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 160x120"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 160x120"] [in2="img2"] [blend mode=SCREEN]]]}
    4 KCanvasResource {id="BlendDarken" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 160x120"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 160x120"] [in2="img2"] [blend mode=DARKEN]]]}
    5 KCanvasResource {id="BlendLighten" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 160x120"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 160x120"] [in2="img2"] [blend mode=LIGHTEN]]]}
     1KCanvasResource {id="BlendNormal" [type=FILTER]  [effects=[[type=FLOOD] [in="BackgroundAlpha"] [result="img1"] [subregion="at (0,0) size 1x1"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="img1"] [blend mode=NORMAL]]]}
     2KCanvasResource {id="BlendMultiply" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 1x1"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="img2"] [blend mode=MULTIPLY]]]}
     3KCanvasResource {id="BlendScreen" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 1x1"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="img2"] [blend mode=SCREEN]]]}
     4KCanvasResource {id="BlendDarken" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 1x1"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="img2"] [blend mode=DARKEN]]]}
     5KCanvasResource {id="BlendLighten" [type=FILTER]  [effects=[[type=FLOOD] [in="SourceGraphic"] [result="img2"] [subregion="at (0,0) size 1x1"] [color=#00FF00] [opacity=0.50], [type=BLEND] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="img2"] [blend mode=LIGHTEN]]]}
    66layer at (0,0) size 480x360
    77  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum

    r24195 r25175  
    1 dfd149ef2a085e39da464081e665f6d0
     11cf5f36b13f0110f6b48d69a9d051e9c
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-color-01-b-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#DD00DD), (0.33,#22CC22), (0.67,#400000), (1.00,#A0A0FF)]] [bounding box mode=0] [start=(20,0)] [end=(760,0)]}
    2 KCanvasResource {id="Matrix" [type=FILTER]  [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 800x500"] [color matrix type=CMT_MATRIX] [values=[0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00]]]]}
    3 KCanvasResource {id="Saturate40" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 800x500"] [color matrix type=CMT_SATURATE] [values=[0.25]]]]}
    4 KCanvasResource {id="HueRotate90" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 800x500"] [color matrix type=HUE-ROTATE] [values=[90.00]]]]}
    5 KCanvasResource {id="LuminanceToAlpha" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [result="a"] [subregion="at (0,0) size 800x500"] [color matrix type=LUMINANCE-TO-ALPHA] [values=[]], [type=COMPOSITE] [in="SourceGraphic"] [subregion="at (0,0) size 800x500"] [in2="a"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     2KCanvasResource {id="Matrix" [type=FILTER]  [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [color matrix type=CMT_MATRIX] [values=[0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00, 0.33, 0.33, 0.33, 0.00, 0.00]]]]}
     3KCanvasResource {id="Saturate40" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [color matrix type=CMT_SATURATE] [values=[0.25]]]]}
     4KCanvasResource {id="HueRotate90" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [color matrix type=HUE-ROTATE] [values=[90.00]]]]}
     5KCanvasResource {id="LuminanceToAlpha" [type=FILTER]  [bounding box=at (-5.00%,-5.00%) size 110.00%x110.00%] [effects=[[type=COLOR-MATRIX] [in="SourceGraphic"] [result="a"] [subregion="at (0,0) size 1x1"] [color matrix type=LUMINANCE-TO-ALPHA] [values=[]], [type=COMPOSITE] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="a"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    66layer at (0,0) size 480x360
    77  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="over" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    2 KCanvasResource {id="over50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    3 KCanvasResource {id="in" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    4 KCanvasResource {id="in50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    5 KCanvasResource {id="out" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    6 KCanvasResource {id="out50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    7 KCanvasResource {id="atop" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    8 KCanvasResource {id="atop50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    9 KCanvasResource {id="xor" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    10 KCanvasResource {id="xor50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    11 KCanvasResource {id="arithmetic" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.50 k2=0.50 k3=0.50 k4=0.50]]]}
    12 KCanvasResource {id="arithmetic50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 480x360"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 480x360"] [in2="blue"] [k1=0.50 k2=0.50 k3=0.50 k4=0.50]]]}
     1KCanvasResource {id="over" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     2KCanvasResource {id="over50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     3KCanvasResource {id="in" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     4KCanvasResource {id="in50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     5KCanvasResource {id="out" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     6KCanvasResource {id="out50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     7KCanvasResource {id="atop" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     8KCanvasResource {id="atop50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     9KCanvasResource {id="xor" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     10KCanvasResource {id="xor50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     11KCanvasResource {id="arithmetic" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.50 k2=0.50 k3=0.50 k4=0.50]]]}
     12KCanvasResource {id="arithmetic50" [type=FILTER]  [effects=[[type=IMAGE]  [result="blue"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="red"] [subregion="at (0,0) size 1x1"], [type=COMPOSITE] [in="red"] [subregion="at (0,0) size 1x1"] [in2="blue"] [k1=0.50 k2=0.50 k3=0.50 k4=0.50]]]}
    1313layer at (0,0) size 480x360
    1414  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum

    r24195 r25175  
    1 297c6d84738f2b3a91c3532fdc679715
     12259dcfdcadd5574d4fc5f4ad193064c
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#FF0000), (0.33,#00FF00), (0.67,#0000FF), (1.00,#000000)]] [bounding box mode=0] [start=(10,0)] [end=(590,0)]}
    2 KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 630x420"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    3 KCanvasResource {id="Table" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 630x420"] [red func=[type=TABLE] [table values=0.00 0.00 1.00 1.00]] [green func=[type=TABLE] [table values=1.00 1.00 0.00 0.00]] [blue func=[type=TABLE] [table values=0.00 1.00 1.00 0.00]] [alpha func=[type=IDENTITY]]]]}
    4 KCanvasResource {id="Linear" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 630x420"] [red func=[type=LINEAR] [slope=0.50] [intercept=0.25]] [green func=[type=LINEAR] [slope=0.50] [intercept=0.00]] [blue func=[type=LINEAR] [slope=0.50] [intercept=0.50]] [alpha func=[type=IDENTITY]]]]}
    5 KCanvasResource {id="Gamma" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 630x420"] [red func=[type=GAMMA] [amplitude=2.00] [exponent=5.00] [offset=0.00]] [green func=[type=GAMMA] [amplitude=2.00] [exponent=3.00] [offset=0.00]] [blue func=[type=GAMMA] [amplitude=2.00] [exponent=1.00] [offset=0.00]] [alpha func=[type=IDENTITY]]]]}
     2KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
     3KCanvasResource {id="Table" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=TABLE] [table values=0.00 0.00 1.00 1.00]] [green func=[type=TABLE] [table values=1.00 1.00 0.00 0.00]] [blue func=[type=TABLE] [table values=0.00 1.00 1.00 0.00]] [alpha func=[type=UNKNOWN]]]]}
     4KCanvasResource {id="Linear" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=LINEAR] [slope=0.50] [intercept=0.25]] [green func=[type=LINEAR] [slope=0.50] [intercept=0.00]] [blue func=[type=LINEAR] [slope=0.50] [intercept=0.50]] [alpha func=[type=UNKNOWN]]]]}
     5KCanvasResource {id="Gamma" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=GAMMA] [amplitude=2.00] [exponent=5.00] [offset=0.00]] [green func=[type=GAMMA] [amplitude=2.00] [exponent=3.00] [offset=0.00]] [blue func=[type=GAMMA] [amplitude=2.00] [exponent=1.00] [offset=0.00]] [alpha func=[type=UNKNOWN]]]]}
    66layer at (0,0) size 480x360
    77  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.checksum

    r24195 r25175  
    1 d4472ce3f88e0d3c9704cd2a13bfe5d2
     1f2682040abcc11ec87ab82c4c6bb609d
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-diffuse-01-f-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="surfaceScaleA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=1.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    2 KCanvasResource {id="surfaceScaleB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    3 KCanvasResource {id="surfaceScaleC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=-10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    4 KCanvasResource {id="diffuseConstantA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=0.00] [kernel unit length 0.00, 0.00]]]}
    5 KCanvasResource {id="diffuseConstantB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    6 KCanvasResource {id="diffuseConstantC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=2.00] [kernel unit length 0.00, 0.00]]]}
    7 KCanvasResource {id="lightingColorA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    8 KCanvasResource {id="lightingColorB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    9 KCanvasResource {id="lightingColorC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     1KCanvasResource {id="surfaceScaleA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=1.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     2KCanvasResource {id="surfaceScaleB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     3KCanvasResource {id="surfaceScaleC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=-10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     4KCanvasResource {id="diffuseConstantA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=0.00] [kernel unit length 0.00, 0.00]]]}
     5KCanvasResource {id="diffuseConstantB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     6KCanvasResource {id="diffuseConstantC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=2.00] [kernel unit length 0.00, 0.00]]]}
     7KCanvasResource {id="lightingColorA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     8KCanvasResource {id="lightingColorB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     9KCanvasResource {id="lightingColorC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    1010layer at (0,0) size 480x360
    1111  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-displace-01-f-expected.checksum

    r24195 r25175  
    1 58cc1fb668056278c50b716735003982
     18ea5b1a164286ba8b9ad45adfaae097c
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt

    r24918 r25175  
    1 KCanvasResource {id="DispMapChecker" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 480x360"]]]}
    2 KCanvasResource {id="RotateMap" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 480x360"]]]}
    3 KCanvasResource {id="SphereMap" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 480x360"]]]}
    4 KCanvasResource {id="RotateMapTest" [type=FILTER]  [effects=[[type=IMAGE]  [result="Map"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="Texture"] [subregion="at (0,0) size 480x360"], [type=DISPLACEMENT-MAP] [in="Texture"] [subregion="at (0,0) size 480x360"] [in2=Map] [scale=64.00] [x channel selector=RED] [y channel selector=GREEN]]]}
    5 KCanvasResource {id="SphereMapTest" [type=FILTER]  [effects=[[type=IMAGE]  [result="Map"] [subregion="at (0,0) size 480x360"], [type=IMAGE]  [result="Texture"] [subregion="at (0,0) size 480x360"], [type=DISPLACEMENT-MAP] [in="Texture"] [subregion="at (0,0) size 480x360"] [in2=Map] [scale=64.00] [x channel selector=RED] [y channel selector=GREEN]]]}
     1KCanvasResource {id="DispMapChecker" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 1x1"]]]}
     2KCanvasResource {id="RotateMap" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 1x1"]]]}
     3KCanvasResource {id="SphereMap" [type=FILTER]  [effects=[[type=IMAGE]  [subregion="at (0,0) size 1x1"]]]}
     4KCanvasResource {id="RotateMapTest" [type=FILTER]  [effects=[[type=IMAGE]  [result="Map"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="Texture"] [subregion="at (0,0) size 1x1"], [type=DISPLACEMENT-MAP] [in="Texture"] [subregion="at (0,0) size 1x1"] [in2=Map] [scale=64.00] [x channel selector=RED] [y channel selector=GREEN]]]}
     5KCanvasResource {id="SphereMapTest" [type=FILTER]  [effects=[[type=IMAGE]  [result="Map"] [subregion="at (0,0) size 1x1"], [type=IMAGE]  [result="Texture"] [subregion="at (0,0) size 1x1"], [type=DISPLACEMENT-MAP] [in="Texture"] [subregion="at (0,0) size 1x1"] [in2=Map] [scale=64.00] [x channel selector=RED] [y channel selector=GREEN]]]}
    66layer at (0,0) size 480x360
    77  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum

    r24195 r25175  
    1 8adbe2700372566e553796f854cf90b6
     15474806f978f72516f044dbfa40676b7
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-example-01-b-expected.txt

    r24991 r25175  
    1 KCanvasResource {id="MyFilter" [type=FILTER]  [bounding box=at (0,0) size 200x120] [bounding box mode=0] [effects=[[type=GAUSSIAN-BLUR] [in="SourceAlpha"] [result="blur"] [subregion="at (0,0) size 200x120"] [std dev. x=4.00 y=4.00], [type=OFFSET] [in="blur"] [result="offsetBlur"] [subregion="at (0,0) size 200x120"] [dx=4.00 dy=4.00], [type=COMPOSITE] [in="SourceGraphic"] [subregion="at (0,0) size 200x120"] [in2="offsetBlur"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
     1KCanvasResource {id="MyFilter" [type=FILTER]  [bounding box=at (0,0) size 200x120] [bounding box mode=0] [effects=[[type=GAUSSIAN-BLUR] [in="SourceAlpha"] [result="blur"] [subregion="at (0,0) size 1x1"] [std dev. x=4.00 y=4.00], [type=OFFSET] [in="blur"] [result="offsetBlur"] [subregion="at (0,0) size 1x1"] [dx=4.00 dy=4.00], [type=COMPOSITE] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [in2="offsetBlur"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00]]]}
    22layer at (0,0) size 480x360
    33  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.checksum

    r24195 r25175  
    1 f94edf05e1c27100630b04e2fef194f5
     1be3bd5618fe08c646c6d2992e06b60f8
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-gauss-01-b-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="blur" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 480x360"] [std dev. x=10.00 y=10.00]]]}
    2 KCanvasResource {id="blurxy" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 480x360"] [std dev. x=20.00 y=1.00]]]}
     1KCanvasResource {id="blur" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=10.00 y=10.00]]]}
     2KCanvasResource {id="blurxy" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=20.00 y=1.00]]]}
    33layer at (0,0) size 480x360
    44  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-image-01-b-expected.checksum

    r24195 r25175  
    1 cf23254d4861d52870ecb8c04e68ec4a
     11cfe85985fb1da8c7256a92d91988d97
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-light-01-f-expected.checksum

    r24195 r25175  
    1 00cfd25b4ace9c446064849bd4cabeda
     1075371d7205b181b922d913f63830e58
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-light-01-f-expected.txt

    r24918 r25175  
    1 KCanvasResource {id="distantLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    2 KCanvasResource {id="distantLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    3 KCanvasResource {id="distantLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    4 KCanvasResource {id="distantLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    5 KCanvasResource {id="pointLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    6 KCanvasResource {id="pointLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    7 KCanvasResource {id="pointLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    8 KCanvasResource {id="pointLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    9 KCanvasResource {id="spotLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    10 KCanvasResource {id="spotLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    11 KCanvasResource {id="spotLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    12 KCanvasResource {id="spotLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     1KCanvasResource {id="distantLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     2KCanvasResource {id="distantLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     3KCanvasResource {id="distantLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     4KCanvasResource {id="distantLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     5KCanvasResource {id="pointLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     6KCanvasResource {id="pointLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     7KCanvasResource {id="pointLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     8KCanvasResource {id="pointLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     9KCanvasResource {id="spotLightA" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     10KCanvasResource {id="spotLightB" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     11KCanvasResource {id="spotLightC" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
     12KCanvasResource {id="spotLightD" [type=FILTER]  [effects=[[type=DIFFUSE-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [diffuse constant=1.00] [kernel unit length 0.00, 0.00]]]}
    1313layer at (0,0) size 480x360
    1414  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-offset-01-b-expected.checksum

    r24195 r25175  
    1 5d6382722a9cf6d1f2cda0a97c028cb1
     176a51f2ea37908f3b876e77cc603a163
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-offset-01-b-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="FOMTest" [type=FILTER]  [bounding box=at (0.00%,0.00%) size 250.00%x400.00%] [effects=[[type=OFFSET]  [result="Off1"] [subregion="at (0,0) size 480x360"] [dx=40.00 dy=30.00], [type=FLOOD]  [result="F1"] [subregion="at (0,0) size 480x360"] [color=#408000] [opacity=0.80], [type=COMPOSITE]  [result="C1"] [subregion="at (0,0) size 480x360"] [in2="Off1"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=OFFSET] [in="SourceGraphic"] [result="Off2"] [subregion="at (0,0) size 480x360"] [dx=80.00 dy=60.00], [type=FLOOD]  [result="F2"] [subregion="at (0,0) size 480x360"] [color=#408000] [opacity=0.60], [type=COMPOSITE]  [result="C2"] [subregion="at (0,0) size 480x360"] [in2="Off2"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=OFFSET] [in="SourceGraphic"] [result="Off3"] [subregion="at (0,0) size 480x360"] [dx=120.00 dy=90.00], [type=FLOOD]  [result="F3"] [subregion="at (0,0) size 480x360"] [color=#408000] [opacity=0.40], [type=COMPOSITE]  [result="C3"] [subregion="at (0,0) size 480x360"] [in2="Off3"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=MERGE]  [subregion="at (0,0) size 480x360"][merge inputs=[C3, C2, C1, SourceGraphic]]]]}
     1KCanvasResource {id="FOMTest" [type=FILTER]  [bounding box=at (0.00%,0.00%) size 250.00%x400.00%] [effects=[[type=OFFSET]  [result="Off1"] [subregion="at (0,0) size 1x1"] [dx=40.00 dy=30.00], [type=FLOOD]  [result="F1"] [subregion="at (0,0) size 1x1"] [color=#408000] [opacity=0.80], [type=COMPOSITE]  [result="C1"] [subregion="at (0,0) size 1x1"] [in2="Off1"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=OFFSET] [in="SourceGraphic"] [result="Off2"] [subregion="at (0,0) size 1x1"] [dx=80.00 dy=60.00], [type=FLOOD]  [result="F2"] [subregion="at (0,0) size 1x1"] [color=#408000] [opacity=0.60], [type=COMPOSITE]  [result="C2"] [subregion="at (0,0) size 1x1"] [in2="Off2"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=OFFSET] [in="SourceGraphic"] [result="Off3"] [subregion="at (0,0) size 1x1"] [dx=120.00 dy=90.00], [type=FLOOD]  [result="F3"] [subregion="at (0,0) size 1x1"] [color=#408000] [opacity=0.40], [type=COMPOSITE]  [result="C3"] [subregion="at (0,0) size 1x1"] [in2="Off3"] [k1=0.00 k2=0.00 k3=0.00 k4=0.00], [type=MERGE]  [subregion="at (0,0) size 1x1"][merge inputs=[C3, C2, C1, SourceGraphic]]]]}
    22layer at (0,0) size 480x360
    33  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-specular-01-f-expected.checksum

    r24195 r25175  
    1 3609806c0af9693312f9318d15b739db
     180afa9d1e649c20fbe4b42b7d574b20c
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-specular-01-f-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="surfaceScaleA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=1.00] [specual constant=1.00] [specular exponent=1.00]]]}
    2 KCanvasResource {id="surfaceScaleB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    3 KCanvasResource {id="surfaceScaleC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=-10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    4 KCanvasResource {id="specularConstantA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=0.00] [specular exponent=1.00]]]}
    5 KCanvasResource {id="specularConstantB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    6 KCanvasResource {id="specularConstantC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=2.00] [specular exponent=1.00]]]}
    7 KCanvasResource {id="specularExponentA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    8 KCanvasResource {id="specularExponentB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=2.00]]]}
    9 KCanvasResource {id="specularExponentC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=4.00]]]}
    10 KCanvasResource {id="lightingColorA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    11 KCanvasResource {id="lightingColorB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    12 KCanvasResource {id="lightingColorC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 480x360"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     1KCanvasResource {id="surfaceScaleA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=1.00] [specual constant=1.00] [specular exponent=1.00]]]}
     2KCanvasResource {id="surfaceScaleB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     3KCanvasResource {id="surfaceScaleC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=-10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     4KCanvasResource {id="specularConstantA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=0.00] [specular exponent=1.00]]]}
     5KCanvasResource {id="specularConstantB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     6KCanvasResource {id="specularConstantC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=2.00] [specular exponent=1.00]]]}
     7KCanvasResource {id="specularExponentA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     8KCanvasResource {id="specularExponentB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=2.00]]]}
     9KCanvasResource {id="specularExponentC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=4.00]]]}
     10KCanvasResource {id="lightingColorA" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     11KCanvasResource {id="lightingColorB" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
     12KCanvasResource {id="lightingColorC" [type=FILTER]  [effects=[[type=SPECULAR-LIGHTING] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [surface scale=10.00] [specual constant=1.00] [specular exponent=1.00]]]}
    1313layer at (0,0) size 480x360
    1414  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/W3C-SVG-1.1/filters-tile-01-b-expected.txt

    r24918 r25175  
    1 KCanvasResource {id="feTileFilter" [type=FILTER]  [bounding box=at (115,40) size 250x250] [bounding box mode=0] [effects=[[type=FLOOD]  [subregion="at (115,40) size 54x19"] [color=#FF0000] [opacity=1.00], [type=OFFSET]  [result="offset"] [subregion="at (115,40) size 50x25"] [dx=6.00 dy=6.00],  [subregion="at (0,0) size 480x360"]]]}
     1KCanvasResource {id="feTileFilter" [type=FILTER]  [bounding box=at (115,40) size 250x250] [bounding box mode=0] [effects=[[type=FLOOD]  [subregion="at (115,40) size 54x19"] [color=#FF0000] [opacity=1.00], [type=OFFSET]  [result="offset"] [subregion="at (115,40) size 50x25"] [dx=6.00 dy=6.00],  [subregion="at (0,0) size 1x1"]]]}
    22layer at (0,0) size 480x360
    33  RenderView at (0,0) size 480x360
  • branches/feature-branch/LayoutTests/svg/batik/text/textEffect-expected.checksum

    r24918 r25175  
    1 3c8af3933d6e4fac08dbe1e2e86657f9
     1d1d9f18626d1543fb6e584bd4e96daf0
  • branches/feature-branch/LayoutTests/svg/batik/text/textEffect-expected.txt

    r24918 r25175  
    11KRenderingPaintServer {id="linearGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}
    22KRenderingPaintServer {id="radialGradient" [type=RADIAL-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50]}
    3 KCanvasResource {id="dropShadow" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceGraphic"] [subregion="at (0,0) size 450x500"] [std dev. x=2.00 y=2.00]]]}
     3KCanvasResource {id="dropShadow" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [std dev. x=2.00 y=2.00]]]}
    44layer at (0,0) size 800x600
    55  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/batik/text/textEffect3-expected.checksum

    r24918 r25175  
    1 6f77cc9b4c94d75ae3dcfac75925981c
     1b3f1482e2f1c655338b87ff6b5945e60
  • branches/feature-branch/LayoutTests/svg/batik/text/textEffect3-expected.txt

    r24918 r25175  
    11KRenderingPaintServer {id="linearGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [start=(0,0)] [end=(1,0)]}
    22KRenderingPaintServer {id="radialGradient" [type=RADIAL-GRADIENT] [stops=[(0.00,#FFD700), (0.50,#FFA500), (1.00,#DC143C)]] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50]}
    3 KCanvasResource {id="dropShadow" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceGraphic"] [subregion="at (0,0) size 450x500"] [std dev. x=2.00 y=2.00]]]}
     3KCanvasResource {id="dropShadow" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceGraphic"] [subregion="at (0,0) size 1x1"] [std dev. x=2.00 y=2.00]]]}
    44layer at (0,0) size 800x600
    55  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/batik/text/textFeatures-expected.checksum

    r24988 r25175  
    1 ba9c8bd4269637a70bcedb31ee753545
     145364b0f3624bce3e8078a7a919a8a8d
  • branches/feature-branch/LayoutTests/svg/batik/text/textFeatures-expected.txt

    r24918 r25175  
     1KCanvasResource {id="blur" [type=FILTER]  [bounding box=at (0,-80) size 200x100] [bounding box mode=0] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,-80) size 200x100"] [std dev. x=2.00 y=2.00]]]}
    12layer at (0,0) size 800x600
    23  RenderView at (0,0) size 800x600
    34layer at (0,0) size 450x500
    45  RenderSVGRoot {svg} at (45,36) size 349x449.20
     6    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    57    RenderSVGContainer {g} at (45,36) size 349x449.20
    68      RenderSVGText {text} at (151,50) size 148x17 contains 1 chunk(s)
  • branches/feature-branch/LayoutTests/svg/batik/text/textPosition-expected.checksum

    r21607 r25175  
    1 a526c9bb407515eda2ec81f6b2668b72
     1597ffa42c2591b9241118d11c480d3a7
  • branches/feature-branch/LayoutTests/svg/batik/text/textPosition-expected.txt

    r24918 r25175  
    1313        RenderSVGInlineText {#text} at (0,-9) size 103x11
    1414          chunk 1 text run 1 at (50.00,100.00) startOffset 0 endOffset 21 width 103.00: "<text x=\"100\" y=\"80\">"
    15       RenderSVGText {text} at (240,80) size 53x27 contains 1 chunk(s)
    16         RenderSVGInlineText {#text} at (0,-22) size 53x27
    17           chunk 1 text run 1 at (240.00,80.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     15      RenderSVGText {text} at (240,80) size 153x27 contains 1 chunk(s)
     16        RenderSVGInlineText {#text} at (0,-22) size 153x27
     17          chunk 1 text run 1 at (240.00,80.00) startOffset 0 endOffset 5 width 153.00: "Batik"
    1818      RenderSVGText {text} at (240,100) size 194x11 contains 1 chunk(s)
    1919        RenderSVGInlineText {#text} at (0,-9) size 194x11
     
    4242        RenderSVGInlineText {#text} at (0,-9) size 112x11
    4343          chunk 1 text run 1 at (50.00,220.00) startOffset 0 endOffset 22 width 112.00: "<tspan x=\"50\" y=\"200\">"
    44       RenderSVGText {text} at (240,200) size 53x27 contains 1 chunk(s)
    45         RenderSVGTSpan {tspan} at (0,0) size 53x27
    46           RenderSVGInlineText {#text} at (0,-22) size 53x27
    47             chunk 1 text run 1 at (240.00,200.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     44      RenderSVGText {text} at (240,200) size 153x27 contains 1 chunk(s)
     45        RenderSVGTSpan {tspan} at (0,0) size 153x27
     46          RenderSVGInlineText {#text} at (0,-22) size 153x27
     47            chunk 1 text run 1 at (240.00,200.00) startOffset 0 endOffset 5 width 153.00: "Batik"
    4848      RenderSVGText {text} at (240,220) size 209x11 contains 1 chunk(s)
    4949        RenderSVGTSpan {tspan} at (0,0) size 209x11
     
    8282          RenderSVGInlineText {#text} at (33,2) size 137x11
    8383            chunk 2 text run 1 at (83.00,351.00) startOffset 0 endOffset 27 width 137.00: "dx=\"0 10 20 30 40\" y=\"320\">"
    84       RenderSVGText {text} at (240,320) size 93x27 contains 1 chunk(s)
    85         RenderSVGTSpan {tspan} at (0,0) size 93x27
    86           RenderSVGInlineText {#text} at (0,-22) size 93x27
    87             chunk 1 text run 1 at (240.00,320.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     84      RenderSVGText {text} at (240,320) size 143x27 contains 1 chunk(s)
     85        RenderSVGTSpan {tspan} at (0,0) size 143x27
     86          RenderSVGInlineText {#text} at (0,-22) size 143x27
     87            chunk 1 text run 1 at (240.00,320.00) startOffset 0 endOffset 5 width 103.00: "Batik"
    8888      RenderSVGText {text} at (240,340) size 191x22 contains 2 chunk(s)
    8989        RenderSVGInlineText {#text} at (0,-9) size 169x11
  • branches/feature-branch/LayoutTests/svg/batik/text/textPosition2-expected.checksum

    r21607 r25175  
    1 4d73af2fa5b048bd51431b1e9579d6bf
     13dabd5e40e73ab2489f8c77d43618999
  • branches/feature-branch/LayoutTests/svg/batik/text/textPosition2-expected.txt

    r24292 r25175  
    1414        RenderSVGInlineText {#text} at (0,-9) size 103x11
    1515          chunk 1 text run 1 at (50.00,100.00) startOffset 0 endOffset 21 width 103.00: "<text x=\"100\" y=\"80\">"
    16       RenderSVGText {text} at (240,80) size 53x28 contains 1 chunk(s)
    17         RenderSVGInlineText {#text} at (0,-22) size 53x28
    18           chunk 1 text run 1 at (240.00,80.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     16      RenderSVGText {text} at (240,80) size 153x28 contains 1 chunk(s)
     17        RenderSVGInlineText {#text} at (0,-22) size 153x28
     18          chunk 1 text run 1 at (240.00,80.00) startOffset 0 endOffset 5 width 153.00: "Batik"
    1919      RenderSVGText {text} at (240,100) size 194x11 contains 1 chunk(s)
    2020        RenderSVGInlineText {#text} at (0,-9) size 194x11
     
    4343        RenderSVGInlineText {#text} at (0,-9) size 112x11
    4444          chunk 1 text run 1 at (50.00,220.00) startOffset 0 endOffset 22 width 112.00: "<tspan x=\"50\" y=\"200\">"
    45       RenderSVGText {text} at (240,200) size 53x28 contains 1 chunk(s)
    46         RenderSVGTSpan {tspan} at (0,0) size 53x28
    47           RenderSVGInlineText {#text} at (0,-22) size 53x28
    48             chunk 1 text run 1 at (240.00,200.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     45      RenderSVGText {text} at (240,200) size 153x28 contains 1 chunk(s)
     46        RenderSVGTSpan {tspan} at (0,0) size 153x28
     47          RenderSVGInlineText {#text} at (0,-22) size 153x28
     48            chunk 1 text run 1 at (240.00,200.00) startOffset 0 endOffset 5 width 153.00: "Batik"
    4949      RenderSVGText {text} at (240,220) size 209x11 contains 1 chunk(s)
    5050        RenderSVGTSpan {tspan} at (0,0) size 209x11
     
    8383          RenderSVGInlineText {#text} at (33,2) size 137x11
    8484            chunk 2 text run 1 at (83.00,351.00) startOffset 0 endOffset 27 width 137.00: "dx=\"0 10 20 30 40\" y=\"320\">"
    85       RenderSVGText {text} at (240,320) size 93x28 contains 1 chunk(s)
    86         RenderSVGTSpan {tspan} at (0,0) size 93x28
    87           RenderSVGInlineText {#text} at (0,-22) size 93x28
    88             chunk 1 text run 1 at (240.00,320.00) startOffset 0 endOffset 5 width 53.00: "Batik"
     85      RenderSVGText {text} at (240,320) size 143x28 contains 1 chunk(s)
     86        RenderSVGTSpan {tspan} at (0,0) size 143x28
     87          RenderSVGInlineText {#text} at (0,-22) size 143x28
     88            chunk 1 text run 1 at (240.00,320.00) startOffset 0 endOffset 5 width 103.00: "Batik"
    8989      RenderSVGText {text} at (240,340) size 191x22 contains 2 chunk(s)
    9090        RenderSVGInlineText {#text} at (0,-9) size 169x11
  • branches/feature-branch/LayoutTests/svg/batik/text/textProperties-expected.checksum

    r24916 r25175  
    1 95b0e5e1abcf9f574f717ae77805bba6
     19ebba2885801ad6fa41d6d59ed78a8dd
  • branches/feature-branch/LayoutTests/svg/custom/empty-merge-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="MyFilter" [type=FILTER]  [bounding box=at (0,0) size 100x100] [bounding box mode=0] [effects=[[type=MERGE]  [subregion="at (0,0) size 800x600"][merge inputs=[]]]]}
     1KCanvasResource {id="MyFilter" [type=FILTER]  [bounding box=at (0,0) size 100x100] [bounding box mode=0] [effects=[[type=MERGE]  [subregion="at (0,0) size 1x1"][merge inputs=[]]]]}
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Discrete-expected.checksum

    r24195 r25175  
    1 13428be95babc37d09128984188bd622
     1b5290f6d3849e1b9102f91ef18e17273
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Discrete-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#00FF00), (1.00,#000000)]] [bounding box mode=0] [start=(10,0)] [end=(590,0)]}
    2 KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    3 KCanvasResource {id="DiscreteBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=DISCRETE] [table values=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    4 KCanvasResource {id="DiscreteFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=DISCRETE] [table values=1.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    5 KCanvasResource {id="DiscreteOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=DISCRETE] [table values=0.00 0.25 0.50 0.75 1.00 1.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
     2KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=IDENTITY]] [green func=[type=UNKNOWN]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     3KCanvasResource {id="DiscreteBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=DISCRETE] [table values=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     4KCanvasResource {id="DiscreteFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=DISCRETE] [table values=1.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     5KCanvasResource {id="DiscreteOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=DISCRETE] [table values=0.00 0.25 0.50 0.75 1.00 1.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
    66layer at (0,0) size 800x600
    77  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Gamma-expected.checksum

    r24195 r25175  
    1 dc1fd18a37d76a804c94a19f693882c4
     1283c7bb5027c2da3625caea2f317948c
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Gamma-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#00FF00), (1.00,#000000)]] [bounding box mode=0] [start=(10,0)] [end=(590,0)]}
    2 KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    3 KCanvasResource {id="GammaBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=1.00] [offset=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    4 KCanvasResource {id="GammaFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=0.50] [offset=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    5 KCanvasResource {id="GammaOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=2.00] [offset=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
     2KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=IDENTITY]] [green func=[type=UNKNOWN]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     3KCanvasResource {id="GammaBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=1.00] [offset=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     4KCanvasResource {id="GammaFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=0.50] [offset=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     5KCanvasResource {id="GammaOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=GAMMA] [amplitude=1.00] [exponent=2.00] [offset=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
    66layer at (0,0) size 800x600
    77  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Linear-expected.checksum

    r24195 r25175  
    1 6547f926af04f7451df94085fb98d9fc
     14b3e3b3a2da695f3e1830b5c929d1401
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Linear-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#00FF00), (1.00,#000000)]] [bounding box mode=0] [start=(10,0)] [end=(590,0)]}
    2 KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    3 KCanvasResource {id="DiscreteBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=LINEAR] [slope=1.00] [intercept=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    4 KCanvasResource {id="DiscreteFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=LINEAR] [slope=-1.00] [intercept=1.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    5 KCanvasResource {id="DiscreteOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=LINEAR] [slope=0.50] [intercept=0.25]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
     2KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=IDENTITY]] [green func=[type=UNKNOWN]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     3KCanvasResource {id="DiscreteBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=LINEAR] [slope=1.00] [intercept=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     4KCanvasResource {id="DiscreteFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=LINEAR] [slope=-1.00] [intercept=1.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     5KCanvasResource {id="DiscreteOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=LINEAR] [slope=0.50] [intercept=0.25]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
    66layer at (0,0) size 800x600
    77  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Table-expected.checksum

    r24195 r25175  
    1 fffb31674cfeac133a0af966d8eaafad
     16d440cce5f03a21f1608c5d33bbc2527
  • branches/feature-branch/LayoutTests/svg/custom/feComponentTransfer-Table-expected.txt

    r24991 r25175  
    11KRenderingPaintServer {id="MyGradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#00FF00), (1.00,#000000)]] [bounding box mode=0] [start=(10,0)] [end=(590,0)]}
    2 KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=IDENTITY]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    3 KCanvasResource {id="TableBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=TABLE] [table values=0.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    4 KCanvasResource {id="TableFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=TABLE] [table values=1.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
    5 KCanvasResource {id="TableOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 650x420"] [red func=[type=IDENTITY]] [green func=[type=TABLE] [table values=0.00 0.00 1.00 1.00]] [blue func=[type=IDENTITY]] [alpha func=[type=IDENTITY]]]]}
     2KCanvasResource {id="Identity" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=IDENTITY]] [green func=[type=UNKNOWN]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     3KCanvasResource {id="TableBlank" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=TABLE] [table values=0.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     4KCanvasResource {id="TableFull" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=TABLE] [table values=1.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
     5KCanvasResource {id="TableOrd" [type=FILTER]  [effects=[[type=COMPONENT-TRANSFER]  [subregion="at (0,0) size 1x1"] [red func=[type=UNKNOWN]] [green func=[type=TABLE] [table values=0.00 0.00 1.00 1.00]] [blue func=[type=UNKNOWN]] [alpha func=[type=UNKNOWN]]]]}
    66layer at (0,0) size 800x600
    77  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/filter-source-alpha-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="filter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceAlpha"] [result="blur"] [subregion="at (0,0) size 800x600"] [std dev. x=0.00 y=0.00], [type=MERGE]  [subregion="at (0,0) size 800x600"][merge inputs=[blur, SourceGraphic]]]]}
     1KCanvasResource {id="filter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR] [in="SourceAlpha"] [result="blur"] [subregion="at (0,0) size 1x1"] [std dev. x=0.00 y=0.00], [type=MERGE]  [subregion="at (0,0) size 1x1"][merge inputs=[blur, SourceGraphic]]]]}
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/image-with-transform-clip-filter-expected.checksum

    r24292 r25175  
    1 18fa2144e5fa3267182ab25d83100396
     197e0a7731a94009f6e7a849e92bbaf6d
  • branches/feature-branch/LayoutTests/svg/custom/image-with-transform-clip-filter-expected.txt

    r24292 r25175  
    11KCanvasResource {id="myclip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00]]]}
    2 KCanvasResource {id="myfilter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 800x600"] [std dev. x=10.00 y=10.00]]]}
     2KCanvasResource {id="myfilter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=10.00 y=10.00]]]}
    33layer at (0,0) size 800x600
    44  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/invalid-css-expected.txt

    r24991 r25175  
    11KCanvasResource {id="clip1" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M40.00,40.00L39.98,40.63L39.92,41.25L39.82,41.87L39.69,42.49L39.51,43.09L39.30,43.68L39.05,44.26L38.76,44.82L38.44,45.36L38.09,45.88L37.71,46.37L37.29,46.85L36.85,47.29L36.37,47.71L35.88,48.09L35.36,48.44L34.82,48.76L34.26,49.05L33.68,49.30L33.09,49.51L32.49,49.69L31.87,49.82L31.25,49.92L30.63,49.98L30.00,50.00L29.37,49.98L28.75,49.92L28.13,49.82L27.51,49.69L26.91,49.51L26.32,49.30L25.74,49.05L25.18,48.76L24.64,48.44L24.12,48.09L23.63,47.71L23.15,47.29L22.71,46.85L22.29,46.37L21.91,45.88L21.56,45.36L21.24,44.82L20.95,44.26L20.70,43.68L20.49,43.09L20.31,42.49L20.18,41.87L20.08,41.25L20.02,40.63L20.00,40.00L20.02,39.37L20.08,38.75L20.18,38.13L20.31,37.51L20.49,36.91L20.70,36.32L20.95,35.74L21.24,35.18L21.56,34.64L21.91,34.12L22.29,33.63L22.71,33.15L23.15,32.71L23.63,32.29L24.12,31.91L24.64,31.56L25.18,31.24L25.74,30.95L26.32,30.70L26.91,30.49L27.51,30.31L28.13,30.18L28.75,30.08L29.37,30.02L30.00,30.00L30.63,30.02L31.25,30.08L31.87,30.18L32.49,30.31L33.09,30.49L33.68,30.70L34.26,30.95L34.82,31.24L35.36,31.56L35.88,31.91L36.37,32.29L36.85,32.71L37.29,33.15L37.71,33.63L38.09,34.12L38.44,34.64L38.76,35.18L39.05,35.74L39.30,36.32L39.51,36.91L39.69,37.51L39.82,38.13L39.92,38.75L39.98,39.37]]]}
    22KRenderingPaintServer {id="grad" [type=LINEAR-GRADIENT] [stops=[(0.00,#008000)]] [start=(0,0)] [end=(1,0)]}
    3 KCanvasResource {id="blurxy" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 480x360"] [std dev. x=5.00 y=1.00]]]}
     3KCanvasResource {id="blurxy" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=5.00 y=1.00]]]}
    44KCanvasResource {id="marker1" [type=MARKER] [angle=0.00] [ref x=5.00 y=5.00]}
    55layer at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/non-opaque-filters-expected.checksum

    r24195 r25175  
    1 02d502476ee4f6dc4f5cfc3de57131d0
     197252bbb0b780edadd891f9153597472
  • branches/feature-branch/LayoutTests/svg/custom/non-opaque-filters-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="gblur" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 800x600"] [std dev. x=0.00 y=0.00]]]}
     1KCanvasResource {id="gblur" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=0.00 y=0.00]]]}
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/text-filter-expected.checksum

    r24195 r25175  
    1 fd3b962033560950ff50e8fa7ce804a2
     131839d09e684e09de4e9a01bd2282cd2
  • branches/feature-branch/LayoutTests/svg/custom/text-filter-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="myfilter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 800x600"] [std dev. x=3.00 y=3.00]]]}
     1KCanvasResource {id="myfilter" [type=FILTER]  [bounding box=at (-10.00%,-10.00%) size 120.00%x120.00%] [effects=[[type=GAUSSIAN-BLUR]  [subregion="at (0,0) size 1x1"] [std dev. x=3.00 y=3.00]]]}
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
  • branches/feature-branch/LayoutTests/svg/custom/visibility-override-filter-expected.txt

    r24292 r25175  
    1 KCanvasResource {id="myfilter" [type=FILTER]  [effects=[[type=FLOOD]  [subregion="at (0,0) size 800x600"] [color=#008000] [opacity=1.00]]]}
     1KCanvasResource {id="myfilter" [type=FILTER]  [effects=[[type=FLOOD]  [subregion="at (0,0) size 1x1"] [color=#008000] [opacity=1.00]]]}
    22layer at (0,0) size 800x600
    33  RenderView at (0,0) size 800x600
  • branches/feature-branch/WebCore/ChangeLog

    r25155 r25175  
     12007-08-21  Nikolas Zimmermann  <zimmermann@kde.org>
     2
     3        Reviewed by Oliver.
     4
     5        Large SVG filter rework. Bring it back in a useable state.
     6
     7        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5527 (Filters need subregion support)
     8        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5579 (WebKit+SVG renders full-filters-example incorrectly)
     9        Fixes: http://bugs.webkit.org/show_bug.cgi?id=5976 (filterUnits="userSpaceOnUse" is broken (breaking feTile test case))
     10        Fixes: http://bugs.webkit.org/show_bug.cgi?id=12064 (Need function for manual style-resolution for things like gradient stops)
     11
     12        filters-blend-01-b.svg & filters-example-01-b.svg & filters-displace-01-b.svg & filters-diffuse-01-f.svg are fixed now.
     13
     14        In detail:
     15        - flood-color & flood-opacity have been incorrectly resolved on the <feBlend> parent element!
     16        - sizing of filter region was truncated in some cases, as the bbox was used to resolve the needed filter region instead of the filter rect
     17        - add subregion support to all filter primitives (primitiveUnits & filterUnits handled in all cases)
     18        - WKDisplacmentMap.cikernel incorrectly flipped the y-axis.
     19        - Correctly specify default values for all filter primitives in ksvg2/svg!
     20        - Initialize all variables of the SVGFE* classes in platform/graphics/svg/filters.
     21        - Fix 'flood-color' initial value (was set to the _stop_ color initial value)
     22          -> both initial values were pointing to 'black' though, so it was no visible problem.
     23        - Parse 'lighting-color' css property, no more hacking in SVGFEDiffuseLighting.
     24          -> Correct it's initial from black to white value fixes SVG lighting filters!
     25        - Add diffuseConstant support to feDiffuseLighting filter.
     26        - Centralize manual style resolution (needed for stop-color, flood-color & flood-opacity, lighting-color)
     27
     28        * ksvg2/css/SVGCSSParser.cpp:
     29        * ksvg2/css/SVGCSSStyleSelector.cpp:
     30        (WebCore::CSSStyleSelector::applySVGProperty):
     31        * ksvg2/css/SVGRenderStyle.h:
     32        * ksvg2/css/SVGRenderStyleDefs.cpp:
     33        (StyleMiscData::StyleMiscData):
     34        (StyleMiscData::operator==):
     35        * ksvg2/css/SVGRenderStyleDefs.h:
     36        * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
     37        (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
     38        * ksvg2/svg/SVGFEBlendElement.cpp:
     39        (WebCore::SVGFEBlendElement::SVGFEBlendElement):
     40        (WebCore::SVGFEBlendElement::filterEffect):
     41        * ksvg2/svg/SVGFEBlendElement.h:
     42        * ksvg2/svg/SVGFEColorMatrixElement.cpp:
     43        (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
     44        (WebCore::SVGFEColorMatrixElement::filterEffect):
     45        * ksvg2/svg/SVGFEColorMatrixElement.h:
     46        * ksvg2/svg/SVGFEComponentTransferElement.cpp:
     47        (WebCore::SVGFEComponentTransferElement::filterEffect):
     48        * ksvg2/svg/SVGFEComponentTransferElement.h:
     49        * ksvg2/svg/SVGFECompositeElement.cpp:
     50        (WebCore::SVGFECompositeElement::SVGFECompositeElement):
     51        (WebCore::SVGFECompositeElement::parseMappedAttribute):
     52        (WebCore::SVGFECompositeElement::filterEffect):
     53        * ksvg2/svg/SVGFECompositeElement.h:
     54        * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
     55        (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
     56        (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
     57        (WebCore::SVGFEDiffuseLightingElement::filterEffect):
     58        * ksvg2/svg/SVGFEDiffuseLightingElement.h:
     59        * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
     60        (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
     61        (WebCore::SVGFEDisplacementMapElement::filterEffect):
     62        * ksvg2/svg/SVGFEDisplacementMapElement.h:
     63        * ksvg2/svg/SVGFEDistantLightElement.cpp:
     64        (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
     65        * ksvg2/svg/SVGFEDistantLightElement.h:
     66        * ksvg2/svg/SVGFEFloodElement.cpp:
     67        (WebCore::SVGFEFloodElement::filterEffect):
     68        * ksvg2/svg/SVGFEFloodElement.h:
     69        * ksvg2/svg/SVGFEFuncAElement.cpp:
     70        * ksvg2/svg/SVGFEFuncAElement.h:
     71        * ksvg2/svg/SVGFEFuncBElement.cpp:
     72        * ksvg2/svg/SVGFEFuncBElement.h:
     73        * ksvg2/svg/SVGFEFuncGElement.cpp:
     74        (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
     75        * ksvg2/svg/SVGFEFuncGElement.h:
     76        * ksvg2/svg/SVGFEFuncRElement.cpp:
     77        * ksvg2/svg/SVGFEFuncRElement.h:
     78        * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
     79        (WebCore::SVGFEGaussianBlurElement::filterEffect):
     80        * ksvg2/svg/SVGFEGaussianBlurElement.h:
     81        * ksvg2/svg/SVGFEImageElement.cpp:
     82        (WebCore::SVGFEImageElement::notifyFinished):
     83        (WebCore::SVGFEImageElement::filterEffect):
     84        * ksvg2/svg/SVGFEImageElement.h:
     85        * ksvg2/svg/SVGFELightElement.cpp:
     86        (WebCore::SVGFELightElement::SVGFELightElement):
     87        * ksvg2/svg/SVGFELightElement.h:
     88        * ksvg2/svg/SVGFEMergeElement.cpp:
     89        (WebCore::SVGFEMergeElement::filterEffect):
     90        * ksvg2/svg/SVGFEMergeElement.h:
     91        * ksvg2/svg/SVGFEMergeNodeElement.cpp:
     92        * ksvg2/svg/SVGFEMergeNodeElement.h:
     93        * ksvg2/svg/SVGFEOffsetElement.cpp:
     94        (WebCore::SVGFEOffsetElement::filterEffect):
     95        * ksvg2/svg/SVGFEOffsetElement.h:
     96        * ksvg2/svg/SVGFEPointLightElement.h:
     97        * ksvg2/svg/SVGFESpecularLightingElement.cpp:
     98        (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
     99        (WebCore::SVGFESpecularLightingElement::parseMappedAttribute):
     100        (WebCore::SVGFESpecularLightingElement::filterEffect):
     101        (WebCore::SVGFESpecularLightingElement::updateLights):
     102        * ksvg2/svg/SVGFESpecularLightingElement.h:
     103        * ksvg2/svg/SVGFESpotLightElement.cpp:
     104        (WebCore::SVGFESpotLightElement::lightSource):
     105        * ksvg2/svg/SVGFESpotLightElement.h:
     106        * ksvg2/svg/SVGFETileElement.cpp:
     107        (WebCore::SVGFETileElement::filterEffect):
     108        * ksvg2/svg/SVGFETileElement.h:
     109        * ksvg2/svg/SVGFETurbulenceElement.cpp:
     110        (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
     111        (WebCore::SVGFETurbulenceElement::filterEffect):
     112        * ksvg2/svg/SVGFETurbulenceElement.h:
     113        * ksvg2/svg/SVGFilterElement.cpp:
     114        (WebCore::SVGFilterElement::canvasResource):
     115        * ksvg2/svg/SVGFilterElement.h:
     116        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
     117        (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
     118        (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
     119        * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
     120        * ksvg2/svg/SVGGradientElement.cpp:
     121        (WebCore::SVGGradientElement::buildStops):
     122        * ksvg2/svg/SVGStyledElement.cpp:
     123        (WebCore::SVGStyledElement::resolveStyle):
     124        * ksvg2/svg/SVGStyledElement.h:
     125        * platform/graphics/svg/SVGResourceFilter.cpp:
     126        (WebCore::SVGResourceFilter::addFilterEffect):
     127        (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
     128        * platform/graphics/svg/SVGResourceFilter.h:
     129        (WebCore::SVGResourceFilter::xBoundingBoxMode):
     130        (WebCore::SVGResourceFilter::setXBoundingBoxMode):
     131        (WebCore::SVGResourceFilter::yBoundingBoxMode):
     132        (WebCore::SVGResourceFilter::setYBoundingBoxMode):
     133        * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
     134        (WebCore::SVGResourceFilter::SVGResourceFilter):
     135        (WebCore::SVGResourceFilter::createFilterEffect):
     136        (WebCore::SVGResourceFilter::prepareFilter):
     137        (WebCore::dumpOutputImage):
     138        (WebCore::SVGResourceFilter::applyFilter):
     139        (WebCore::SVGResourceFilter::getCIFilterStack):
     140        (WebCore::SVGResourceFilter::imageForName):
     141        (WebCore::SVGResourceFilter::setImageForName):
     142        (WebCore::SVGResourceFilter::setOutputImage):
     143        (WebCore::alphaImageForImage):
     144        (WebCore::SVGResourceFilter::inputImage):
     145        * platform/graphics/svg/filters/SVGDistantLightSource.h:
     146        * platform/graphics/svg/filters/SVGFEBlend.cpp:
     147        (WebCore::SVGFEBlend::SVGFEBlend):
     148        * platform/graphics/svg/filters/SVGFEBlend.h:
     149        * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
     150        (WebCore::SVGFEColorMatrix::SVGFEColorMatrix):
     151        * platform/graphics/svg/filters/SVGFEColorMatrix.h:
     152        * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
     153        (WebCore::SVGFEComponentTransfer::SVGFEComponentTransfer):
     154        * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
     155        (WebCore::SVGComponentTransferFunction::SVGComponentTransferFunction):
     156        * platform/graphics/svg/filters/SVGFEComposite.cpp:
     157        (WebCore::SVGFEComposite::SVGFEComposite):
     158        * platform/graphics/svg/filters/SVGFEComposite.h:
     159        * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
     160        (WebCore::SVGFEConvolveMatrix::SVGFEConvolveMatrix):
     161        * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
     162        * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
     163        (WebCore::SVGFEDiffuseLighting::SVGFEDiffuseLighting):
     164        * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
     165        * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
     166        (WebCore::SVGFEDisplacementMap::SVGFEDisplacementMap):
     167        * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
     168        * platform/graphics/svg/filters/SVGFEFlood.cpp:
     169        (WebCore::SVGFEFlood::SVGFEFlood):
     170        * platform/graphics/svg/filters/SVGFEFlood.h:
     171        * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
     172        (WebCore::SVGFEGaussianBlur::SVGFEGaussianBlur):
     173        * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
     174        * platform/graphics/svg/filters/SVGFEImage.cpp:
     175        (WebCore::SVGFEImage::SVGFEImage):
     176        * platform/graphics/svg/filters/SVGFEImage.h:
     177        * platform/graphics/svg/filters/SVGFEMerge.cpp:
     178        * platform/graphics/svg/filters/SVGFEMerge.h:
     179        (WebCore::SVGFEMerge::SVGFEMerge):
     180        * platform/graphics/svg/filters/SVGFEMorphology.cpp:
     181        (WebCore::SVGFEMorphology::SVGFEMorphology):
     182        * platform/graphics/svg/filters/SVGFEMorphology.h:
     183        * platform/graphics/svg/filters/SVGFEOffset.cpp:
     184        (WebCore::SVGFEOffset::SVGFEOffset):
     185        * platform/graphics/svg/filters/SVGFEOffset.h:
     186        * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
     187        (WebCore::SVGFESpecularLighting::SVGFESpecularLighting):
     188        * platform/graphics/svg/filters/SVGFESpecularLighting.h:
     189        * platform/graphics/svg/filters/SVGFETile.h:
     190        (WebCore::SVGFETile::SVGFETile):
     191        * platform/graphics/svg/filters/SVGFETurbulence.cpp:
     192        (WebCore::SVGFETurbulence::SVGFETurbulence):
     193        * platform/graphics/svg/filters/SVGFETurbulence.h:
     194        * platform/graphics/svg/filters/SVGFilterEffect.cpp:
     195        (WebCore::SVGFilterEffect::SVGFilterEffect):
     196        (WebCore::SVGFilterEffect::primitiveBBoxForFilterBBox):
     197        (WebCore::SVGFilterEffect::filter):
     198        (WebCore::SVGFilterEffect::setFilter):
     199        * platform/graphics/svg/filters/SVGFilterEffect.h:
     200        (WebCore::SVGFilterEffect::xBoundingBoxMode):
     201        (WebCore::SVGFilterEffect::setXBoundingBoxMode):
     202        (WebCore::SVGFilterEffect::yBoundingBoxMode):
     203        (WebCore::SVGFilterEffect::setYBoundingBoxMode):
     204        (WebCore::SVGFilterEffect::widthBoundingBoxMode):
     205        (WebCore::SVGFilterEffect::setWidthBoundingBoxMode):
     206        (WebCore::SVGFilterEffect::heightBoundingBoxMode):
     207        (WebCore::SVGFilterEffect::setHeightBoundingBoxMode):
     208        * platform/graphics/svg/filters/SVGLightSource.cpp:
     209        * platform/graphics/svg/filters/SVGLightSource.h:
     210        * platform/graphics/svg/filters/SVGPointLightSource.h:
     211        (WebCore::SVGPointLightSource::SVGPointLightSource):
     212        * platform/graphics/svg/filters/SVGSpotLightSource.h:
     213        (WebCore::SVGSpotLightSource::SVGSpotLightSource):
     214        * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
     215        (WebCore::SVGFEBlend::getCIFilter):
     216        * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
     217        (WebCore::SVGFEColorMatrix::getCIFilter):
     218        * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
     219        (WebCore::filterForComponentFunc):
     220        (WebCore::SVGFEComponentTransfer::getCIFilter):
     221        * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
     222        (WebCore::SVGFEComposite::getCIFilter):
     223        * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
     224        (WebCore::SVGFEDiffuseLighting::getCIFilter):
     225        * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
     226        (WebCore::SVGFEDisplacementMap::getCIFilter):
     227        * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
     228        (WebCore::SVGFEFlood::getCIFilter):
     229        * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
     230        (WebCore::SVGFEGaussianBlur::getCIFilter):
     231        * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
     232        * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
     233        (WebCore::SVGFEImage::getCIFilter):
     234        * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
     235        (WebCore::SVGFEMerge::getCIFilter):
     236        * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
     237        (WebCore::SVGFEOffset::getCIFilter):
     238        * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
     239        (WebCore::SVGFESpecularLighting::getCIFilter):
     240        * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
     241        (WebCore::SVGFETile::getCIFilter):
     242        * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
     243        (WebCore::SVGFilterEffect::getCIFilter):
     244        * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel:
     245        * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel:
     246        * platform/graphics/svg/filters/cg/WKSpotLightFilter.m:
     247        (-[WKSpotLightFilter outputImage]):
     248        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
     249        (WebCore::SVGResourceFilter::createFilterEffect):
     250
    12512007-08-20  Rob Buis  <buis@kde.org>
    2252
  • branches/feature-branch/WebCore/ksvg2/css/SVGCSSParser.cpp

    r23788 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44    Copyright (C) 2005, 2006 Apple Computer, Inc.
  • branches/feature-branch/WebCore/ksvg2/css/SVGCSSStyleSelector.cpp

    r19992 r25175  
    704704            else
    705705                col = c->color();
     706
    706707            svgstyle->setStopColor(col);
     708            break;
     709        }
     710       case SVGCSS_PROP_LIGHTING_COLOR:
     711        {
     712            HANDLE_INHERIT_AND_INITIAL(lightingColor, LightingColor);
     713
     714            SVGColor* c = static_cast<SVGColor*>(value);
     715            if (!c)
     716                return CSSStyleSelector::applyProperty(id, value);
     717
     718            Color col;
     719            if (c->colorType() == SVGColor::SVG_COLORTYPE_CURRENTCOLOR)
     720                col = style->color();
     721            else
     722                col = c->color();
     723
     724            svgstyle->setLightingColor(col);
    707725            break;
    708726        }
     
    729747            Color col;
    730748            if (isInitial)
    731                 col = SVGRenderStyle::initialStopColor();
     749                col = SVGRenderStyle::initialFloodColor();
    732750            else {
    733751                SVGColor *c = static_cast<SVGColor*>(value);
  • branches/feature-branch/WebCore/ksvg2/css/SVGRenderStyle.h

    r23509 r25175  
    9191        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, stops, opacity, StopOpacity, stopOpacity, 1.0)
    9292        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, stops, color, StopColor, stopColor, Color(0, 0, 0))   
    93        
     93
    9494        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, clip, clipPath, ClipPath, clipPath, String())
    9595        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(String, mask, maskElement, MaskElement, maskElement, String())
     
    101101        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(float, misc, floodOpacity, FloodOpacity, floodOpacity, 1.0)
    102102        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, floodColor, FloodColor, floodColor, Color(0, 0, 0))
     103        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL(Color, misc, lightingColor, LightingColor, lightingColor, Color(255, 255, 255))
    103104        SVG_RS_DEFINE_ATTRIBUTE_DATAREF_WITH_INITIAL_REFCOUNTED(CSSValue, misc, baselineShiftValue, BaselineShiftValue, baselineShiftValue, 0)
    104105
  • branches/feature-branch/WebCore/ksvg2/css/SVGRenderStyleDefs.cpp

    r19992 r25175  
    184184    floodColor = SVGRenderStyle::initialFloodColor();
    185185    floodOpacity = SVGRenderStyle::initialFloodOpacity();
     186    lightingColor = SVGRenderStyle::initialLightingColor();
    186187    baselineShiftValue = SVGRenderStyle::initialBaselineShiftValue();
    187188}
     
    192193    floodColor = other.floodColor;
    193194    floodOpacity = other.floodOpacity;
     195    lightingColor = other.lightingColor;
    194196    baselineShiftValue = other.baselineShiftValue;
    195197}
     
    200202           && floodOpacity == other.floodOpacity
    201203           && floodColor == other.floodColor
     204           && lightingColor == other.lightingColor
    202205           && baselineShiftValue == other.baselineShiftValue;
    203206}
  • branches/feature-branch/WebCore/ksvg2/css/SVGRenderStyleDefs.h

    r19992 r25175  
    269269        float floodOpacity;
    270270
     271        Color lightingColor;
     272
    271273        // non-inherited text stuff lives here not in StyleTextData.
    272274        RefPtr<CSSValue> baselineShiftValue;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGComponentTransferFunctionElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2222
    2323#include "config.h"
     24
    2425#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    2526#include "SVGComponentTransferFunctionElement.h"
     
    3334SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* doc)
    3435    : SVGElement(tagName, doc)
    35     , m_type(0)
     36    , m_type(SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN)
    3637    , m_tableValues(new SVGNumberList)
    37     , m_slope(0.0)
     38    , m_slope(1.0)
    3839    , m_intercept(0.0)
    39     , m_amplitude(0.0)
    40     , m_exponent(0.0)
     40    , m_amplitude(1.0)
     41    , m_exponent(1.0)
    4142    , m_offset(0.0)
    4243{
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEBlendElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2222
    2323#include "config.h"
     24
    2425#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    2526#include "SVGFEBlendElement.h"
     
    3132SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* doc)
    3233    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    33     , m_mode(0)
     34    , m_mode(SVG_FEBLEND_MODE_NORMAL)
    3435    , m_filterEffect(0)
    3536{
     
    6768}
    6869
    69 SVGFEBlend* SVGFEBlendElement::filterEffect() const
     70SVGFEBlend* SVGFEBlendElement::filterEffect(SVGResourceFilter* filter) const
    7071{
    7172    if (!m_filterEffect)
    72         m_filterEffect = static_cast<SVGFEBlend*>(SVGResourceFilter::createFilterEffect(FE_BLEND));
     73        m_filterEffect = static_cast<SVGFEBlend*>(SVGResourceFilter::createFilterEffect(FE_BLEND, filter));
    7374    if (!m_filterEffect)
    7475        return 0;
     
    8283}
    8384
    84 // vim:ts=4:noet
    8585#endif // ENABLE(SVG)
    8686
     87// vim:ts=4:noet
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEBlendElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEBlendElement_h
    2424#define SVGFEBlendElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFEBlend.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3636        virtual ~SVGFEBlendElement();
    3737
    38         // 'SVGFEBlendElement' functions
    39         // Derived from: 'Element'
    40         virtual void parseMappedAttribute(MappedAttribute* attr);
    41 
    42         virtual SVGFEBlend* filterEffect() const;
     38        virtual void parseMappedAttribute(MappedAttribute*);
     39        virtual SVGFEBlend* filterEffect(SVGResourceFilter*) const;
    4340
    4441    protected:
     
    4946        ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, String, String, In2, in2)
    5047        ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, int, int, Mode, mode)
     48
    5149        mutable SVGFEBlend* m_filterEffect;
    5250    };
     
    5755#endif
    5856
     57// vim:ts=4:noet
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEColorMatrixElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    3434SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* doc)
    3535    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    36     , m_type(0)
     36    , m_type(SVG_FECOLORMATRIX_TYPE_UNKNOWN)
    3737    , m_values(new SVGNumberList)
    3838    , m_filterEffect(0)
     
    7070}
    7171
    72 SVGFEColorMatrix* SVGFEColorMatrixElement::filterEffect() const
     72SVGFEColorMatrix* SVGFEColorMatrixElement::filterEffect(SVGResourceFilter* filter) const
    7373{
    7474    if (!m_filterEffect)
    75         m_filterEffect = static_cast<SVGFEColorMatrix*>(SVGResourceFilter::createFilterEffect(FE_COLOR_MATRIX));
     75        m_filterEffect = static_cast<SVGFEColorMatrix*>(SVGResourceFilter::createFilterEffect(FE_COLOR_MATRIX, filter));
    7676    if (!m_filterEffect)
    7777        return 0;
     
    7979    m_filterEffect->setIn(in1());
    8080    setStandardAttributes(m_filterEffect);
     81
    8182    Vector<float> _values;
    8283    SVGNumberList* numbers = values();
     
    8687    for (unsigned int i = 0;i < nr;i++)
    8788        _values.append(numbers->getItem(i, ec));
     89
    8890    m_filterEffect->setValues(_values);
    8991    m_filterEffect->setType((SVGColorMatrixType) type());
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEColorMatrixElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEColorMatrixElement_h
    2424#define SVGFEColorMatrixElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFEColorMatrix.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3838        virtual ~SVGFEColorMatrixElement();
    3939
    40         // 'SVGFEColorMatrixElement' functions
    41         // Derived from: 'Element'
    42         virtual void parseMappedAttribute(MappedAttribute* attr);
    43        
    44         virtual SVGFEColorMatrix* filterEffect() const;
     40        virtual void parseMappedAttribute(MappedAttribute*);
     41        virtual SVGFEColorMatrix* filterEffect(SVGResourceFilter*) const;
    4542
    4643    protected:
     
    5148        ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, int, int, Type, type)
    5249        ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNumberList*, RefPtr<SVGNumberList>, Values, values)
     50
    5351        mutable SVGFEColorMatrix* m_filterEffect;
    5452    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEComponentTransferElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    5959}
    6060
    61 SVGFEComponentTransfer* SVGFEComponentTransferElement::filterEffect() const
     61SVGFEComponentTransfer* SVGFEComponentTransferElement::filterEffect(SVGResourceFilter* filter) const
    6262{
    6363    if (!m_filterEffect)
    64         m_filterEffect = static_cast<SVGFEComponentTransfer*>(SVGResourceFilter::createFilterEffect(FE_COMPONENT_TRANSFER));
     64        m_filterEffect = static_cast<SVGFEComponentTransfer*>(SVGResourceFilter::createFilterEffect(FE_COMPONENT_TRANSFER, filter));
    6565    if (!m_filterEffect)
    6666        return 0;
     
    6969    setStandardAttributes(m_filterEffect);
    7070   
    71     for (Node *n = firstChild(); n != 0; n = n->nextSibling()) {
     71    for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
    7272        if (n->hasTagName(SVGNames::feFuncRTag))
    7373            m_filterEffect->setRedFunction(static_cast<SVGFEFuncRElement*>(n)->transferFunction());
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEComponentTransferElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEComponentTransferElement_h
    2424#define SVGFEComponentTransferElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
    2828#include "SVGFEComponentTransfer.h"
     
    3737        virtual ~SVGFEComponentTransferElement();
    3838
    39         // 'SVGFEComponentTransferElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute *attr);
    42 
    43         virtual SVGFEComponentTransfer *filterEffect() const;
     39        virtual void parseMappedAttribute(MappedAttribute*);
     40        virtual SVGFEComponentTransfer* filterEffect(SVGResourceFilter*) const;
    4441
    4542    protected:
     
    4845    private:
    4946        ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, String, String, In1, in1)
     47
    5048        mutable SVGFEComponentTransfer *m_filterEffect;
    5149    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFECompositeElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    3333SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* doc)
    3434    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    35     , m__operator(0)
     35    , m__operator(SVG_FECOMPOSITE_OPERATOR_OVER)
    3636    , m_k1(0.0)
    3737    , m_k2(0.0)
     
    5858{
    5959    const String& value = attr->value();
    60     if (attr->name() == SVGNames::operatorAttr)
    61     {
     60    if (attr->name() == SVGNames::operatorAttr) {
    6261        if (value == "over")
    6362            set_operatorBaseValue(SVG_FECOMPOSITE_OPERATOR_OVER);
     
    8988}
    9089
    91 SVGFEComposite* SVGFECompositeElement::filterEffect() const
     90SVGFEComposite* SVGFECompositeElement::filterEffect(SVGResourceFilter* filter) const
    9291{
    9392    if (!m_filterEffect)
    94         m_filterEffect = static_cast<SVGFEComposite*>(SVGResourceFilter::createFilterEffect(FE_COMPOSITE));
     93        m_filterEffect = static_cast<SVGFEComposite*>(SVGResourceFilter::createFilterEffect(FE_COMPOSITE, filter));
    9594    if (!m_filterEffect)
    9695        return 0;
     96
    9797    m_filterEffect->setOperation((SVGCompositeOperationType) _operator());
    9898    m_filterEffect->setIn(in1());
    9999    m_filterEffect->setIn2(in2());
    100     setStandardAttributes(m_filterEffect);
    101100    m_filterEffect->setK1(k1());
    102101    m_filterEffect->setK2(k2());
    103102    m_filterEffect->setK3(k3());
    104103    m_filterEffect->setK4(k4());
     104
     105    setStandardAttributes(m_filterEffect);
    105106    return m_filterEffect;
    106107}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFECompositeElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFECompositeElement_h
    2424#define SVGFECompositeElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFEComposite.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3737        virtual ~SVGFECompositeElement();
    3838
    39         // 'SVGFECompositeElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute* attr);
    42 
    43         virtual SVGFEComposite* filterEffect() const;
     39        virtual void parseMappedAttribute(MappedAttribute*);
     40        virtual SVGFEComposite* filterEffect(SVGResourceFilter*) const;
    4441
    4542    protected:
     
    5451        ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, double, double, K3, k3)
    5552        ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, double, double, K4, k4)
     53
    5654        mutable SVGFEComposite* m_filterEffect;
    5755    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDiffuseLightingElement.cpp

    r19910 r25175  
    1616     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1717     Boston, MA 02111-1307, USA.
    18  */
     18*/
    1919
    2020#include "config.h"
     
    2424
    2525#include "Attr.h"
     26#include "RenderObject.h"
    2627#include "SVGColor.h"
    2728#include "SVGFELightElement.h"
     
    3637SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* doc)
    3738    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    38     , m_diffuseConstant(0.0)
    39     , m_surfaceScale(0.0)
    40     , m_lightingColor(new SVGColor())
     39    , m_diffuseConstant(1.0)
     40    , m_surfaceScale(1.0)
    4141    , m_kernelUnitLengthX(0.0)
    4242    , m_kernelUnitLengthY(0.0)
     
    5555ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, double, Number, number, KernelUnitLengthX, kernelUnitLengthX, "kernelUnitLengthX", m_kernelUnitLengthX)
    5656ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, double, Number, number, KernelUnitLengthY, kernelUnitLengthY, "kernelUnitLengthY", m_kernelUnitLengthY)
    57 ANIMATED_PROPERTY_DEFINITIONS(SVGFEDiffuseLightingElement, SVGColor*, Color, color, LightingColor, lightingColor, SVGNames::lighting_colorAttr.localName(), m_lightingColor.get())
    5857
    5958void SVGFEDiffuseLightingElement::parseMappedAttribute(MappedAttribute *attr)
     
    7271            setKernelUnitLengthYBaseValue(y);
    7372        }
    74     } else if (attr->name() == SVGNames::lighting_colorAttr)
    75         setLightingColorBaseValue(new SVGColor(value));
    76     else
     73    } else
    7774        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
    7875}
    7976
    80 SVGFilterEffect* SVGFEDiffuseLightingElement::filterEffect() const
     77SVGFilterEffect* SVGFEDiffuseLightingElement::filterEffect(SVGResourceFilter* filter) const
    8178{
    8279    if (!m_filterEffect)
    83         m_filterEffect = static_cast<SVGFEDiffuseLighting*>(SVGResourceFilter::createFilterEffect(FE_DIFFUSE_LIGHTING));
     80        m_filterEffect = static_cast<SVGFEDiffuseLighting*>(SVGResourceFilter::createFilterEffect(FE_DIFFUSE_LIGHTING, filter));
    8481    if (!m_filterEffect)
    8582        return 0;
    8683
    8784    m_filterEffect->setIn(in1());
    88     setStandardAttributes(m_filterEffect);
    8985    m_filterEffect->setDiffuseConstant(diffuseConstant());
    9086    m_filterEffect->setSurfaceScale(surfaceScale());
    9187    m_filterEffect->setKernelUnitLengthX(kernelUnitLengthX());
    9288    m_filterEffect->setKernelUnitLengthY(kernelUnitLengthY());
    93     m_filterEffect->setLightingColor(lightingColor()->color());
     89
     90    SVGFEDiffuseLightingElement* nonConstThis = const_cast<SVGFEDiffuseLightingElement*>(this);
     91
     92    RenderStyle* parentStyle = 0;
     93    if (!renderer())
     94        parentStyle = nonConstThis->styleForRenderer(parent()->renderer());
     95
     96    RenderStyle* filterStyle = nonConstThis->resolveStyle(parentStyle);
     97    m_filterEffect->setLightingColor(filterStyle->svgStyle()->lightingColor());
     98
     99    setStandardAttributes(m_filterEffect);
     100 
    94101    updateLights();
    95102    return m_filterEffect;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDiffuseLightingElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    4                   2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
     4                  2005 Oliver Hunt <oliver@nerget.com>
    55
    66    This library is free software; you can redistribute it and/or
     
    2222#ifndef SVGFEDiffuseLightingElement_h
    2323#define SVGFEDiffuseLightingElement_h
     24
    2425#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    25 
    2626#include "SVGFilterPrimitiveStandardAttributes.h"
    2727
     
    2929    class SVGFEDiffuseLighting;
    3030    class SVGColor;
    31    
     31
    3232    class SVGFEDiffuseLightingElement : public SVGFilterPrimitiveStandardAttributes
    3333    {
     
    3636        virtual ~SVGFEDiffuseLightingElement();
    3737
    38         // 'SVGFEDiffuseLightingElement' functions
    39         // Derived from: 'Element'
    40         virtual void parseMappedAttribute(MappedAttribute *attr);
    41 
    42         virtual SVGFilterEffect *filterEffect() const;
     38        virtual void parseMappedAttribute(MappedAttribute*);
     39        virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const;
    4340
    4441    protected:
     
    4946        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, DiffuseConstant, diffuseConstant)
    5047        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, SurfaceScale, surfaceScale)
    51         ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, SVGColor*, RefPtr<SVGColor>, LightingColor, lightingColor)
    5248        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, KernelUnitLengthX, kernelUnitLengthX)
    5349        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, double, double, KernelUnitLengthY, kernelUnitLengthY)
    54         //need other properties here...
    55         mutable SVGFEDiffuseLighting *m_filterEffect;
     50
     51        mutable SVGFEDiffuseLighting* m_filterEffect;
    5652       
    57         //light management
    5853        void updateLights() const;
    5954    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDisplacementMapElement.cpp

    r19855 r25175  
    11/*
    2  Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
    3  
    4  This library is free software; you can redistribute it and/or
    5  modify it under the terms of the GNU Library General Public
    6  License as published by the Free Software Foundation; either
    7  version 2 of the License, or (at your option) any later version.
    8  
    9  This library is distributed in the hope that it will be useful,
    10  but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12  Library General Public License for more details.
    13  
    14  You should have received a copy of the GNU Library General Public License
    15  along with this library; see the file COPYING.LIB.  If not, write to
    16  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    17  Boston, MA 02111-1307, USA.
    18  */
    19 
     2     Copyright (C) 2006 Oliver Hunt <oliver@nerget.com>
     3     
     4     This library is free software; you can redistribute it and/or
     5     modify it under the terms of the GNU Library General Public
     6     License as published by the Free Software Foundation; either
     7     version 2 of the License, or (at your option) any later version.
     8     
     9     This library is distributed in the hope that it will be useful,
     10     but WITHOUT ANY WARRANTY; without even the implied warranty of
     11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12     Library General Public License for more details.
     13     
     14     You should have received a copy of the GNU Library General Public License
     15     along with this library; see the file COPYING.LIB.  If not, write to
     16     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     17     Boston, MA 02111-1307, USA.
     18*/
    2019
    2120#include "config.h"
     
    3029SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* doc)
    3130    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    32     , m_xChannelSelector(0)
    33     , m_yChannelSelector(0)
     31    , m_xChannelSelector(SVG_CHANNEL_A)
     32    , m_yChannelSelector(SVG_CHANNEL_A)
    3433    , m_scale(0.0)
    3534    , m_filterEffect(0)
     
    7978}
    8079
    81 SVGFEDisplacementMap* SVGFEDisplacementMapElement::filterEffect() const
     80SVGFEDisplacementMap* SVGFEDisplacementMapElement::filterEffect(SVGResourceFilter* filter) const
    8281{
    8382    if (!m_filterEffect)
    84         m_filterEffect = static_cast<SVGFEDisplacementMap*>(SVGResourceFilter::createFilterEffect(FE_DISPLACEMENT_MAP));
     83        m_filterEffect = static_cast<SVGFEDisplacementMap*>(SVGResourceFilter::createFilterEffect(FE_DISPLACEMENT_MAP, filter));
    8584    if (!m_filterEffect)
    8685        return 0;
     86
    8787    m_filterEffect->setXChannelSelector((SVGChannelSelectorType) xChannelSelector());
    8888    m_filterEffect->setYChannelSelector((SVGChannelSelectorType) yChannelSelector());
     
    9090    m_filterEffect->setIn2(in2());
    9191    m_filterEffect->setScale(scale());
     92
    9293    setStandardAttributes(m_filterEffect);
    9394    return m_filterEffect;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDisplacementMapElement.h

    r19855 r25175  
    11/*
    2  Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
    3  
    4  This library is free software; you can redistribute it and/or
    5  modify it under the terms of the GNU Library General Public
    6  License as published by the Free Software Foundation; either
    7  version 2 of the License, or (at your option) any later version.
    8  
    9  This library is distributed in the hope that it will be useful,
    10  but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12  Library General Public License for more details.
    13  
    14  You should have received a copy of the GNU Library General Public License
    15  along with this library; see the file COPYING.LIB.  If not, write to
    16  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    17  Boston, MA 02111-1307, USA.
    18  */
     2     Copyright (C) 2006 Oliver Hunt <oliver@nerget.com>
     3    
     4     This library is free software; you can redistribute it and/or
     5     modify it under the terms of the GNU Library General Public
     6     License as published by the Free Software Foundation; either
     7     version 2 of the License, or (at your option) any later version.
     8    
     9     This library is distributed in the hope that it will be useful,
     10     but WITHOUT ANY WARRANTY; without even the implied warranty of
     11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12     Library General Public License for more details.
     13    
     14     You should have received a copy of the GNU Library General Public License
     15     along with this library; see the file COPYING.LIB.  If not, write to
     16     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     17     Boston, MA 02111-1307, USA.
     18*/
    1919
    2020#ifndef SVGFEDisplacementMapElement_h
    2121#define SVGFEDisplacementMapElement_h
     22
    2223#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    23 
    2424#include "SVGFEDisplacementMap.h"
    2525#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3232        virtual ~SVGFEDisplacementMapElement();
    3333       
    34         // 'SVGFEDisplacementMapElement' functions
    3534        static SVGChannelSelectorType stringToChannel(const String&);
    3635       
    37         // Derived from: 'Element'
    3836        virtual void parseMappedAttribute(MappedAttribute*);
    39        
    40         virtual SVGFEDisplacementMap* filterEffect() const;
     37        virtual SVGFEDisplacementMap* filterEffect(SVGResourceFilter*) const;
    4138       
    4239    protected:
     
    4946        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, int, int, YChannelSelector, yChannelSelector)
    5047        ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, double, double, Scale, scale)
     48
    5149        mutable SVGFEDisplacementMap* m_filterEffect;
    5250    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDistantLightElement.cpp

    r19855 r25175  
    2626namespace WebCore {
    2727
    28 SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* doc) :
    29     SVGFELightElement(tagName, doc)
     28SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* doc)
     29    : SVGFELightElement(tagName, doc)
    3030{
    3131}
     
    4141
    4242}
     43
    4344#endif // ENABLE(SVG)
    44 
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEDistantLightElement.h

    r19855 r25175  
    2020#ifndef SVGFEDistantLightElement_h
    2121#define SVGFEDistantLightElement_h
     22
    2223#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    23 
    2424#include "SVGFELightElement.h"
    2525
     
    3131        SVGFEDistantLightElement(const QualifiedName&, Document*);
    3232        virtual ~SVGFEDistantLightElement();
    33         virtual SVGLightSource *lightSource() const;
     33
     34        virtual SVGLightSource* lightSource() const;
    3435    };
    3536
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFloodElement.cpp

    r21607 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    5757}
    5858
    59 SVGFEFlood* SVGFEFloodElement::filterEffect() const
     59SVGFEFlood* SVGFEFloodElement::filterEffect(SVGResourceFilter* filter) const
    6060{
    6161    if (!m_filterEffect)
    62         m_filterEffect = static_cast<SVGFEFlood*>(SVGResourceFilter::createFilterEffect(FE_FLOOD));
     62        m_filterEffect = static_cast<SVGFEFlood*>(SVGResourceFilter::createFilterEffect(FE_FLOOD, filter));
    6363    if (!m_filterEffect)
    6464        return 0;
     65
    6566    m_filterEffect->setIn(in1());
    6667    setStandardAttributes(m_filterEffect);
    67     RenderStyle* filterStyle = const_cast<SVGFEFloodElement *>(this)->styleForRenderer(parentNode()->renderer());
    68     const SVGRenderStyle* svgStyle = filterStyle->svgStyle();
    69     m_filterEffect->setFloodColor(svgStyle->floodColor());
    70     m_filterEffect->setFloodOpacity(svgStyle->floodOpacity());
    71     filterStyle->deref(view()->renderArena());
     68
     69    SVGFEFloodElement* nonConstThis = const_cast<SVGFEFloodElement*>(this);
     70
     71    RenderStyle* parentStyle = 0;
     72    if (!renderer())
     73        parentStyle = nonConstThis->styleForRenderer(parent()->renderer());
     74
     75    RenderStyle* filterStyle = nonConstThis->resolveStyle(parentStyle);
     76    m_filterEffect->setFloodColor(filterStyle->svgStyle()->floodColor());
     77    m_filterEffect->setFloodOpacity(filterStyle->svgStyle()->floodOpacity());
    7278
    7379    return m_filterEffect;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFloodElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEFloodElement_h
    2424#define SVGFEFloodElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
    2828#include "SVGFEFlood.h"
     
    3030namespace WebCore
    3131{
    32 
    3332    class SVGFEFloodElement : public SVGFilterPrimitiveStandardAttributes
    3433    {
     
    3736        virtual ~SVGFEFloodElement();
    3837
    39         // 'SVGFEFloodElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute *attr);
    42 
    43         virtual SVGFEFlood *filterEffect() const;
     38        virtual void parseMappedAttribute(MappedAttribute*);
     39        virtual SVGFEFlood* filterEffect(SVGResourceFilter*) const;
    4440
    4541    protected:
     
    4844    private:
    4945        ANIMATED_PROPERTY_DECLARATIONS(SVGFEFloodElement, String, String, In1, in1)
     46
    5047        mutable SVGFEFlood *m_filterEffect;
    5148    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncAElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncAElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEFuncAElement_h
    2424#define SVGFEFuncAElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGComponentTransferFunctionElement.h"
    2828
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncBElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncBElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEFuncBElement_h
    2424#define SVGFEFuncBElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGComponentTransferFunctionElement.h"
    2828
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncGElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2828namespace WebCore {
    2929
    30 SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* doc) :
    31     SVGComponentTransferFunctionElement(tagName, doc)
     30SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* doc)
     31    : SVGComponentTransferFunctionElement(tagName, doc)
    3232{
    3333}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncGElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEFuncGElement_h
    2424#define SVGFEFuncGElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGComponentTransferFunctionElement.h"
    2828
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncRElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEFuncRElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEFuncRElement_h
    2424#define SVGFEFuncRElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGComponentTransferFunctionElement.h"
    2828
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEGaussianBlurElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    6868}
    6969
    70 SVGFEGaussianBlur* SVGFEGaussianBlurElement::filterEffect() const
     70SVGFEGaussianBlur* SVGFEGaussianBlurElement::filterEffect(SVGResourceFilter* filter) const
    7171{
    7272    if (!m_filterEffect)
    73         m_filterEffect = static_cast<SVGFEGaussianBlur*>(SVGResourceFilter::createFilterEffect(FE_GAUSSIAN_BLUR));
     73        m_filterEffect = static_cast<SVGFEGaussianBlur*>(SVGResourceFilter::createFilterEffect(FE_GAUSSIAN_BLUR, filter));
    7474    if (!m_filterEffect)
    7575        return 0;
     76
    7677    m_filterEffect->setIn(in1());
    77     setStandardAttributes(m_filterEffect);
    7878    m_filterEffect->setStdDeviationX(stdDeviationX());
    7979    m_filterEffect->setStdDeviationY(stdDeviationY());
     80
     81    setStandardAttributes(m_filterEffect);
    8082    return m_filterEffect;
    8183}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEGaussianBlurElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEGaussianBlurElement_h
    2424#define SVGFEGaussianBlurElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFEGaussianBlur.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3737        virtual ~SVGFEGaussianBlurElement();
    3838
    39         // 'SVGFEGaussianBlurElement' functions
    4039        void setStdDeviation(float stdDeviationX, float stdDeviationY);
    4140
    42         // Derived from: 'Element'
    43         virtual void parseMappedAttribute(MappedAttribute* attr);
    44 
    45         virtual SVGFEGaussianBlur* filterEffect() const;
     41        virtual void parseMappedAttribute(MappedAttribute*);
     42        virtual SVGFEGaussianBlur* filterEffect(SVGResourceFilter*) const;
    4643
    4744    protected:
     
    5249        ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, double, double, StdDeviationX, stdDeviationX)
    5350        ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, double, double, StdDeviationY, stdDeviationY)
     51
    5452        mutable SVGFEGaussianBlur* m_filterEffect;
    5553    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEImageElement.cpp

    r24349 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    8787void SVGFEImageElement::notifyFinished(CachedResource* finishedObj)
    8888{
    89     if (finishedObj == m_cachedImage && filterEffect())
    90         filterEffect()->setCachedImage(m_cachedImage);
     89    if (finishedObj == m_cachedImage && m_filterEffect)
     90        m_filterEffect->setCachedImage(m_cachedImage);
    9191}
    9292
    93 SVGFEImage* SVGFEImageElement::filterEffect() const
     93SVGFEImage* SVGFEImageElement::filterEffect(SVGResourceFilter* filter) const
    9494{
    9595    if (!m_filterEffect)
    96         m_filterEffect = static_cast<SVGFEImage*>(SVGResourceFilter::createFilterEffect(FE_IMAGE));
     96        m_filterEffect = static_cast<SVGFEImage*>(SVGResourceFilter::createFilterEffect(FE_IMAGE, filter));
    9797    if (!m_filterEffect)
    9898        return 0;
     99
     100    // The resource may already be loaded!
     101    if (m_cachedImage)
     102        m_filterEffect->setCachedImage(m_cachedImage);
     103
    99104    setStandardAttributes(m_filterEffect);
    100105    return m_filterEffect;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEImageElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEImageElement_h
    2424#define SVGFEImageElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
    2828#include "SVGURIReference.h"
     
    3535
    3636    class SVGFEImageElement : public SVGFilterPrimitiveStandardAttributes,
    37                                   public SVGURIReference,
    38                                   public SVGLangSpace,
    39                                   public SVGExternalResourcesRequired,
    40                                   public CachedResourceClient
     37                              public SVGURIReference,
     38                              public SVGLangSpace,
     39                              public SVGExternalResourcesRequired,
     40                              public CachedResourceClient
    4141    {
    4242    public:
     
    4444        virtual ~SVGFEImageElement();
    4545
    46         // 'SVGFEImageElement' functions
    47         virtual void parseMappedAttribute(MappedAttribute *attr);
    48         virtual void notifyFinished(CachedResource *finishedObj);
     46        virtual void parseMappedAttribute(MappedAttribute*);
     47        virtual void notifyFinished(CachedResource*);
    4948
    5049    protected:
    51         virtual SVGFEImage *filterEffect() const;
     50        virtual SVGFEImage* filterEffect(SVGResourceFilter*) const;
    5251
    5352    protected:
     
    6059        ANIMATED_PROPERTY_DECLARATIONS(SVGFEImageElement, SVGPreserveAspectRatio*, RefPtr<SVGPreserveAspectRatio>, PreserveAspectRatio, preserveAspectRatio)
    6160
    62         CachedImage *m_cachedImage;
    63         mutable SVGFEImage *m_filterEffect;
     61        CachedImage* m_cachedImage;
     62        mutable SVGFEImage* m_filterEffect;
    6463    };
    6564
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFELightElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    4                   2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
     4                  2005 Oliver Hunt <oliver@nerget.com>
    55
    66    This library is free software; you can redistribute it and/or
     
    3939    , m_pointsAtY(0.0)
    4040    , m_pointsAtZ(0.0)
    41     , m_specularExponent(0.0)
     41    , m_specularExponent(1.0)
    4242    , m_limitingConeAngle(0.0)
    4343{
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFELightElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    4                   2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
     4                  2005 Oliver Hunt <oliver@nerget.com>
    55
    66    This library is free software; you can redistribute it and/or
     
    2222#ifndef SVGFELightElement_h
    2323#define SVGFELightElement_h
     24
    2425#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    25 
    2626#include "SVGElement.h"
    2727#include "SVGLightSource.h"
     
    3737        virtual ~SVGFELightElement();
    3838       
    39         // 'SVGComponentTransferFunctionElement' functions
    4039        virtual SVGLightSource* lightSource() const = 0;
    41        
    42         // Derived from: 'Element'
    43         virtual void parseMappedAttribute(MappedAttribute* attr);       
     40        virtual void parseMappedAttribute(MappedAttribute*);
     41
    4442    private:
    4543        ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, double, double, Azimuth, azimuth)
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEMergeElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    4242}
    4343
    44 SVGFEMerge* SVGFEMergeElement::filterEffect() const
     44SVGFEMerge* SVGFEMergeElement::filterEffect(SVGResourceFilter* filter) const
    4545{
    4646    if (!m_filterEffect)
    47         m_filterEffect = static_cast<SVGFEMerge*>(SVGResourceFilter::createFilterEffect(FE_MERGE));
     47        m_filterEffect = static_cast<SVGFEMerge*>(SVGResourceFilter::createFilterEffect(FE_MERGE, filter));
    4848    if (!m_filterEffect)
    4949        return 0;
     50
    5051    setStandardAttributes(m_filterEffect);
    5152
     
    6263}
    6364
    64 
    6565#endif // ENABLE(SVG)
    6666
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEMergeElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEMergeElement_h
    2424#define SVGFEMergeElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFEMerge.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3636        virtual ~SVGFEMergeElement();
    3737
    38         virtual SVGFEMerge* filterEffect() const;
     38        virtual SVGFEMerge* filterEffect(SVGResourceFilter*) const;
    3939
    4040    protected:
     
    4949#endif // ENABLE(SVG)
    5050#endif
    51 
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEMergeNodeElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEMergeNodeElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEMergeNodeElement_h
    2424#define SVGFEMergeNodeElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    27 #include <SVGElement.h>
     27#include "SVGElement.h"
    2828
    2929namespace WebCore
     
    3535        virtual ~SVGFEMergeNodeElement();
    3636
    37         // Derived from: 'Element'
    38         virtual void parseMappedAttribute(MappedAttribute* attr);
     37        virtual void parseMappedAttribute(MappedAttribute*);
    3938
    40         // 'SVGFEMergeNodeElement' functions
    41    
    4239    protected:
    4340        virtual const SVGElement* contextElement() const { return this; }
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEOffsetElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2727
    2828#include "Attr.h"
    29 #include "SVGRenderStyle.h"
    3029#include "SVGResourceFilter.h"
    3130
     
    6261}
    6362
    64 SVGFEOffset* SVGFEOffsetElement::filterEffect() const
     63SVGFEOffset* SVGFEOffsetElement::filterEffect(SVGResourceFilter* filter) const
    6564{
    6665    if (!m_filterEffect)
    67         m_filterEffect = static_cast<SVGFEOffset*>(SVGResourceFilter::createFilterEffect(FE_OFFSET));
     66        m_filterEffect = static_cast<SVGFEOffset*>(SVGResourceFilter::createFilterEffect(FE_OFFSET, filter));
    6867    if (!m_filterEffect)
    6968        return 0;
     69
    7070    m_filterEffect->setIn(in1());
    71     setStandardAttributes(m_filterEffect);
    7271    m_filterEffect->setDx(dx());
    7372    m_filterEffect->setDy(dy());
     73
     74    setStandardAttributes(m_filterEffect);
    7475    return m_filterEffect;
    7576}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEOffsetElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFEOffsetElement_h
    2424#define SVGFEOffsetElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
    2828#include "SVGFEOffset.h"
     
    3737        virtual ~SVGFEOffsetElement();
    3838
    39         // 'SVGFEOffsetElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute *attr);
    42 
    43         virtual SVGFEOffset *filterEffect() const;
     39        virtual void parseMappedAttribute(MappedAttribute*);
     40        virtual SVGFEOffset* filterEffect(SVGResourceFilter*) const;
    4441
    4542    protected:
     
    5047        ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, double, double, Dx, dx)
    5148        ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, double, double, Dy, dy)
    52         mutable SVGFEOffset *m_filterEffect;
     49
     50        mutable SVGFEOffset* m_filterEffect;
    5351    };
    5452
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFEPointLightElement.h

    r19855 r25175  
    2020#ifndef SVGFEPointLightElement_h
    2121#define SVGFEPointLightElement_h
     22
    2223#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    23 
    2424#include "SVGFELightElement.h"
    2525
     
    3131        SVGFEPointLightElement(const QualifiedName&, Document*);
    3232        virtual ~SVGFEPointLightElement();
    33         virtual SVGLightSource *lightSource() const;
     33
     34        virtual SVGLightSource* lightSource() const;
    3435    };
    3536
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFESpecularLightingElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    4                   2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
     4                  2005 Oliver Hunt <oliver@nerget.com>
    55
    66    This library is free software; you can redistribute it and/or
     
    2525#include "SVGFESpecularLightingElement.h"
    2626
     27#include "RenderObject.h"
    2728#include "SVGColor.h"
    2829#include "SVGNames.h"
     
    3536SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* doc)
    3637    : SVGFilterPrimitiveStandardAttributes(tagName, doc)
    37     , m_specularConstant(0.0)
    38     , m_specularExponent(0.0)
    39     , m_surfaceScale(0.0)
    40     , m_lightingColor(new SVGColor)
     38    , m_specularConstant(1.0)
     39    , m_specularExponent(1.0)
     40    , m_surfaceScale(1.0)
    4141    , m_kernelUnitLengthX(0.0)
    4242    , m_kernelUnitLengthY(0.0)
     
    5656ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, double, Number, number, KernelUnitLengthX, kernelUnitLengthX, "kernelUnitLengthX", m_kernelUnitLengthX)
    5757ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, double, Number, number, KernelUnitLengthY, kernelUnitLengthY, "kernelUnitLengthY", m_kernelUnitLengthY)
    58 ANIMATED_PROPERTY_DEFINITIONS(SVGFESpecularLightingElement, SVGColor*, Color, color, LightingColor, lightingColor, SVGNames::lighting_colorAttr.localName(), m_lightingColor.get())
    5958
    6059void SVGFESpecularLightingElement::parseMappedAttribute(MappedAttribute* attr)
     
    7574            setKernelUnitLengthYBaseValue(y);
    7675        }
    77     } else if (attr->name() == SVGNames::lighting_colorAttr)
    78         setLightingColorBaseValue(new SVGColor(value));
    79     else
     76    } else
    8077        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
    8178}
    8279
    83 SVGFESpecularLighting* SVGFESpecularLightingElement::filterEffect() const
     80SVGFESpecularLighting* SVGFESpecularLightingElement::filterEffect(SVGResourceFilter* filter) const
    8481{
    8582    if (!m_filterEffect)
    86         m_filterEffect = static_cast<SVGFESpecularLighting*>(SVGResourceFilter::createFilterEffect(FE_SPECULAR_LIGHTING));
     83        m_filterEffect = static_cast<SVGFESpecularLighting*>(SVGResourceFilter::createFilterEffect(FE_SPECULAR_LIGHTING, filter));
    8784    if (!m_filterEffect)
    8885        return 0;
     86
    8987    m_filterEffect->setIn(in1());
    90     setStandardAttributes(m_filterEffect);
    9188    m_filterEffect->setSpecularConstant((specularConstant()));
    9289    m_filterEffect->setSpecularExponent((specularExponent()));
     
    9491    m_filterEffect->setKernelUnitLengthX((kernelUnitLengthX()));
    9592    m_filterEffect->setKernelUnitLengthY((kernelUnitLengthY()));
    96     m_filterEffect->setLightingColor(lightingColor()->color());
     93
     94    SVGFESpecularLightingElement* nonConstThis = const_cast<SVGFESpecularLightingElement*>(this);
     95
     96    RenderStyle* parentStyle = 0;
     97    if (!renderer())
     98        parentStyle = nonConstThis->styleForRenderer(parent()->renderer());
     99
     100    RenderStyle* filterStyle = nonConstThis->resolveStyle(parentStyle);
     101    m_filterEffect->setLightingColor(filterStyle->svgStyle()->lightingColor());
     102
     103    setStandardAttributes(m_filterEffect);
     104
    97105    updateLights();
    98106    return m_filterEffect;
     
    114122        }
    115123    }
     124
    116125    m_filterEffect->setLightSource(light);
    117126}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFESpecularLightingElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    4                   2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
     4                  2005 Oliver Hunt <oliver@nerget.com>
    55
    66    This library is free software; you can redistribute it and/or
     
    2222#ifndef SVGFESpecularLightingElement_h
    2323#define SVGFESpecularLightingElement_h
     24
    2425#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    25 
    2626#include "SVGFESpecularLighting.h"
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
     
    3737        virtual ~SVGFESpecularLightingElement();
    3838       
    39         // 'SVGFEDiffuseLightingElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute* attr);
    42        
    43         virtual SVGFESpecularLighting* filterEffect() const;
     39        virtual void parseMappedAttribute(MappedAttribute*);
     40        virtual SVGFESpecularLighting* filterEffect(SVGResourceFilter*) const;
    4441
    4542    protected:
     
    5148        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, SpecularExponent, specularExponent)
    5249        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, SurfaceScale, surfaceScale)
    53         ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, SVGColor*, RefPtr<SVGColor>, LightingColor, lightingColor)
    5450        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, KernelUnitLengthX, kernelUnitLengthX)
    5551        ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, double, double, KernelUnitLengthY, kernelUnitLengthY)
    56         //need other properties here...
     52
    5753        mutable SVGFESpecularLighting* m_filterEffect;
    5854       
    59         //light management
    6055        void updateLights() const;
    6156    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFESpotLightElement.cpp

    r19855 r25175  
    4141    // convert lookAt to a direction
    4242    FloatPoint3D direction(pointsAtX() - pos.x(),
    43                              pointsAtY() - pos.y(),
    44                              pointsAtZ() - pos.z());
     43                           pointsAtY() - pos.y(),
     44                           pointsAtZ() - pos.z());
     45
    4546    direction.normalize();
    4647    return new SVGSpotLightSource(pos, direction, specularExponent(), limitingConeAngle());
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFESpotLightElement.h

    r19855 r25175  
    2020#ifndef SVGFESpotLightElement_h
    2121#define SVGFESpotLightElement_h
     22
    2223#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    23 
    2424#include "SVGFELightElement.h"
    2525
     
    3131        SVGFESpotLightElement(const QualifiedName&, Document*);
    3232        virtual ~SVGFESpotLightElement();
    33         virtual SVGLightSource *lightSource() const;
     33
     34        virtual SVGLightSource* lightSource() const;
    3435    };
    3536
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFETileElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    5454}
    5555
    56 SVGFETile* SVGFETileElement::filterEffect() const
     56SVGFETile* SVGFETileElement::filterEffect(SVGResourceFilter* filter) const
    5757{
    5858    if (!m_filterEffect)
    59         m_filterEffect = static_cast<SVGFETile*>(SVGResourceFilter::createFilterEffect(FE_TILE));
     59        m_filterEffect = static_cast<SVGFETile*>(SVGResourceFilter::createFilterEffect(FE_TILE, filter));
    6060    if (!m_filterEffect)
    6161        return 0;
     62
    6263    m_filterEffect->setIn(in1());
     64
    6365    setStandardAttributes(m_filterEffect);
    6466    return m_filterEffect;
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFETileElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFETileElement_h
    2424#define SVGFETileElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFilterPrimitiveStandardAttributes.h"
    2828#include "SVGFETile.h"
     
    3737        virtual ~SVGFETileElement();
    3838
    39         // 'SVGFETileElement' functions
    40         // Derived from: 'Element'
    41         virtual void parseMappedAttribute(MappedAttribute *attr);
    42 
    43         virtual SVGFETile *filterEffect() const;
     39        virtual void parseMappedAttribute(MappedAttribute*);
     40        virtual SVGFETile* filterEffect(SVGResourceFilter*) const;
    4441
    4542    protected:
     
    4845    private:
    4946        ANIMATED_PROPERTY_DECLARATIONS(SVGFETileElement, String, String, In1, in1)
    50         mutable SVGFETile *m_filterEffect;
     47
     48        mutable SVGFETile* m_filterEffect;
    5149    };
    5250
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFETurbulenceElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    3535    , m_baseFrequencyX(0.0)
    3636    , m_baseFrequencyY(0.0)
    37     , m_numOctaves(0)
     37    , m_numOctaves(1)
    3838    , m_seed(0.0)
    39     , m_stitchTiles(0)
    40     , m_type(0)
     39    , m_stitchTiles(SVG_STITCHTYPE_NOSTITCH)
     40    , m_type(SVG_TURBULENCE_TYPE_TURBULENCE)
    4141    , m_filterEffect(0)
    4242{
     
    8282}
    8383
    84 SVGFETurbulence* SVGFETurbulenceElement::filterEffect() const
     84SVGFETurbulence* SVGFETurbulenceElement::filterEffect(SVGResourceFilter* filter) const
    8585{
    8686    if (!m_filterEffect)
    87         m_filterEffect = static_cast<SVGFETurbulence*>(SVGResourceFilter::createFilterEffect(FE_TURBULENCE));
     87        m_filterEffect = static_cast<SVGFETurbulence*>(SVGResourceFilter::createFilterEffect(FE_TURBULENCE, filter));
    8888    if (!m_filterEffect)
    8989        return 0;
    9090   
    9191    m_filterEffect->setType((SVGTurbulanceType) type());
    92     setStandardAttributes(m_filterEffect);
    9392    m_filterEffect->setBaseFrequencyX(baseFrequencyX());
    9493    m_filterEffect->setBaseFrequencyY(baseFrequencyY());
     
    9695    m_filterEffect->setSeed(seed());
    9796    m_filterEffect->setStitchTiles(stitchTiles() == SVG_STITCHTYPE_STITCH);
     97
     98    setStandardAttributes(m_filterEffect);
    9899    return m_filterEffect;
    99100}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFETurbulenceElement.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2323#ifndef SVGFETurbulenceElement_h
    2424#define SVGFETurbulenceElement_h
     25
    2526#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    26 
    2727#include "SVGFETurbulence.h"
    2828#include "SVGFilterPrimitiveStandardAttributes.h"
     
    4242        virtual ~SVGFETurbulenceElement();
    4343
    44         // 'SVGFETurbulenceElement' functions
    45         // Derived from: 'Element'
    46         virtual void parseMappedAttribute(MappedAttribute* attr);
    47 
    48         virtual SVGFETurbulence* filterEffect() const;
     44        virtual void parseMappedAttribute(MappedAttribute*);
     45        virtual SVGFETurbulence* filterEffect(SVGResourceFilter*) const;
    4946
    5047    protected:
     
    5855        ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, int, int, StitchTiles, stitchTiles)
    5956        ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, int, int, Type, type)
     57
    6058        mutable SVGFETurbulence* m_filterEffect;
    6159    };
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFilterElement.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33    Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
    44    Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
     
    117117    m_filter->setFilterBoundingBoxMode(filterBBoxMode);
    118118
    119     float _x, _y, w, h;
     119    float _x, _y, _width, _height;
    120120
    121     if (filterBBoxMode && x().unitType() == LengthTypePercentage)
    122         _x = x().valueInSpecifiedUnits() / 100.0;
    123     else
     121    if (filterBBoxMode) {
     122        _x = x().valueAsPercentage();
     123        _y = y().valueAsPercentage();
     124        _width = width().valueAsPercentage();
     125        _height = height().valueAsPercentage();
     126    } else {
     127        m_filter->setXBoundingBoxMode(x().unitType() == LengthTypePercentage);
     128        m_filter->setYBoundingBoxMode(y().unitType() == LengthTypePercentage);
     129
    124130        _x = x().value();
     131        _y = y().value();
     132        _width = width().value();
     133        _height = height().value();
     134    }
    125135
    126     if (filterBBoxMode && y().unitType() == LengthTypePercentage)
    127         _y = y().valueInSpecifiedUnits() / 100.0;
    128     else
    129         _y = y().value();
    130 
    131     if (filterBBoxMode && width().unitType() == LengthTypePercentage)
    132         w = width().valueInSpecifiedUnits() / 100.0;
    133     else
    134         w = width().value();
    135 
    136     if (filterBBoxMode && height().unitType() == LengthTypePercentage)
    137         h = height().valueInSpecifiedUnits() / 100.0;
    138     else
    139         h = height().value();
    140 
    141     m_filter->setFilterRect(FloatRect(_x, _y, w, h));
     136    m_filter->setFilterRect(FloatRect(_x, _y, _width, _height));
    142137
    143138    bool primitiveBBoxMode = primitiveUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
    144139    m_filter->setEffectBoundingBoxMode(primitiveBBoxMode);
    145     // FIXME: When does this info get passed to the filters elements?
    146140
    147141    // TODO : use switch/case instead?
     
    150144        SVGElement* element = svg_dynamic_cast(n);
    151145        if (element && element->isFilterEffect()) {
    152             SVGFilterPrimitiveStandardAttributes* fe = static_cast<SVGFilterPrimitiveStandardAttributes*>(element);
    153             if (fe->filterEffect())
    154                 m_filter->addFilterEffect(fe->filterEffect());
     146            SVGFilterPrimitiveStandardAttributes* filterAttributes = static_cast<SVGFilterPrimitiveStandardAttributes*>(element);
     147            SVGFilterEffect* filterEffect = filterAttributes->filterEffect(m_filter.get());
     148            if (!filterEffect)
     149                continue;
     150
     151            m_filter->addFilterEffect(filterEffect);
    155152        }
    156153    }
     154
    157155    return m_filter.get();
    158156}
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFilterElement.h

    r19908 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33    Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
    44    Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
     
    2626
    2727#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    28 
    2928#include "SVGResourceFilter.h"
    3029#include "SVGExternalResourcesRequired.h"
     
    4746        virtual SVGResource* canvasResource();
    4847
    49         // 'SVGFilterElement' functions
    5048        void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
    5149
    52         virtual void parseMappedAttribute(MappedAttribute* attr);
    53 
     50        virtual void parseMappedAttribute(MappedAttribute*);
    5451        virtual bool rendererIsNeeded(RenderStyle*) { return false; }
    5552
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    4242    , m_height(this, LengthModeHeight)
    4343{
     44    // Spec: If the attribute is not specified, the effect is as if a value of "0%" were specified.
     45    setXBaseValue(SVGLength(this, LengthModeWidth, "0%"));
     46    setYBaseValue(SVGLength(this, LengthModeHeight, "0%"));
     47
    4448    // Spec: If the attribute is not specified, the effect is as if a value of "100%" were specified.
    4549    setWidthBaseValue(SVGLength(this, LengthModeWidth, "100%"));
     
    8084        return;
    8185
    82     bool bbox = false;
    83     if (parentNode() && parentNode()->hasTagName(SVGNames::filterTag))
    84         bbox = static_cast<SVGFilterElement*>(parentNode())->primitiveUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
     86    ASSERT(filterEffect->filter());
    8587
    8688    float _x, _y, _width, _height;
    87  
    88     if (bbox) {
    89         _x = x().valueInSpecifiedUnits();
    90         _y = y().valueInSpecifiedUnits();
    91         _width = width().valueInSpecifiedUnits();
    92         _height = height().valueInSpecifiedUnits();
     89
     90    if (filterEffect->filter()->effectBoundingBoxMode()) {
     91        _x = x().valueAsPercentage();
     92        _y = y().valueAsPercentage();
     93        _width = width().valueAsPercentage();
     94        _height = height().valueAsPercentage();
    9395    } else {
    94         _x = x().value();
    95         _y = y().value();
    96         _width = width().value();
    97         _height = height().value();
    98     }
    99    
     96        // We need to resolve any percentages in filter rect space.
     97        if (x().unitType() == LengthTypePercentage) {
     98            filterEffect->setXBoundingBoxMode(true);
     99            _x = x().valueAsPercentage();
     100        } else {
     101            filterEffect->setXBoundingBoxMode(false);
     102            _x = x().value();
     103        }
     104
     105        if (y().unitType() == LengthTypePercentage) {
     106            filterEffect->setYBoundingBoxMode(true);
     107            _y = y().valueAsPercentage();
     108        } else {
     109            filterEffect->setYBoundingBoxMode(false);
     110            _y = y().value();
     111        }
     112
     113        if (width().unitType() == LengthTypePercentage) {
     114            filterEffect->setWidthBoundingBoxMode(true);
     115            _width = width().valueAsPercentage();
     116        } else {
     117            filterEffect->setWidthBoundingBoxMode(false);
     118            _width = width().value();
     119        }
     120
     121        if (height().unitType() == LengthTypePercentage) {
     122            filterEffect->setHeightBoundingBoxMode(true);
     123            _height = height().valueAsPercentage();
     124        } else {
     125            filterEffect->setHeightBoundingBoxMode(false);
     126            _height = height().value();
     127        }
     128    }
     129
    100130    filterEffect->setSubRegion(FloatRect(_x, _y, _width, _height));
    101131    filterEffect->setResult(result());
  • branches/feature-branch/WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h

    r19908 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005, 2006 Rob Buis <buis@kde.org>
    44
     
    2525
    2626#if ENABLE(SVG)
    27 
    2827#include "SVGStyledElement.h"
    2928
    3029namespace WebCore {
    3130    class SVGFilterEffect;
     31    class SVGResourceFilter;
    3232
    3333    class SVGFilterPrimitiveStandardAttributes : public SVGStyledElement
     
    3939        virtual bool isFilterEffect() const { return true; }
    4040
    41         // 'SVGFilterPrimitiveStandardAttributes' functions
    42         virtual void parseMappedAttribute(MappedAttribute *attr);
    43 
    44         virtual SVGFilterEffect* filterEffect() const = 0;
     41        virtual void parseMappedAttribute(MappedAttribute*);
     42        virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const = 0;
    4543
    4644        virtual bool rendererIsNeeded(RenderStyle*) { return false; }
    4745
    4846    protected:
    49         void setStandardAttributes(SVGFilterEffect* filterEffect) const;
     47        void setStandardAttributes(SVGFilterEffect*) const;
    5048
    5149    protected:
  • branches/feature-branch/WebCore/ksvg2/svg/SVGGradientElement.cpp

    r24194 r25175  
    117117{
    118118    Vector<SVGGradientStop> stops;
    119    
     119
    120120    // FIXME: Manual style resolution is a hack
    121121    RenderStyle* gradientStyle = 0;
     
    125125            SVGStopElement* stop = static_cast<SVGStopElement*>(element);
    126126            float stopOffset = stop->offset();
    127            
    128             RenderStyle* stopStyle;
    129             if (stop->renderer())
    130                 stopStyle = stop->renderer()->style();
    131             else {
    132                 if (!gradientStyle)
    133                     gradientStyle = const_cast<SVGGradientElement*>(this)->styleForRenderer(parent()->renderer());
    134                 // FIXME: The renderer tree has no way for us to force stops to always have a renderer
    135                 // (display: none) on a parent will cause them to not.  Until we have a way to force renderers
    136                 // we have a manual style resolution hack.
    137                 stopStyle = document()->styleSelector()->styleForElement(stop, gradientStyle);
    138             }
    139            
     127
     128            if (!stop->renderer() && !gradientStyle)
     129                gradientStyle = const_cast<SVGGradientElement*>(this)->styleForRenderer(parent()->renderer());
     130
     131            RenderStyle* stopStyle = stop->resolveStyle(gradientStyle);
    140132            Color c = stopStyle->svgStyle()->stopColor();
    141133            float opacity = stopStyle->svgStyle()->stopOpacity();
  • branches/feature-branch/WebCore/ksvg2/svg/SVGStyledElement.cpp

    r22025 r25175  
    261261}
    262262
     263RenderStyle* SVGStyledElement::resolveStyle(RenderStyle* parentStyle)
     264{
     265    if (renderer())
     266        return renderer()->style();
     267
     268    return document()->styleSelector()->styleForElement(this, parentStyle);
     269}
     270
    263271PassRefPtr<CSSValue> SVGStyledElement::getPresentationAttribute(const String& name)
    264272{
  • branches/feature-branch/WebCore/ksvg2/svg/SVGStyledElement.h

    r22025 r25175  
    6565        virtual void attributeChanged(Attribute*, bool preserveDecls = false);
    6666
     67        // Centralized place to force a manual style resolution. Hacky but needed for now.
     68        RenderStyle* resolveStyle(RenderStyle* parentStyle);
     69
    6770    protected:
    6871        friend class RenderPath;
  • branches/feature-branch/WebCore/platform/graphics/svg/SVGResourceFilter.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4242    ASSERT(effect);
    4343
    44     if (effect)
     44    if (effect) {
     45        ASSERT(effect->filter() == this);
    4546        m_effects.append(effect);
     47    }
    4648}
    4749
    48 FloatRect SVGResourceFilter::filterBBoxForItemBBox(FloatRect itemBBox) const
     50FloatRect SVGResourceFilter::filterBBoxForItemBBox(const FloatRect& itemBBox) const
    4951{
    5052    FloatRect filterBBox = filterRect();
    5153
    52     if (filterBoundingBoxMode())
    53         filterBBox = FloatRect(filterBBox.x() * itemBBox.width(),
    54                                filterBBox.y() * itemBBox.height(),
     54    float xOffset = 0.0;
     55    float yOffset = 0.0;
     56
     57    if (!effectBoundingBoxMode()) {
     58        xOffset = itemBBox.x();
     59        yOffset = itemBBox.y();
     60    }
     61
     62    if (filterBoundingBoxMode()) {
     63        filterBBox = FloatRect(xOffset + filterBBox.x() * itemBBox.width(),
     64                               yOffset + filterBBox.y() * itemBBox.height(),
    5565                               filterBBox.width() * itemBBox.width(),
    5666                               filterBBox.height() * itemBBox.height());
     67    } else {
     68        if (xBoundingBoxMode())
     69            filterBBox.setX(xOffset + filterBBox.x());
     70
     71        if (yBoundingBoxMode())
     72            filterBBox.setY(yOffset + filterBBox.y());
     73    }
    5774
    5875    return filterBBox;
  • branches/feature-branch/WebCore/platform/graphics/svg/SVGResourceFilter.h

    r24988 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4949#endif
    5050
     51#include <wtf/RetainPtr.h>
     52
    5153namespace WebCore {
    5254
     
    6062    virtual ~SVGResourceFilter();
    6163
    62     static SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&);
     64    static SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&, SVGResourceFilter*);
    6365
    6466    virtual bool isFilter() const { return true; }
     
    7072    void setEffectBoundingBoxMode(bool bboxMode) { m_effectBBoxMode = bboxMode; }
    7173
     74    bool xBoundingBoxMode() const { return m_xBBoxMode; }
     75    void setXBoundingBoxMode(bool bboxMode) { m_xBBoxMode = bboxMode; }
     76
     77    bool yBoundingBoxMode() const { return m_yBBoxMode; }
     78    void setYBoundingBoxMode(bool bboxMode) { m_yBBoxMode = bboxMode; }
     79
    7280    FloatRect filterRect() const { return m_filterRect; }
    7381    void setFilterRect(const FloatRect& rect) { m_filterRect = rect; }
    7482
    75     FloatRect filterBBoxForItemBBox(FloatRect itemBBox) const;
     83    FloatRect filterBBoxForItemBBox(const FloatRect& itemBBox) const;
    7684
    7785    void clearEffects();
     
    94102private:
    95103#if PLATFORM(CI)
    96     NSArray* getCIFilterStack(CIImage* inputImage);
     104    NSArray* getCIFilterStack(CIImage* inputImage, const FloatRect& bbox);
    97105
    98106    CIContext* m_filterCIContext;
    99107    CGLayerRef m_filterCGLayer;
    100     NSMutableDictionary* m_imagesByName;
     108    RetainPtr<NSMutableDictionary> m_imagesByName;
    101109#endif
     110
     111    bool m_filterBBoxMode : 1;
     112    bool m_effectBBoxMode : 1;
     113
     114    bool m_xBBoxMode : 1;
     115    bool m_yBBoxMode : 1;
    102116
    103117    FloatRect m_filterRect;
    104118    Vector<SVGFilterEffect*> m_effects;
    105 
    106     bool m_filterBBoxMode;
    107     bool m_effectBBoxMode;
    108119};
    109120
  • branches/feature-branch/WebCore/platform/graphics/svg/cg/SVGResourceFilterCg.mm

    r24988 r25175  
    11/*
    22 * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
     3 *           (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4849#include <QuartzCore/CoreImage.h>
    4950
     51// Setting to a value > 0 allows to dump the output image as JPEG.
     52#define DEBUG_OUTPUT_IMAGE 0
     53
    5054namespace WebCore {
    5155
     
    5559    : m_filterCIContext(0)
    5660    , m_filterCGLayer(0)
    57 {
    58     m_imagesByName = HardRetainWithNSRelease([[NSMutableDictionary alloc] init]);
     61    , m_imagesByName(AdoptNS, [[NSMutableDictionary alloc] init])
     62    , m_filterBBoxMode(false)
     63    , m_effectBBoxMode(false)
     64    , m_xBBoxMode(false)
     65    , m_yBBoxMode(false)
     66{
    5967}
    6068
     
    6371    ASSERT(!m_filterCGLayer);
    6472    ASSERT(!m_filterCIContext);
    65     HardRelease(m_imagesByName);
    66 }
    67 
    68 SVGFilterEffect* SVGResourceFilter::createFilterEffect(const SVGFilterEffectType& type)
    69 {
    70     switch(type)
     73}
     74
     75SVGFilterEffect* SVGResourceFilter::createFilterEffect(const SVGFilterEffectType& type, SVGResourceFilter* filter)
     76{
     77    switch (type)
    7178    {
    7279    /* Light sources are contained by the diffuse/specular light blocks
     
    7582    case FE_SPOT_LIGHT:
    7683    */
    77     case FE_BLEND: return new SVGFEBlend();
    78     case FE_COLOR_MATRIX: return new SVGFEColorMatrix();
    79     case FE_COMPONENT_TRANSFER: return new SVGFEComponentTransfer();
    80     case FE_COMPOSITE: return new SVGFEComposite();
     84    case FE_BLEND: return new SVGFEBlend(filter);
     85    case FE_COLOR_MATRIX: return new SVGFEColorMatrix(filter);
     86    case FE_COMPONENT_TRANSFER: return new SVGFEComponentTransfer(filter);
     87    case FE_COMPOSITE: return new SVGFEComposite(filter);
    8188//  case FE_CONVOLVE_MATRIX:
    82     case FE_DIFFUSE_LIGHTING: return new SVGFEDiffuseLighting();
    83     case FE_DISPLACEMENT_MAP: return new SVGFEDisplacementMap();
    84     case FE_FLOOD: return new SVGFEFlood();
    85     case FE_GAUSSIAN_BLUR: return new SVGFEGaussianBlur();
    86     case FE_IMAGE: return new SVGFEImage();
    87     case FE_MERGE: return new SVGFEMerge();
     89    case FE_DIFFUSE_LIGHTING: return new SVGFEDiffuseLighting(filter);
     90    case FE_DISPLACEMENT_MAP: return new SVGFEDisplacementMap(filter);
     91    case FE_FLOOD: return new SVGFEFlood(filter);
     92    case FE_GAUSSIAN_BLUR: return new SVGFEGaussianBlur(filter);
     93    case FE_IMAGE: return new SVGFEImage(filter);
     94    case FE_MERGE: return new SVGFEMerge(filter);
    8895//  case FE_MORPHOLOGY:
    89     case FE_OFFSET: return new SVGFEOffset();
    90     case FE_SPECULAR_LIGHTING: return new SVGFESpecularLighting();
    91     case FE_TILE: return new SVGFETile();
     96    case FE_OFFSET: return new SVGFEOffset(filter);
     97    case FE_SPECULAR_LIGHTING: return new SVGFESpecularLighting(filter);
     98    case FE_TILE: return new SVGFETile(filter);
    9299//  case FE_TURBULENCE:
    93100    default:
     
    113120    [filterContextPool drain];
    114121
    115     m_filterCGLayer = [m_filterCIContext createCGLayerWithSize:CGRect(bbox).size info:NULL];
     122    FloatRect filterRect = filterBBoxForItemBBox(bbox);
     123
     124    // TODO: Ensure the size is not greater than the nearest <svg> size and/or the window size.
     125    // This is also needed for masking & gradients-on-stroke-of-text. File a bug on this.
     126    float width = filterRect.width();
     127    float height = filterRect.height();
     128
     129    m_filterCGLayer = [m_filterCIContext createCGLayerWithSize:CGSizeMake(width, height) info:NULL];
    116130
    117131    context = new GraphicsContext(CGLayerGetContext(m_filterCGLayer));
    118132    context->save();
    119133
    120     context->translate(-bbox.x(), -bbox.y());
    121 }
     134    context->translate(-filterRect.x(), -filterRect.y());
     135}
     136
     137#if DEBUG_OUTPUT_IMAGE > 0
     138void dumpOutputImage(CIImage* outputImage)
     139{
     140    CGSize extentSize = [outputImage extent].size;
     141    NSImage* image = [[[NSImage alloc] initWithSize:NSMakeSize(extentSize.width, extentSize.height)] autorelease];
     142    [image addRepresentation:[NSCIImageRep imageRepWithCIImage:outputImage]];
     143
     144    NSData* imageData = [image TIFFRepresentation];
     145    NSBitmapImageRep* imageRep = [NSBitmapImageRep imageRepWithData:imageData];
     146    imageData = [imageRep representationUsingType:NSJPEGFileType properties:nil];
     147
     148    static unsigned int s_counter = 0;
     149    s_counter++;
     150
     151    [imageData writeToFile:[NSString stringWithFormat:@"/Users/nikoz/outputImages/%d.jpeg", s_counter] atomically:YES];
     152}
     153#endif
    122154
    123155void SVGResourceFilter::applyFilter(GraphicsContext*& context, const FloatRect& bbox)
     
    128160    // actually apply the filter effects
    129161    CIImage* inputImage = [CIImage imageWithCGLayer:m_filterCGLayer];
    130     NSArray* filterStack = getCIFilterStack(inputImage);
     162    NSArray* filterStack = getCIFilterStack(inputImage, bbox);
    131163    if ([filterStack count]) {
    132164        CIImage* outputImage = [[filterStack lastObject] valueForKey:@"outputImage"];
     165
    133166        if (outputImage) {
    134             CGRect filterRect = CGRect(filterBBoxForItemBBox(bbox));
    135             CGRect sourceRect = CGRectIntersection(filterRect, [outputImage extent]);
    136 
    137             CGPoint bboxOrigin = CGRect(bbox).origin;
    138             CGPoint destOrigin = sourceRect.origin;
    139 
    140             destOrigin.x += bboxOrigin.x;
    141             destOrigin.y += bboxOrigin.y;
    142 
    143             [m_filterCIContext drawImage:outputImage atPoint:destOrigin fromRect:sourceRect];
     167#if DEBUG_OUTPUT_IMAGE > 0
     168            dumpOutputImage(outputImage);
     169#endif
     170
     171            FloatRect filterRect = filterBBoxForItemBBox(bbox);
     172            FloatPoint destOrigin = filterRect.location();
     173            filterRect.setLocation(FloatPoint(0.0, 0.0));
     174
     175            [m_filterCIContext drawImage:outputImage atPoint:CGPoint(destOrigin) fromRect:filterRect];
    144176        }
    145177    }
     
    155187}
    156188
    157 NSArray* SVGResourceFilter::getCIFilterStack(CIImage* inputImage)
     189NSArray* SVGResourceFilter::getCIFilterStack(CIImage* inputImage, const FloatRect& bbox)
    158190{
    159191    NSMutableArray* filterEffects = [NSMutableArray array];
     
    162194
    163195    for (unsigned int i = 0; i < m_effects.size(); i++) {
    164         CIFilter* filter = m_effects[i]->getCIFilter(this);
     196        CIFilter* filter = m_effects[i]->getCIFilter(bbox);
    165197        if (filter)
    166198            [filterEffects addObject:filter];
    167199    }
    168200
    169     [m_imagesByName removeAllObjects]; // clean up before next time.
     201    [m_imagesByName.get() removeAllObjects]; // clean up before next time.
    170202
    171203    return filterEffects;
    172204}
    173205
    174 CIImage *SVGResourceFilter::imageForName(const String& name) const
    175 {
    176     return [m_imagesByName objectForKey:name];
    177 }
    178 
    179 void SVGResourceFilter::setImageForName(CIImage *image, const String &name)
    180 {
    181     [m_imagesByName setValue:image forKey:name];
    182 }
    183 
    184 void SVGResourceFilter::setOutputImage(const SVGFilterEffect *filterEffect, CIImage *output)
     206CIImage* SVGResourceFilter::imageForName(const String& name) const
     207{
     208    return [m_imagesByName.get() objectForKey:name];
     209}
     210
     211void SVGResourceFilter::setImageForName(CIImage* image, const String& name)
     212{
     213    [m_imagesByName.get() setValue:image forKey:name];
     214}
     215
     216void SVGResourceFilter::setOutputImage(const SVGFilterEffect* filterEffect, CIImage* output)
    185217{
    186218    if (!filterEffect->result().isEmpty())
    187219        setImageForName(output, filterEffect->result());
     220
    188221    setImageForName(output, SVGPreviousFilterOutputName);
    189222}
    190223
    191 static inline CIImage *alphaImageForImage(CIImage *image)
    192 {
    193     CIFilter *onlyAlpha = [CIFilter filterWithName:@"CIColorMatrix"];
     224static inline CIImage* alphaImageForImage(CIImage* image)
     225{
     226    CIFilter* onlyAlpha = [CIFilter filterWithName:@"CIColorMatrix"];
    194227    CGFloat zero[4] = {0, 0, 0, 0};
    195228    [onlyAlpha setDefaults];
     
    201234}
    202235
    203 CIImage *SVGResourceFilter::inputImage(const SVGFilterEffect *filterEffect)
     236CIImage* SVGResourceFilter::inputImage(const SVGFilterEffect* filterEffect)
    204237{
    205238    if (filterEffect->in().isEmpty()) {
    206         CIImage *inImage = imageForName(SVGPreviousFilterOutputName);
     239        CIImage* inImage = imageForName(SVGPreviousFilterOutputName);
     240
    207241        if (!inImage)
    208242            inImage = imageForName("SourceGraphic");
     243
    209244        return inImage;
    210245    } else if (filterEffect->in() == "SourceAlpha") {
    211         CIImage *sourceAlpha = imageForName(filterEffect->in());
     246        CIImage* sourceAlpha = imageForName(filterEffect->in());
     247
    212248        if (!sourceAlpha) {
    213             CIImage *sourceGraphic = imageForName("SourceGraphic");
     249            CIImage* sourceGraphic = imageForName("SourceGraphic");
     250
    214251            if (!sourceGraphic)
    215252                return nil;
     253
    216254            sourceAlpha = alphaImageForImage(sourceGraphic);
    217255            setImageForName(sourceAlpha, "SourceAlpha");
    218256        }
     257
    219258        return sourceAlpha;
    220259    }
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGDistantLightSource.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEBlend.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEBlend::SVGFEBlend(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_mode(SVG_FEBLEND_MODE_UNKNOWN)
     35{
     36}
    3137
    3238String SVGFEBlend::in2() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEBlend.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4141class SVGFEBlend : public SVGFilterEffect {
    4242public:
     43    SVGFEBlend(SVGResourceFilter*);
     44
    4345    String in2() const;
    4446    void setIn2(const String&);
     
    5052
    5153#if PLATFORM(CI)
    52     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     54    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    5355#endif
    5456
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEColorMatrix.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2828
    2929namespace WebCore {
     30
     31SVGFEColorMatrix::SVGFEColorMatrix(SVGResourceFilter* filter)
     32    : SVGFilterEffect(filter)
     33    , m_type(SVG_FECOLORMATRIX_TYPE_UNKNOWN)
     34{
     35}
    3036
    3137SVGColorMatrixType SVGFEColorMatrix::type() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEColorMatrix.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4141class SVGFEColorMatrix : public SVGFilterEffect {
    4242public:
     43    SVGFEColorMatrix(SVGResourceFilter*);
     44
    4345    SVGColorMatrixType type() const;
    4446    void setType(SVGColorMatrixType);
     
    5052
    5153#if PLATFORM(CI)
    52     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     54    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    5355#endif
    5456
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEComponentTransfer.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEComponentTransfer::SVGFEComponentTransfer(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34{
     35}
    3136
    3237SVGComponentTransferFunction SVGFEComponentTransfer::redFunction() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEComponentTransfer.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    5454struct SVGComponentTransferFunction {
    5555    SVGComponentTransferFunction()
    56         : type(SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY)
     56        : type(SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN)
     57        , slope(0.0)
     58        , intercept(0.0)
     59        , amplitude(0.0)
     60        , exponent(0.0)
     61        , offset(0.0)
    5762    {
    5863    }
    5964
    6065    SVGComponentTransferType type;
    61     Vector<float> tableValues;
     66
    6267    float slope;
    6368    float intercept;
     
    6570    float exponent;
    6671    float offset;
     72
     73    Vector<float> tableValues;
    6774};
    6875
    6976class SVGFEComponentTransfer : public SVGFilterEffect {
    7077public:
     78    SVGFEComponentTransfer(SVGResourceFilter*);
     79
    7180    SVGComponentTransferFunction redFunction() const;
    7281    void setRedFunction(const SVGComponentTransferFunction&);
     
    8493
    8594#if PLATFORM(CI)
    86     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     95    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    8796
    8897private:
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEComposite.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEComposite::SVGFEComposite(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_operation(SVG_FECOMPOSITE_OPERATOR_UNKNOWN)
     35    , m_k1(0.0)
     36    , m_k2(0.0)
     37    , m_k3(0.0)
     38    , m_k4(0.0)
     39{
     40}
    3141
    3242String SVGFEComposite::in2() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEComposite.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4242class SVGFEComposite : public SVGFilterEffect {
    4343public:
     44    SVGFEComposite(SVGResourceFilter*);
     45
    4446    String in2() const;
    4547    void setIn2(const String&);
     
    6365
    6466#if PLATFORM(CI)
    65     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     67    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    6668#endif
    6769
    6870private:
    69     String m_in2;
    7071    SVGCompositeOperationType m_operation;
    7172    float m_k1;
     
    7374    float m_k3;
    7475    float m_k4;
     76    String m_in2;
    7577};
    7678
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEConvolveMatrix::SVGFEConvolveMatrix(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_kernelSize()
     35    , m_divisor(0.0)
     36    , m_bias(0.0)
     37    , m_targetOffset()
     38    , m_edgeMode(SVG_EDGEMODE_UNKNOWN)
     39    , m_kernelUnitLength()
     40    , m_preserveAlpha(false)
     41{
     42}
    3143
    3244FloatSize SVGFEConvolveMatrix::kernelSize() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEConvolveMatrix.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3939class SVGFEConvolveMatrix : public SVGFilterEffect {
    4040public:
     41    SVGFEConvolveMatrix(SVGResourceFilter*);
     42
    4143    FloatSize kernelSize() const;
    4244    void setKernelSize(FloatSize);
     
    6769private:
    6870    FloatSize m_kernelSize;
    69     Vector<float> m_kernelMatrix; // maybe should be a real matrix?
    7071    float m_divisor;
    7172    float m_bias;
     
    7475    FloatPoint m_kernelUnitLength;
    7576    bool m_preserveAlpha;
     77    Vector<float> m_kernelMatrix; // maybe should be a real matrix?
    7678};
    7779
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3131namespace WebCore {
    3232
    33 SVGFEDiffuseLighting::SVGFEDiffuseLighting()
    34     : m_lightSource(0)
     33SVGFEDiffuseLighting::SVGFEDiffuseLighting(SVGResourceFilter* filter)
     34    : SVGFilterEffect(filter)
     35    , m_lightingColor()
     36    , m_surfaceScale(0.0)
     37    , m_diffuseConstant(0.0)
     38    , m_kernelUnitLengthX(0.0)
     39    , m_kernelUnitLengthY(0.0)
     40    , m_lightSource(0)
    3541{
    3642}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEDiffuseLighting.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3535class SVGFEDiffuseLighting : public SVGFilterEffect {
    3636public:
    37     SVGFEDiffuseLighting();
     37    SVGFEDiffuseLighting(SVGResourceFilter*);
    3838    virtual ~SVGFEDiffuseLighting();
    3939
     
    5959
    6060#if PLATFORM(CI)
    61     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     61    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    6262#endif
    6363
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEDisplacementMap.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3030namespace WebCore {
    3131
    32 SVGFEDisplacementMap::SVGFEDisplacementMap()
    33     : m_xChannelSelector(SVG_CHANNEL_R)
    34     , m_yChannelSelector(SVG_CHANNEL_R)
     32SVGFEDisplacementMap::SVGFEDisplacementMap(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_xChannelSelector(SVG_CHANNEL_UNKNOWN)
     35    , m_yChannelSelector(SVG_CHANNEL_UNKNOWN)
    3536    , m_scale(0)
    3637{
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEDisplacementMap.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    4040class SVGFEDisplacementMap : public SVGFilterEffect {
    4141public:
    42     SVGFEDisplacementMap();
     42    SVGFEDisplacementMap(SVGResourceFilter*);
    4343
    4444    String in2() const;
     
    5757
    5858#if PLATFORM(CI)
    59     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     59    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    6060#endif
    6161
    6262private:
    63     String m_in2;
    6463    SVGChannelSelectorType m_xChannelSelector;
    6564    SVGChannelSelectorType m_yChannelSelector;
    6665    float m_scale;
     66    String m_in2;
    6767};
    6868
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEFlood.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEFlood::SVGFEFlood(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_floodColor()
     35    , m_floodOpacity(0.0)
     36{
     37}
    3138
    3239Color SVGFEFlood::floodColor() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEFlood.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3333class SVGFEFlood : public SVGFilterEffect {
    3434public:
     35    SVGFEFlood(SVGResourceFilter*);
     36
    3537    Color floodColor() const;
    3638    void setFloodColor(const Color &);
     
    4244
    4345#if PLATFORM(CI)
    44     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     46    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    4547#endif
    4648
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEGaussianBlur.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEGaussianBlur::SVGFEGaussianBlur(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_x(0.0)
     35    , m_y(0.0)
     36{
     37}
    3138
    3239float SVGFEGaussianBlur::stdDeviationX() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEGaussianBlur.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3232class SVGFEGaussianBlur : public SVGFilterEffect {
    3333public:
     34    SVGFEGaussianBlur(SVGResourceFilter*);
     35
    3436    float stdDeviationX() const;
    3537    void setStdDeviationX(float);
     
    4143
    4244#if PLATFORM(CI)
    43     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     45    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    4446#endif
    4547
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEImage.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3030namespace WebCore {
    3131
    32 SVGFEImage::SVGFEImage()
    33     : m_cachedImage(0)
     32SVGFEImage::SVGFEImage(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_cachedImage(0)
    3435{
    3536}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEImage.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3333
    3434class SVGFEImage : public SVGFilterEffect
    35                          , public CachedResourceClient {
     35                 , public CachedResourceClient {
    3636public:
    37     SVGFEImage();
     37    SVGFEImage(SVGResourceFilter*);
    3838    virtual ~SVGFEImage();
    3939
    40     // FIXME: Eventually we need to support <svg> (RenderObject*) as well as image data.
     40    // FIXME: We need to support <svg> (RenderObject*) as well as image data.
    4141
    4242    CachedImage* cachedImage() const;
     
    4646
    4747#if PLATFORM(CI)
    48     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     48    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    4949#endif
    5050
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEMerge.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEMerge.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3232class SVGFEMerge : public SVGFilterEffect {
    3333public:
     34    SVGFEMerge(SVGResourceFilter* filter) : SVGFilterEffect(filter) { }
     35
    3436    const Vector<String>& mergeInputs() const;
    3537    void setMergeInputs(const Vector<String>& mergeInputs);
     
    3840
    3941#if PLATFORM(CI)
    40     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     42    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    4143#endif
    4244
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEMorphology.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEMorphology::SVGFEMorphology(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_operator(SVG_MORPHOLOGY_OPERATOR_UNKNOWN)
     35    , m_radiusX(0.0)
     36    , m_radiusY(0.0)
     37{
     38}
    3139
    3240SVGMorphologyOperatorType SVGFEMorphology::morphologyOperator() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEMorphology.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3838class SVGFEMorphology : public SVGFilterEffect {
    3939public:
     40    SVGFEMorphology(SVGResourceFilter*);
     41
    4042    SVGMorphologyOperatorType morphologyOperator() const;
    4143    void setMorphologyOperator(SVGMorphologyOperatorType);
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEOffset.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFEOffset::SVGFEOffset(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_dx(0.0)
     35    , m_dy(0.0)
     36{
     37}
    3138
    3239float SVGFEOffset::dx() const
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFEOffset.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3232class SVGFEOffset : public SVGFilterEffect {
    3333public:
     34    SVGFEOffset(SVGResourceFilter*);
     35
    3436    float dx() const;
    3537    void setDx(float);
     
    4143
    4244#if PLATFORM(CI)
    43     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     45    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    4446#endif
    4547
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFESpecularLighting.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3030namespace WebCore {
    3131
    32 SVGFESpecularLighting::SVGFESpecularLighting()
    33     : m_lightSource(0)
     32SVGFESpecularLighting::SVGFESpecularLighting(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_lightingColor()
     35    , m_surfaceScale(0.0)
     36    , m_specularConstant(0.0)
     37    , m_specularExponent(0.0)
     38    , m_kernelUnitLengthX(0.0)
     39    , m_kernelUnitLengthY(0.0)
     40    , m_lightSource(0)
    3441{
    3542}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFESpecularLighting.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3434class SVGFESpecularLighting : public SVGFilterEffect {
    3535public:
    36     SVGFESpecularLighting();
    37     ~SVGFESpecularLighting();
     36    SVGFESpecularLighting(SVGResourceFilter*);
     37    virtual ~SVGFESpecularLighting();
    3838
    3939    Color lightingColor() const;
     
    6161
    6262#if PLATFORM(CI)
    63     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     63    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    6464#endif
    6565
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFETile.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3333{
    3434public:
     35    SVGFETile(SVGResourceFilter* filter) : SVGFilterEffect(filter) { }
     36
    3537#if PLATFORM(CI)
    36     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     38    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    3739#endif
    3840};
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFETurbulence.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2929
    3030namespace WebCore {
     31
     32SVGFETurbulence::SVGFETurbulence(SVGResourceFilter* filter)
     33    : SVGFilterEffect(filter)
     34    , m_baseFrequencyX(0.0)
     35    , m_baseFrequencyY(0.0)
     36    , m_numOctaves(0)
     37    , m_seed(0)
     38    , m_stitchTiles(false)
     39    , m_type(SVG_TURBULENCE_TYPE_UNKNOWN)
     40{
     41}
    3142
    3243SVGTurbulanceType SVGFETurbulence::type() const
     
    104115}
    105116
    106 
    107117TextStream& SVGFETurbulence::externalRepresentation(TextStream& ts) const
    108118{
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFETurbulence.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3838class SVGFETurbulence : public SVGFilterEffect {
    3939public:
     40    SVGFETurbulence(SVGResourceFilter*);
     41
    4042    SVGTurbulanceType type() const;
    4143    void setType(SVGTurbulanceType);
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFilterEffect.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    2828
    2929#include "SVGRenderTreeAsText.h"
     30#include "SVGResourceFilter.h"
    3031#include "TextStream.h"
    3132
    3233namespace WebCore {
     34
     35SVGFilterEffect::SVGFilterEffect(SVGResourceFilter* filter)
     36    : m_filter(filter)
     37    , m_xBBoxMode(false)
     38    , m_yBBoxMode(false)
     39    , m_widthBBoxMode(false)
     40    , m_heightBBoxMode(false)
     41{
     42}
     43
     44FloatRect SVGFilterEffect::primitiveBBoxForFilterBBox(const FloatRect& filterBBox, const FloatRect& itemBBox) const
     45{
     46    FloatRect subRegionBBox = subRegion();
     47    FloatRect useBBox = filterBBox;
     48
     49    ASSERT(m_filter);
     50    if (!m_filter)
     51        return FloatRect();
     52
     53    if (m_filter->effectBoundingBoxMode()) {
     54        if (!m_filter->filterBoundingBoxMode())
     55            useBBox = itemBBox;
     56
     57        subRegionBBox = FloatRect(useBBox.x() + subRegionBBox.x() * useBBox.width(),
     58                                  useBBox.y() + subRegionBBox.y() * useBBox.height(),
     59                                  subRegionBBox.width() * useBBox.width(),
     60                                  subRegionBBox.height() * useBBox.height());
     61    } else {
     62        if (xBoundingBoxMode())
     63            subRegionBBox.setX(useBBox.x() + subRegionBBox.x() * useBBox.width());
     64
     65        if (yBoundingBoxMode())
     66            subRegionBBox.setY(useBBox.y() + subRegionBBox.y() * useBBox.height());
     67
     68        if (widthBoundingBoxMode())
     69            subRegionBBox.setWidth(subRegionBBox.width() * useBBox.width());
     70
     71        if (heightBoundingBoxMode())
     72            subRegionBBox.setHeight(subRegionBBox.height() * useBBox.height());
     73    }
     74
     75    return subRegionBBox;
     76}
    3377
    3478FloatRect SVGFilterEffect::subRegion() const
     
    62106}
    63107
     108SVGResourceFilter* SVGFilterEffect::filter() const
     109{
     110    return m_filter;
     111}
     112
     113void SVGFilterEffect::setFilter(SVGResourceFilter* filter)
     114{
     115    m_filter = filter;
     116}
     117
    64118TextStream& SVGFilterEffect::externalRepresentation(TextStream& ts) const
    65119{
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGFilterEffect.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    6666class SVGFilterEffect {
    6767public:
    68     // this default constructor is only needed for gcc 3.3
    69     SVGFilterEffect() { }
     68    SVGFilterEffect(SVGResourceFilter*);
    7069    virtual ~SVGFilterEffect() { }
    7170
    7271    virtual SVGFilterEffectType effectType() const { return FE_TURBULENCE; }
     72
     73    bool xBoundingBoxMode() const { return m_xBBoxMode; }
     74    void setXBoundingBoxMode(bool bboxMode) { m_xBBoxMode = bboxMode; }
     75
     76    bool yBoundingBoxMode() const { return m_yBBoxMode; }
     77    void setYBoundingBoxMode(bool bboxMode) { m_yBBoxMode = bboxMode; }
     78
     79    bool widthBoundingBoxMode() const { return m_widthBBoxMode; }
     80    void setWidthBoundingBoxMode(bool bboxMode) { m_widthBBoxMode = bboxMode; }
     81
     82    bool heightBoundingBoxMode() const { return m_heightBBoxMode; }
     83    void setHeightBoundingBoxMode(bool bboxMode) { m_heightBBoxMode = bboxMode; }
     84
     85    FloatRect primitiveBBoxForFilterBBox(const FloatRect& filterBBox, const FloatRect& itemBBox) const;
    7386
    7487    FloatRect subRegion() const;
     
    8194    void setResult(const String&);
    8295
     96    SVGResourceFilter* filter() const;
     97    void setFilter(SVGResourceFilter*);
     98
    8399    virtual TextStream& externalRepresentation(TextStream&) const;
    84100
    85101#if PLATFORM(CI)
    86     virtual CIFilter* getCIFilter(SVGResourceFilter*) const;
     102    virtual CIFilter* getCIFilter(const FloatRect& bbox) const;
    87103#endif
    88104
    89105private:
     106    SVGResourceFilter* m_filter;
     107
     108    bool m_xBBoxMode : 1;
     109    bool m_yBBoxMode : 1;
     110    bool m_widthBBoxMode : 1;
     111    bool m_heightBBoxMode : 1;
     112
    90113    FloatRect m_subRegion;
    91 
     114 
    92115    String m_in;
    93116    String m_result;
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGLightSource.cpp

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGLightSource.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGPointLightSource.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3333class SVGPointLightSource : public SVGLightSource {
    3434public:
    35     SVGPointLightSource(FloatPoint3D& position)
     35    SVGPointLightSource(const FloatPoint3D& position)
    3636        : SVGLightSource(LS_POINT)
    3737        , m_position(position)
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/SVGSpotLightSource.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
     2    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33                  2004, 2005 Rob Buis <buis@kde.org>
    44                  2005 Eric Seidel <eric.seidel@kdemail.net>
     
    3333class SVGSpotLightSource : public SVGLightSource {
    3434public:
    35     SVGSpotLightSource(FloatPoint3D& position, FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
     35    SVGSpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
    3636        : SVGLightSource(LS_SPOT)
    3737        , m_position(position)
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEBlendCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFEBlend::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFEBlend::getCIFilter(const FloatRect& bbox) const
    3131{
    32     CIFilter *filter = nil;
     32    SVGResourceFilter* svgFilter = filter();
     33    CIFilter* filter = nil;
    3334    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    3435
     
    5859
    5960    [filter setDefaults];
    60     CIImage *inputImage = svgFilter->inputImage(this);
     61
     62    CIImage* inputImage = svgFilter->inputImage(this);
    6163    FE_QUARTZ_CHECK_INPUT(inputImage);
    6264    [filter setValue:inputImage forKey:@"inputImage"];
    63     CIImage *backgroundImage = svgFilter->imageForName(in2());
     65
     66    CIImage* backgroundImage = svgFilter->imageForName(in2());
    6467    FE_QUARTZ_CHECK_INPUT(backgroundImage);
    6568    [filter setValue:backgroundImage forKey:@"inputBackgroundImage"];
    6669
     70    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    6771    FE_QUARTZ_OUTPUT_RETURN;
    6872}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm

    r19855 r25175  
    3636    }
    3737
    38 CIFilter* SVGFEColorMatrix::getCIFilter(SVGResourceFilter* svgFilter) const
     38CIFilter* SVGFEColorMatrix::getCIFilter(const FloatRect& bbox) const
    3939{
     40    SVGResourceFilter* svgFilter = filter();
    4041    CIFilter* filter = nil;
    4142    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    99100    [filter setValue:inputImage forKey:@"inputImage"];
    100101
     102    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    101103    FE_QUARTZ_OUTPUT_RETURN;
    102104}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm

    r19855 r25175  
    8383    CIFilter *filter;
    8484    switch (func.type) {
     85    case SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN:
    8586    case SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY:
    8687        filter = [CIFilter filterWithName:@"WKIdentityTransfer"];
     
    133134}
    134135
    135 CIFilter* SVGFEComponentTransfer::getCIFilter(SVGResourceFilter* svgFilter) const
     136CIFilter* SVGFEComponentTransfer::getCIFilter(const FloatRect& bbox) const
    136137{
    137138    [WKComponentMergeFilter class];
     
    142143    [WKGammaTransferFilter class];
    143144
     145    SVGResourceFilter* svgFilter = filter();
    144146    CIFilter* filter = nil;
    145147    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    156158    [filter setValue:getFunctionFilter(SVG_CHANNEL_A, inputImage) forKey:@"inputFuncA"];
    157159
     160    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    158161    FE_QUARTZ_OUTPUT_RETURN;
    159162    return nil;
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFECompositeCg.mm

    r19855 r25175  
    3030namespace WebCore {
    3131
    32 CIFilter* SVGFEComposite::getCIFilter(SVGResourceFilter* svgFilter) const
     32CIFilter* SVGFEComposite::getCIFilter(const FloatRect& bbox) const
    3333{
     34    SVGResourceFilter* svgFilter = filter();
    3435    CIFilter* filter = nil;
    3536    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    7475        [filter setValue:[NSNumber numberWithFloat:k4()] forKey:@"inputK4"];
    7576    }
     77
     78    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    7679    FE_QUARTZ_OUTPUT_RETURN;
    7780}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm

    r19855 r25175  
    3030namespace WebCore {
    3131
    32 CIFilter* SVGFEDiffuseLighting::getCIFilter(SVGResourceFilter* svgFilter) const
     32CIFilter* SVGFEDiffuseLighting::getCIFilter(const FloatRect& bbox) const
    3333{
    3434    const SVGLightSource* light = lightSource();
     
    3838    [WKDiffuseLightingFilter class];
    3939
     40    SVGResourceFilter* svgFilter = filter();
    4041    CIFilter* filter;
    4142    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    6364    [filter setValue:[NSNumber numberWithFloat:kernelUnitLengthY()] forKey:@"inputKernelUnitLengthY"];
    6465
     66    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    6567    FE_QUARTZ_OUTPUT_RETURN;
    6668}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm

    r19855 r25175  
    3030namespace WebCore {
    3131
    32 CIFilter* SVGFEDisplacementMap::getCIFilter(SVGResourceFilter* svgFilter) const
     32CIFilter* SVGFEDisplacementMap::getCIFilter(const FloatRect& bbox) const
    3333{
     34    SVGResourceFilter* svgFilter = filter();
    3435    CIFilter* filter = nil;
    3536    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    4647    [filter setValue:getVectorForChannel(yChannelSelector()) forKey:@"inputYChannelSelector"];
    4748    [filter setValue:[NSNumber numberWithFloat:scale()] forKey:@"inputScale"];
     49
     50    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    4851    FE_QUARTZ_OUTPUT_RETURN;
    4952}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEFloodCg.mm

    r19855 r25175  
    11/*
    2     Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33
    44    This file is part of the KDE project
     
    2424#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
    2525#include "SVGFEFlood.h"
     26
     27#include "AffineTransform.h"
    2628#include "SVGFEHelpersCg.h"
     29#include "CgSupport.h"
    2730
    2831namespace WebCore {
    2932
    30 CIFilter* SVGFEFlood::getCIFilter(SVGResourceFilter* svgFilter) const
     33CIFilter* SVGFEFlood::getCIFilter(const FloatRect& bbox) const
    3134{
     35    SVGResourceFilter* svgFilter = filter();
    3236    CIFilter* filter;
    3337    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    3539    [filter setDefaults];
    3640    CGColorRef color = cgColor(floodColor());
    37     CGColorRef withAlpha = CGColorCreateCopyWithAlpha(color,CGColorGetAlpha(color) * floodOpacity());
     41    CGColorRef withAlpha = CGColorCreateCopyWithAlpha(color, CGColorGetAlpha(color) * floodOpacity());
    3842    CIColor* inputColor = [CIColor colorWithCGColor:withAlpha];
    3943    CGColorRelease(color);
     
    4145    [filter setValue:inputColor forKey:@"inputColor"];
    4246
    43     CGRect cropRect = CGRectMake(-100,-100,1000,1000); // HACK
    44     if (!subRegion().isEmpty())
    45         cropRect = subRegion();
    46     FE_QUARTZ_CROP_TO_RECT(cropRect);
    47 
     47    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    4848    FE_QUARTZ_OUTPUT_RETURN;
    4949}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFEGaussianBlur::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFEGaussianBlur::getCIFilter(const FloatRect& bbox) const
    3131{
     32    SVGResourceFilter* svgFilter = filter();
    3233    FE_QUARTZ_SETUP_INPUT(@"CIGaussianPyramid");
    3334
     
    4041    [filter setValue:[NSNumber numberWithFloat:inputRadius] forKey:@"inputRadius"];
    4142
     43    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    4244    FE_QUARTZ_OUTPUT_RETURN;
    4345}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEHelpersCg.h

    r19855 r25175  
    11/*
    2     Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33
    44    This file is part of the KDE project
     
    6262    return nil;
    6363
    64 #define FE_QUARTZ_CROP_TO_RECT(rect) \
     64#define FE_QUARTZ_MAP_TO_SUBREGION_PREPARE(bbox) \
     65    FloatRect filterRect = svgFilter->filterBBoxForItemBBox(bbox); \
     66    FloatRect cropRect = primitiveBBoxForFilterBBox(filterRect, bbox); \
     67    cropRect.intersect(filterRect); \
     68    cropRect.move(-filterRect.x(), -filterRect.y());
     69
     70#define FE_QUARTZ_MAP_TO_SUBREGION_APPLY(cropRect) \
    6571    { \
    6672        CIFilter* crop = [CIFilter filterWithName:@"CICrop"]; \
    6773        [crop setDefaults]; \
    6874        [crop setValue:[filter valueForKey:@"outputImage"] forKey:@"inputImage"]; \
    69         [crop setValue:[CIVector vectorWithX:rect.origin.x Y:rect.origin.y Z:rect.size.width W:rect.size.height] forKey:@"inputRectangle"]; \
     75        [crop setValue:[CIVector vectorWithX:cropRect.x() Y:cropRect.y() Z:cropRect.width() W:cropRect.height()] forKey:@"inputRectangle"]; \
    7076        filter = crop; \
    7177    }
     78
     79#define FE_QUARTZ_MAP_TO_SUBREGION(bbox) \
     80    FE_QUARTZ_MAP_TO_SUBREGION_PREPARE(bbox); \
     81    FE_QUARTZ_MAP_TO_SUBREGION_APPLY(cropRect);
    7282
    7383#define deg2rad(d) ((d * (2.0 * M_PI)) / 360.0)
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEImageCg.mm

    r19855 r25175  
    11/*
    2     Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
     2    Copyright (C) 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    33
    44    This file is part of the KDE project
     
    3131namespace WebCore {
    3232
    33 CIFilter* SVGFEImage::getCIFilter(SVGResourceFilter* svgFilter) const
     33CIFilter* SVGFEImage::getCIFilter(const FloatRect& bbox) const
    3434{
    3535    if (!cachedImage())
    3636        return nil;
    3737
     38    SVGResourceFilter* svgFilter = filter();
    3839    CIFilter* filter;
    3940    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    4041    CIImage* ciImage = [CIImage imageWithCGImage:cachedImage()->image()->getCGImageRef()];
    4142
    42     // FIXME: There is probably a nicer way to perform both of these transforms.
    4343    filter = [CIFilter filterWithName:@"CIAffineTransform"];
    4444    [filter setDefaults];
    4545    [filter setValue:ciImage forKey:@"inputImage"];
    4646
    47     CGAffineTransform cgTransform = CGAffineTransformMake(1,0,0,-1,0,cachedImage()->image()->rect().bottom());
     47    FloatRect imageRect = cachedImage()->image()->rect();
     48
     49    // Flip image into right origin
     50    CGAffineTransform cgTransform = CGAffineTransformMake(1.0, 0.0, 0.0, -1.0, 0.0, imageRect.bottom());
    4851    NSAffineTransform* nsTransform = [NSAffineTransform transform];
    4952    [nsTransform setTransformStruct:*((NSAffineTransformStruct *)&cgTransform)];
    5053    [filter setValue:nsTransform forKey:@"inputTransform"];
    5154
    52     if (!subRegion().isEmpty()) {
     55    // Calculate crop rect
     56    FE_QUARTZ_MAP_TO_SUBREGION_PREPARE(bbox);
     57
     58    // Map between the image rectangle and the crop rect
     59    if (!cropRect.isEmpty()) {
    5360        CIFilter* scaleImage = [CIFilter filterWithName:@"CIAffineTransform"];
    5461        [scaleImage setDefaults];
    5562        [scaleImage setValue:[filter valueForKey:@"outputImage"] forKey:@"inputImage"];
    5663
    57         cgTransform = CGAffineTransformMakeMapBetweenRects(CGRect(cachedImage()->image()->rect()), subRegion());
     64        cgTransform = CGAffineTransformMakeMapBetweenRects(CGRect(imageRect), CGRect(cropRect));
    5865        [nsTransform setTransformStruct:*((NSAffineTransformStruct *)&cgTransform)];
    5966        [scaleImage setValue:nsTransform forKey:@"inputTransform"];
     67
    6068        filter = scaleImage;
    6169    }
    6270
     71    // Actually apply cropping
     72    FE_QUARTZ_MAP_TO_SUBREGION_APPLY(cropRect);
    6373    FE_QUARTZ_OUTPUT_RETURN;
    6474}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEMergeCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFEMerge::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFEMerge::getCIFilter(const FloatRect& bbox) const
    3131{
     32    SVGResourceFilter* svgFilter = filter();
    3233    CIFilter* filter = nil;
    3334    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    4546        previousOutput = [filter valueForKey:@"outputImage"];
    4647    }
     48
     49    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    4750    FE_QUARTZ_OUTPUT_RETURN;
    4851}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFEOffset::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFEOffset::getCIFilter(const FloatRect& bbox) const
    3131{
     32    SVGResourceFilter* svgFilter = filter();
    3233    FE_QUARTZ_SETUP_INPUT(@"CIAffineTransform");
    3334    NSAffineTransform* offsetTransform = [NSAffineTransform transform];
    3435    [offsetTransform translateXBy:dx() yBy:dy()];
    3536    [filter setValue:offsetTransform  forKey:@"inputTransform"];
     37
     38    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    3639    FE_QUARTZ_OUTPUT_RETURN;
    3740}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm

    r19855 r25175  
    3030namespace WebCore {
    3131
    32 CIFilter* SVGFESpecularLighting::getCIFilter(SVGResourceFilter* svgFilter) const
     32CIFilter* SVGFESpecularLighting::getCIFilter(const FloatRect& bbox) const
    3333{
    3434    const SVGLightSource* light = lightSource();
    35     if(!light)
     35    if (!light)
    3636        return nil;
    3737
    3838    [WKSpecularLightingFilter class];
    3939
     40    SVGResourceFilter* svgFilter = filter();
    4041    CIFilter* filter;
    4142    BEGIN_BLOCK_OBJC_EXCEPTIONS;
     
    5960    [filter setValue:[NSNumber numberWithFloat:kernelUnitLengthY()] forKey:@"inputKernelUnitLengthY"];
    6061
     62    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    6163    FE_QUARTZ_OUTPUT_RETURN;
    6264}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFETileCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFETile::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFETile::getCIFilter(const FloatRect& bbox) const
    3131{
     32    SVGResourceFilter* svgFilter = filter();
    3233    FE_QUARTZ_SETUP_INPUT(@"CIAffineTile");
     34
     35    FE_QUARTZ_MAP_TO_SUBREGION(bbox);
    3336    FE_QUARTZ_OUTPUT_RETURN;
    3437}
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm

    r19855 r25175  
    2828namespace WebCore {
    2929
    30 CIFilter* SVGFilterEffect::getCIFilter(SVGResourceFilter* svgFilter) const
     30CIFilter* SVGFilterEffect::getCIFilter(const FloatRect& bbox) const
    3131{
    3232    return nil;
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel

    r17850 r25175  
    2525
    2626kernel vec4 diffuseLighting(sampler normalVectors, sampler lightVectors, __color lightingColor,
    27     float surfaceScale, float diffuseConstant, float kernelLengthX,
    28     float kernelLengthY)
     27    float surfaceScale, float diffuseConstant, float kernelLengthX, float kernelLengthY)
    2928{
    3029    vec2 pos = samplerCoord(lightVectors);
     
    3433    l = normalize(l);
    3534    vec3 n = sample(normalVectors, posn).xyz;
    36     float nl = dot(l, n);
     35    float nl = dot(l, n) * diffuseConstant;
    3736    vec4 res = vec4(lightingColor.r * nl, lightingColor.g * nl, lightingColor.b * nl, 1.0);
    3837    res.xyz *= l4.w;
  • branches/feature-branch/WebCore/platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel

    r17850 r25175  
    4141    float yc = dot(XCYC, ychannel);
    4242    samplePos.x += scale*(xc-0.5);
    43     //flip the y-axis
    44     samplePos.y -= scale*(yc-0.5);
     43    samplePos.y += scale*(yc-0.5);
    4544    return sample(image, samplePos);
    4645}
  • branches/feature-branch/WebCore/platform/graphics/svg/qt/SVGResourceFilterQt.cpp

    r19877 r25175  
    3535}
    3636
    37 SVGFilterEffect* SVGResourceFilter::createFilterEffect(const SVGFilterEffectType&)
     37SVGFilterEffect* SVGResourceFilter::createFilterEffect(const SVGFilterEffectType&, SVGResourceFilter*)
    3838{
    3939    // FIXME: implement me :-)
Note: See TracChangeset for help on using the changeset viewer.