Changeset 143267 in webkit


Ignore:
Timestamp:
Feb 18, 2013 3:07:00 PM (11 years ago)
Author:
schenney@chromium.org
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.
Location:
trunk
Files:
2 added
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143266 r143267  
     12013-02-18  Stephen Chenney  <schenney@chromium.org>
     2
     3        feFlood incorrectly applied color-interpolation-filters
     4        https://bugs.webkit.org/show_bug.cgi?id=109985
     5
     6        Reviewed by Dirk Schulze.
     7
     8        New test for feFlood behavior when color-interpolation-filters is used.
     9
     10        Failing expectations for tests affected by this change.
     11
     12        * platform/chromium/TestExpectations:
     13        * platform/mac/TestExpectations:
     14        * platform/win/TestExpectations:
     15        * svg/filters/feFlood-color-interpolation-expected.svg: Added.
     16        * svg/filters/feFlood-color-interpolation.svg: Added.
     17
    1182013-02-18  David Hyatt  <hyatt@apple.com>
    219
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r143266 r143267  
    43884388webkit.org/b/9221 [ Mac ] fast/css/resize-corner-tracking-transformed.html [ Failure ]
    43894389
     4390# Needs rebaseline after https://webkit.org/b/109985
     4391webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
     4392webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
     4393webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
     4394webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
     4395webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
     4396webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
     4397webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
     4398webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
     4399webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
     4400webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     4401webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
     4402webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
     4403webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
     4404webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
     4405webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
     4406webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
     4407webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
     4408webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
     4409webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
     4410webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
     4411webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
     4412webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
     4413webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     4414webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
     4415webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
     4416webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
     4417webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
     4418webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
     4419webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
     4420webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
     4421webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
     4422
    43904423# The test is flaky on chromium-ews
    43914424webkit.org/b/107953 inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html [ Pass Failure ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r143256 r143267  
    14141414webkit.org/b/108257 [ Debug ] compositing/overflow/automatically-opt-into-composited-scrolling.html [ Crash ]
    14151415
     1416# Needs rebaseline after https://webkit.org/b/109985
     1417webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
     1418webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
     1419webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
     1420webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
     1421webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
     1422webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
     1423webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
     1424webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
     1425webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
     1426webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     1427webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
     1428webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
     1429webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
     1430webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
     1431webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
     1432webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
     1433webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
     1434webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
     1435webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
     1436webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
     1437webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
     1438webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
     1439webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     1440webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
     1441webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
     1442webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
     1443webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
     1444webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
     1445webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
     1446webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
     1447webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
     1448
    14161449
    14171450# Rebaseline required after https://webkit.org/b/95772
  • trunk/LayoutTests/platform/win/TestExpectations

    r143000 r143267  
    26312631webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    26322632
     2633# Needs rebaseline after https://webkit.org/b/109985
     2634webkit.org/b/109985 svg/W3C-SVG-1.1/filters-offset-01-b.svg [ ImageOnlyFailure ]
     2635webkit.org/b/109985 svg/custom/visibility-override-filter.svg [ ImageOnlyFailure ]
     2636webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in-attr.html [ ImageOnlyFailure ]
     2637webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-in2-attr.html [ ImageOnlyFailure ]
     2638webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k1-attr.html [ ImageOnlyFailure ]
     2639webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k2-attr.html [ ImageOnlyFailure ]
     2640webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k3-attr.html [ ImageOnlyFailure ]
     2641webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-k4-attr.html [ ImageOnlyFailure ]
     2642webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-dom-operator-attr.html [ ImageOnlyFailure ]
     2643webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     2644webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-in2-prop.html [ ImageOnlyFailure ]
     2645webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k1-prop.html [ ImageOnlyFailure ]
     2646webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k2-prop.html [ ImageOnlyFailure ]
     2647webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k3-prop.html [ ImageOnlyFailure ]
     2648webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-k4-prop.html [ ImageOnlyFailure ]
     2649webkit.org/b/109985 svg/dynamic-updates/SVGFECompositeElement-svgdom-operator-prop.html [ ImageOnlyFailure ]
     2650webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-color-attr.html [ ImageOnlyFailure ]
     2651webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-dom-flood-opacity-attr.html [ ImageOnlyFailure ]
     2652webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html [ ImageOnlyFailure ]
     2653webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-color-prop.html [ ImageOnlyFailure ]
     2654webkit.org/b/109985 svg/dynamic-updates/SVGFEFloodElement-svgdom-flood-opacity-prop.html [ ImageOnlyFailure ]
     2655webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-dom-in-attr.html [ ImageOnlyFailure ]
     2656webkit.org/b/109985 svg/dynamic-updates/SVGFETileElement-svgdom-in-prop.html [ ImageOnlyFailure ]
     2657webkit.org/b/109985 svg/filters/big-sized-filter-2.svg [ ImageOnlyFailure ]
     2658webkit.org/b/109985 svg/filters/feImage-reference-svg-primitive.svg [ ImageOnlyFailure ]
     2659webkit.org/b/109985 svg/filters/filter-on-tspan.svg [ ImageOnlyFailure ]
     2660webkit.org/b/109985 svg/filters/filterRes1.svg [ ImageOnlyFailure ]
     2661webkit.org/b/109985 svg/filters/filterRes3.svg [ ImageOnlyFailure ]
     2662webkit.org/b/109985 svg/filters/parent-children-with-same-filter.svg [ ImageOnlyFailure ]
     2663webkit.org/b/109985 svg/filters/shadow-on-filter.svg [ ImageOnlyFailure ]
     2664webkit.org/b/109985 svg/filters/shadow-on-rect-with-filter.svg [ ImageOnlyFailure ]
     2665
    26332666# Need rebaseline after https://bugs.webkit.org/show_bug.cgi?id=109775
    26342667webkit.org/b/109775 media/audio-controls-rendering.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r143264 r143267  
     12013-02-18  Stephen Chenney  <schenney@chromium.org>
     2
     3        feFlood incorrectly applied color-interpolation-filters
     4        https://bugs.webkit.org/show_bug.cgi?id=109985
     5
     6        Reviewed by Dirk Schulze.
     7
     8        The SVG spec defines the color-interpolation-filters property for all
     9        filter effect elements in order to control cases where a color is
     10        based on some arithmetic computation on other colors. For example,
     11        when computing gradients or blending colors. feFlood simply fills a
     12        region with the given color, and that given color is always defined to
     13        be in sRGB space, so the feFlood result should always be sRGB.
     14
     15        The new behavior matches both Opera and Firefox.
     16
     17        Tests: svg/filters/feFlood-color-interpolation-expected.svg
     18               svg/filters/feFlood-color-interpolation.svg
     19
     20        * platform/graphics/filters/FEFlood.cpp:
     21        (WebCore::FEFlood::platformApplySoftware): Force the color mode to be
     22        sRGB before returning.
     23
    1242013-02-18  Mark Lam  <mark.lam@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp

    r97853 r143267  
    7979    Color color = colorWithOverrideAlpha(floodColor().rgb(), floodOpacity());
    8080    resultImage->context()->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
     81    // feFlood does not perform color interpolation of any kind, so the result is always in ColorSpaceDeviceRGB
     82    // regardless of the value of color-interpolation-filters.
     83    setResultColorSpace(ColorSpaceDeviceRGB);
    8184}
    8285
Note: See TracChangeset for help on using the changeset viewer.