Title: [143267] trunk
Revision
143267
Author
[email protected]
Date
2013-02-18 15:07:00 -0800 (Mon, 18 Feb 2013)

Log Message

feFlood incorrectly applied color-interpolation-filters
https://bugs.webkit.org/show_bug.cgi?id=109985

Reviewed by Dirk Schulze.

Source/WebCore:

The SVG spec defines the color-interpolation-filters property for all
filter effect elements in order to control cases where a color is
based on some arithmetic computation on other colors. For example,
when computing gradients or blending colors. feFlood simply fills a
region with the given color, and that given color is always defined to
be in sRGB space, so the feFlood result should always be sRGB.

The new behavior matches both Opera and Firefox.

Tests: svg/filters/feFlood-color-interpolation-expected.svg
       svg/filters/feFlood-color-interpolation.svg

* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::platformApplySoftware): Force the color mode to be
sRGB before returning.

LayoutTests:

New test for feFlood behavior when color-interpolation-filters is used.

Failing expectations for tests affected by this change.

* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* svg/filters/feFlood-color-interpolation-expected.svg: Added.
* svg/filters/feFlood-color-interpolation.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (143266 => 143267)


--- trunk/LayoutTests/ChangeLog	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/LayoutTests/ChangeLog	2013-02-18 23:07:00 UTC (rev 143267)
@@ -1,3 +1,20 @@
+2013-02-18  Stephen Chenney  <[email protected]>
+
+        feFlood incorrectly applied color-interpolation-filters
+        https://bugs.webkit.org/show_bug.cgi?id=109985
+
+        Reviewed by Dirk Schulze.
+
+        New test for feFlood behavior when color-interpolation-filters is used.
+
+        Failing expectations for tests affected by this change.
+
+        * platform/chromium/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/win/TestExpectations:
+        * svg/filters/feFlood-color-interpolation-expected.svg: Added.
+        * svg/filters/feFlood-color-interpolation.svg: Added.
+
 2013-02-18  David Hyatt  <[email protected]>
 
         Just skip the seamless iframe flowed into regions test on chromium. It's failing with a repaint issue.

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (143266 => 143267)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-02-18 23:07:00 UTC (rev 143267)
@@ -4387,6 +4387,39 @@
 # Needs rebaseline after https://bugs.webkit.org/show_bug.cgi?id=9221
 webkit.org/b/9221 [ Mac ] fast/css/resize-corner-tracking-transformed.html [ Failure ]
 
+# Needs rebaseline after https://webkit.org/b/109985
+webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
+
 # The test is flaky on chromium-ews
 webkit.org/b/107953 inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html [ Pass Failure ]
 

Modified: trunk/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-in-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFETileElement-dom-in-attr-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFETileElement-svgdom-in-prop-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/filters/big-sized-filter-2-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/filters/feImage-reference-svg-primitive-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/filters/filter-on-tspan-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/svg/filters/shadow-on-filter-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/custom/visibility-override-filter-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/filters/filterRes1-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/filters/filterRes3-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/filters/parent-children-with-same-filter-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-win/svg/filters/shadow-on-rect-with-filter-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/TestExpectations (143266 => 143267)


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-02-18 23:07:00 UTC (rev 143267)
@@ -1413,7 +1413,40 @@
 webkit.org/b/108257 [ Debug ] compositing/overflow/composited-scrolling-creates-a-stacking-container.html [ Crash ]
 webkit.org/b/108257 [ Debug ] compositing/overflow/automatically-opt-into-composited-scrolling.html [ Crash ]
 
+# Needs rebaseline after https://webkit.org/b/109985
+webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
 
+
 # Rebaseline required after https://webkit.org/b/95772
 webkit.org/b/109209 fast/text/international/bidi-ignored-for-first-child-inline.html [ Failure ]
 

Modified: trunk/LayoutTests/platform/win/TestExpectations (143266 => 143267)


--- trunk/LayoutTests/platform/win/TestExpectations	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/LayoutTests/platform/win/TestExpectations	2013-02-18 23:07:00 UTC (rev 143267)
@@ -2630,6 +2630,39 @@
 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
 webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
 
+# Needs rebaseline after https://webkit.org/b/109985
+webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
+webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
+
 # Need rebaseline after https://bugs.webkit.org/show_bug.cgi?id=109775
 webkit.org/b/109775 media/audio-controls-rendering.html [ Failure ]
 webkit.org/b/109775 media/controls-after-reload.html [ Failure ]

Added: trunk/LayoutTests/svg/filters/feFlood-color-interpolation-expected.svg (0 => 143267)


--- trunk/LayoutTests/svg/filters/feFlood-color-interpolation-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/filters/feFlood-color-interpolation-expected.svg	2013-02-18 23:07:00 UTC (rev 143267)
@@ -0,0 +1,5 @@
+<svg version="1.2" width="500" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <rect fill="rgb(50%,50%,50%)" stroke="none" x="20" y="20" width="100" height="100" />
+  <rect fill="rgb(50%,50%,50%)" stroke="none" x="140" y="20" width="100" height="100" />
+  <rect fill="rgb(50%,50%,50%)" stroke="none" x="260" y="20" width="100" height="100" />
+</svg>

Added: trunk/LayoutTests/svg/filters/feFlood-color-interpolation.svg (0 => 143267)


--- trunk/LayoutTests/svg/filters/feFlood-color-interpolation.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/filters/feFlood-color-interpolation.svg	2013-02-18 23:07:00 UTC (rev 143267)
@@ -0,0 +1,14 @@
+<svg version="1.2" width="500" height="300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <defs>
+    <filter id="sRGB-interpolation" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
+      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" color-interpolation-filters="sRGB" x="0" y="0" height="1" width="1" result="grey-input"/>
+    </filter>
+    <filter id="linearRGB-interpolation" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" x="0" y="0" width="1" height="1">
+      <feFlood flood-color="rgb(50%,50%,50%)" flood-opacity="1.0" color-interpolation-filters="linearRGB" x="0" y="0" height="1" width="1" result="grey-input"/>
+    </filter>
+  </defs>
+  <rect filter="url(#sRGB-interpolation)" stroke="none" x="20" y="20" width="100" height="100" />
+  <rect filter="url(#linearRGB-interpolation)" stroke="none" x="140" y="20" width="100" height="100" />
+  <rect fill="rgb(50%,50%,50%)" stroke="none" x="260" y="20" width="100" height="100" />
+</svg>
+

Modified: trunk/Source/WebCore/ChangeLog (143266 => 143267)


--- trunk/Source/WebCore/ChangeLog	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/Source/WebCore/ChangeLog	2013-02-18 23:07:00 UTC (rev 143267)
@@ -1,3 +1,26 @@
+2013-02-18  Stephen Chenney  <[email protected]>
+
+        feFlood incorrectly applied color-interpolation-filters
+        https://bugs.webkit.org/show_bug.cgi?id=109985
+
+        Reviewed by Dirk Schulze.
+
+        The SVG spec defines the color-interpolation-filters property for all
+        filter effect elements in order to control cases where a color is
+        based on some arithmetic computation on other colors. For example,
+        when computing gradients or blending colors. feFlood simply fills a
+        region with the given color, and that given color is always defined to
+        be in sRGB space, so the feFlood result should always be sRGB.
+
+        The new behavior matches both Opera and Firefox.
+
+        Tests: svg/filters/feFlood-color-interpolation-expected.svg
+               svg/filters/feFlood-color-interpolation.svg
+
+        * platform/graphics/filters/FEFlood.cpp:
+        (WebCore::FEFlood::platformApplySoftware): Force the color mode to be
+        sRGB before returning.
+
 2013-02-18  Mark Lam  <[email protected]>
 
         Introduced AbstractSQLStatement and AbstractSQLStatementBackend.

Modified: trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp (143266 => 143267)


--- trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp	2013-02-18 23:00:43 UTC (rev 143266)
+++ trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp	2013-02-18 23:07:00 UTC (rev 143267)
@@ -78,6 +78,9 @@
 
     Color color = colorWithOverrideAlpha(floodColor().rgb(), floodOpacity());
     resultImage->context()->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
+    // feFlood does not perform color interpolation of any kind, so the result is always in ColorSpaceDeviceRGB
+    // regardless of the value of color-interpolation-filters.
+    setResultColorSpace(ColorSpaceDeviceRGB);
 }
 
 void FEFlood::dump()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to