Changeset 167620 in webkit


Ignore:
Timestamp:
Apr 21, 2014 1:44:01 PM (10 years ago)
Author:
cabanier@adobe.com
Message:

[CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
https://bugs.webkit.org/show_bug.cgi?id=131824

Reviewed by Dean Jackson.

Source/WebCore:
Removed support for non-separable blend modes from the CSS parser.

Covered by existing tests

  • css/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):

  • platform/graphics/ca/mac/PlatformCAFiltersMac.mm:

(PlatformCAFilters::setBlendingFiltersOnLayer):

LayoutTests:
Removed or updated tests that used non-separable blend modes in combination
with mix-blend-mode.

  • css3/compositing/blend-mode-property-expected.txt:
  • css3/compositing/blend-mode-property-parsing-expected.txt:
  • css3/compositing/blend-mode-simple-composited.html:
  • css3/compositing/blend-mode-simple.html:
  • css3/compositing/script-tests/blend-mode-property-parsing.js:
  • css3/compositing/script-tests/blend-mode-property.js:
  • css3/compositing/svg-blend-color.html: Removed.
  • css3/compositing/svg-blend-hue.html: Removed.
  • css3/compositing/svg-blend-luminosity.html: Removed.
  • css3/compositing/svg-blend-saturation.html: Removed.
  • platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt:
  • platform/mac/css3/compositing/blend-mode-simple-expected.txt:
Location:
trunk
Files:
4 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r167619 r167620  
     12014-04-21  Rik Cabanier  <cabanier@adobe.com>
     2
     3        [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
     4        https://bugs.webkit.org/show_bug.cgi?id=131824
     5
     6        Reviewed by Dean Jackson.
     7
     8        Removed or updated tests that used non-separable blend modes in combination
     9        with mix-blend-mode.
     10
     11        * css3/compositing/blend-mode-property-expected.txt:
     12        * css3/compositing/blend-mode-property-parsing-expected.txt:
     13        * css3/compositing/blend-mode-simple-composited.html:
     14        * css3/compositing/blend-mode-simple.html:
     15        * css3/compositing/script-tests/blend-mode-property-parsing.js:
     16        * css3/compositing/script-tests/blend-mode-property.js:
     17        * css3/compositing/svg-blend-color.html: Removed.
     18        * css3/compositing/svg-blend-hue.html: Removed.
     19        * css3/compositing/svg-blend-luminosity.html: Removed.
     20        * css3/compositing/svg-blend-saturation.html: Removed.
     21        * platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt:
     22        * platform/mac/css3/compositing/blend-mode-simple-expected.txt:
     23
    1242014-04-21  David Hyatt  <hyatt@apple.com>
    225
  • trunk/LayoutTests/css3/compositing/blend-mode-property-expected.txt

    r167448 r167620  
    4040PASS declaration.length is 1
    4141PASS declaration.getPropertyValue('mix-blend-mode') is 'exclusion'
    42 PASS cssRule.type is 1
    43 PASS declaration.length is 1
    44 PASS declaration.getPropertyValue('mix-blend-mode') is 'hue'
    45 PASS cssRule.type is 1
    46 PASS declaration.length is 1
    47 PASS declaration.getPropertyValue('mix-blend-mode') is 'saturation'
    48 PASS cssRule.type is 1
    49 PASS declaration.length is 1
    50 PASS declaration.getPropertyValue('mix-blend-mode') is 'color'
    51 PASS cssRule.type is 1
    52 PASS declaration.length is 1
    53 PASS declaration.getPropertyValue('mix-blend-mode') is 'luminosity'
    5442PASS successfullyParsed is true
    5543
  • trunk/LayoutTests/css3/compositing/blend-mode-property-parsing-expected.txt

    r167448 r167620  
    100100PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
    101101PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
    102 
    103 Basic reference : hue
    104 PASS cssRule.type is 1
    105 PASS declaration.length is 1
    106 PASS declaration.getPropertyValue('mix-blend-mode') is 'hue'
    107 PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
    108 PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
    109 PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
    110 
    111 Basic reference : saturation
    112 PASS cssRule.type is 1
    113 PASS declaration.length is 1
    114 PASS declaration.getPropertyValue('mix-blend-mode') is 'saturation'
    115 PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
    116 PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
    117 PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
    118 
    119 Basic reference : color
    120 PASS cssRule.type is 1
    121 PASS declaration.length is 1
    122 PASS declaration.getPropertyValue('mix-blend-mode') is 'color'
    123 PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
    124 PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
    125 PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
    126 
    127 Basic reference : luminosity
    128 PASS cssRule.type is 1
    129 PASS declaration.length is 1
    130 PASS declaration.getPropertyValue('mix-blend-mode') is 'luminosity'
    131 PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
    132 PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSPrimitiveValuePrototype'
    133 PASS jsWrapperClass(blendModeRule.constructor) is 'CSSPrimitiveValueConstructor'
    134102PASS successfullyParsed is true
    135103
  • trunk/LayoutTests/css3/compositing/blend-mode-simple-composited.html

    r167448 r167620  
    4040        <li><img style="mix-blend-mode: difference" src="resources/ducky.png"></li>
    4141        <li><img style="mix-blend-mode: exclusion" src="resources/ducky.png"></li>
    42         <!-- Non separable blend modes -->
    43         <li><img style="mix-blend-mode: hue" src="resources/ducky.png"></li>
    44         <li><img style="mix-blend-mode: saturation" src="resources/ducky.png"></li>
    45         <li><img style="mix-blend-mode: color" src="resources/ducky.png"></li>
    46         <li><img style="mix-blend-mode: luminosity" src="resources/ducky.png"></li>
    4742    </ul>
    4843</body>
  • trunk/LayoutTests/css3/compositing/blend-mode-simple.html

    r167539 r167620  
    3939        <li><img style="mix-blend-mode: difference" src="resources/ducky.png"></li>
    4040        <li><img style="mix-blend-mode: exclusion" src="resources/ducky.png"></li>
    41         <!-- Non separable blend modes -->
    42         <li><img style="mix-blend-mode: hue" src="resources/ducky.png"></li>
    43         <li><img style="mix-blend-mode: saturation" src="resources/ducky.png"></li>
    44         <li><img style="mix-blend-mode: color" src="resources/ducky.png"></li>
    45         <li><img style="mix-blend-mode: luminosity" src="resources/ducky.png"></li>
    4641    </ul>
    4742</body>
  • trunk/LayoutTests/css3/compositing/script-tests/blend-mode-property-parsing.js

    r167448 r167620  
    4444}
    4545
    46 var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
     46var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion"];
    4747
    4848for(x in blendmodes)
  • trunk/LayoutTests/css3/compositing/script-tests/blend-mode-property.js

    r167448 r167620  
    2121}
    2222
    23 var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
     23var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion"];
    2424
    2525for(x in blendmodes)
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt

    r167424 r167620  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x576 isolatesBlending
    4   RenderBlock {HTML} at (0,0) size 800x576
     3layer at (0,0) size 800x436 isolatesBlending
     4  RenderBlock {HTML} at (0,0) size 800x436
    55    RenderBody {BODY} at (8,16) size 784x0
    66      RenderBlock {UL} at (0,0) size 784x0
     
    1717        RenderBlock (floating) {LI} at (45,285) size 130x130
    1818        RenderBlock (floating) {LI} at (185,285) size 130x130
    19         RenderBlock (floating) {LI} at (325,285) size 130x130
    20         RenderBlock (floating) {LI} at (465,285) size 130x130
    21         RenderBlock (floating) {LI} at (605,285) size 130x130
    22         RenderBlock (floating) {LI} at (45,425) size 130x130
    2319layer at (53,21) size 130x130
    2420  RenderImage {IMG} at (0,0) size 130x130
     
    4541layer at (193,301) size 130x130 blendMode: exclusion
    4642  RenderImage {IMG} at (0,0) size 130x130
    47 layer at (333,301) size 130x130 blendMode: hue
    48   RenderImage {IMG} at (0,0) size 130x130
    49 layer at (473,301) size 130x130 blendMode: saturation
    50   RenderImage {IMG} at (0,0) size 130x130
    51 layer at (613,301) size 130x130 blendMode: color
    52   RenderImage {IMG} at (0,0) size 130x130
    53 layer at (53,441) size 130x130 blendMode: luminosity
    54   RenderImage {IMG} at (0,0) size 130x130
  • trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-expected.txt

    r167424 r167620  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x576 isolatesBlending
    4   RenderBlock {HTML} at (0,0) size 800x576
     3layer at (0,0) size 800x436 isolatesBlending
     4  RenderBlock {HTML} at (0,0) size 800x436
    55    RenderBody {BODY} at (8,16) size 784x0
    66      RenderBlock {UL} at (0,0) size 784x0
     
    1818        RenderBlock (floating) {LI} at (45,285) size 130x130
    1919        RenderBlock (floating) {LI} at (185,285) size 130x130
    20         RenderBlock (floating) {LI} at (325,285) size 130x130
    21         RenderBlock (floating) {LI} at (465,285) size 130x130
    22         RenderBlock (floating) {LI} at (605,285) size 130x130
    23         RenderBlock (floating) {LI} at (45,425) size 130x130
    2420layer at (193,21) size 130x130 blendMode: overlay
    2521  RenderImage {IMG} at (0,0) size 130x130
     
    4440layer at (193,301) size 130x130 blendMode: exclusion
    4541  RenderImage {IMG} at (0,0) size 130x130
    46 layer at (333,301) size 130x130 blendMode: hue
    47   RenderImage {IMG} at (0,0) size 130x130
    48 layer at (473,301) size 130x130 blendMode: saturation
    49   RenderImage {IMG} at (0,0) size 130x130
    50 layer at (613,301) size 130x130 blendMode: color
    51   RenderImage {IMG} at (0,0) size 130x130
    52 layer at (53,441) size 130x130 blendMode: luminosity
    53   RenderImage {IMG} at (0,0) size 130x130
  • trunk/Source/WebCore/ChangeLog

    r167617 r167620  
     12014-04-21  Rik Cabanier  <cabanier@adobe.com>
     2
     3        [CSS Blending] Remove support for non-separable blend modes from mix-blend-mode
     4        https://bugs.webkit.org/show_bug.cgi?id=131824
     5
     6        Reviewed by Dean Jackson.
     7
     8        Removed support for non-separable blend modes from the CSS parser.
     9
     10        Covered by existing tests
     11
     12        * css/CSSParser.cpp:
     13        (WebCore::isValidKeywordPropertyAndValue):
     14        * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
     15        (PlatformCAFilters::setBlendingFiltersOnLayer):
     16
    1172014-04-21  David Hyatt  <hyatt@apple.com>
    218
  • trunk/Source/WebCore/css/CSSParser.cpp

    r167448 r167620  
    817817            || valueID == CSSValueOverlay || valueID == CSSValueDarken || valueID == CSSValueLighten ||  valueID == CSSValueColorDodge
    818818            || valueID == CSSValueColorBurn || valueID == CSSValueHardLight || valueID == CSSValueSoftLight || valueID == CSSValueDifference
    819             || valueID == CSSValueExclusion || valueID == CSSValueHue || valueID == CSSValueSaturation || valueID == CSSValueColor
    820             || valueID == CSSValueLuminosity))
     819            || valueID == CSSValueExclusion))
    821820            return true;
    822821        break;
  • trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm

    r167553 r167620  
    582582            filter = [CAFilter filterWithType:kCAFilterScreenBlendMode];
    583583            break;
    584         case BlendModeHue:
    585         case BlendModeSaturation:
    586         case BlendModeColor:
    587         case BlendModeLuminosity:
    588             // Non-separable blend modes are not supported.
    589             break;
     584        default:
     585            ASSERT_NOT_REACHED();
    590586    }
    591587
Note: See TracChangeset for help on using the changeset viewer.