Changeset 168167 in webkit


Ignore:
Timestamp:
May 2, 2014 2:35:34 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Ion Rosca <Ion Rosca> on 2014-05-02
Reviewed by Dean Jackson.

Source/WebCore:
Removed support for non-separable background blend modes from the CSS parser.
Covered by existing tests.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseFillProperty):

LayoutTests:

  • css3/compositing/background-blend-mode-gif-color-2.html:
  • css3/compositing/background-blend-mode-gif-color.html:
  • css3/compositing/background-blend-mode-gradient-color.html:
  • css3/compositing/background-blend-mode-gradient-gradient.html:
  • css3/compositing/background-blend-mode-gradient-image.html:
  • css3/compositing/background-blend-mode-image-color.html:
  • css3/compositing/background-blend-mode-image-image.html:
  • css3/compositing/background-blend-mode-image-svg.html:
  • css3/compositing/background-blend-mode-multiple-background-layers.html:
  • css3/compositing/background-blend-mode-property-expected.txt:
  • css3/compositing/background-blend-mode-property-parsing-expected.txt:
  • css3/compositing/background-blend-mode-svg-color.html:
  • css3/compositing/effect-background-blend-mode-tiled.html:
  • css3/compositing/effect-background-blend-mode.html:
  • css3/compositing/script-tests/background-blend-mode-property-parsing.js:
  • css3/compositing/script-tests/background-blend-mode-property.js:
  • platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.txt:
  • platform/mac/css3/compositing/background-blend-mode-gif-color-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-gif-color-expected.txt:
  • platform/mac/css3/compositing/background-blend-mode-gradient-color-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-gradient-gradient-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-gradient-image-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-image-color-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-image-color-expected.txt:
  • platform/mac/css3/compositing/background-blend-mode-image-image-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-image-image-expected.txt:
  • platform/mac/css3/compositing/background-blend-mode-image-svg-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-multiple-background-layers-expected.png:
  • platform/mac/css3/compositing/background-blend-mode-svg-color-expected.png:
Location:
trunk
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168150 r168167  
     12014-05-02  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] Remove support for non-separable blend modes from background-blend-mode
     4        https://bugs.webkit.org/show_bug.cgi?id=132327
     5
     6        Reviewed by Dean Jackson.
     7
     8        * css3/compositing/background-blend-mode-gif-color-2.html:
     9        * css3/compositing/background-blend-mode-gif-color.html:
     10        * css3/compositing/background-blend-mode-gradient-color.html:
     11        * css3/compositing/background-blend-mode-gradient-gradient.html:
     12        * css3/compositing/background-blend-mode-gradient-image.html:
     13        * css3/compositing/background-blend-mode-image-color.html:
     14        * css3/compositing/background-blend-mode-image-image.html:
     15        * css3/compositing/background-blend-mode-image-svg.html:
     16        * css3/compositing/background-blend-mode-multiple-background-layers.html:
     17        * css3/compositing/background-blend-mode-property-expected.txt:
     18        * css3/compositing/background-blend-mode-property-parsing-expected.txt:
     19        * css3/compositing/background-blend-mode-svg-color.html:
     20        * css3/compositing/effect-background-blend-mode-tiled.html:
     21        * css3/compositing/effect-background-blend-mode.html:
     22        * css3/compositing/script-tests/background-blend-mode-property-parsing.js:
     23        * css3/compositing/script-tests/background-blend-mode-property.js:
     24        * platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.png:
     25        * platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.txt:
     26        * platform/mac/css3/compositing/background-blend-mode-gif-color-expected.png:
     27        * platform/mac/css3/compositing/background-blend-mode-gif-color-expected.txt:
     28        * platform/mac/css3/compositing/background-blend-mode-gradient-color-expected.png:
     29        * platform/mac/css3/compositing/background-blend-mode-gradient-gradient-expected.png:
     30        * platform/mac/css3/compositing/background-blend-mode-gradient-image-expected.png:
     31        * platform/mac/css3/compositing/background-blend-mode-image-color-expected.png:
     32        * platform/mac/css3/compositing/background-blend-mode-image-color-expected.txt:
     33        * platform/mac/css3/compositing/background-blend-mode-image-image-expected.png:
     34        * platform/mac/css3/compositing/background-blend-mode-image-image-expected.txt:
     35        * platform/mac/css3/compositing/background-blend-mode-image-svg-expected.png:
     36        * platform/mac/css3/compositing/background-blend-mode-multiple-background-layers-expected.png:
     37        * platform/mac/css3/compositing/background-blend-mode-svg-color-expected.png:
     38
    1392014-05-01  Alexey Proskuryakov  <ap@apple.com>
    240
  • trunk/LayoutTests/css3/compositing/background-blend-mode-gif-color-2.html

    r163633 r168167  
    3535    <div style="background-blend-mode: difference, normal"></div>
    3636    <div style="background-blend-mode: exclusion, normal"></div>
    37     <div style="background-blend-mode: hue, normal;"></div>
    38     <div style="background-blend-mode: saturation, normal"></div>
    39     <div style="background-blend-mode: color, normal"></div>
    40     <div style="background-blend-mode: luminosity, normal"></div>
    4137    <script type="text/javascript">
    4238        window.setTimeout("done()", 400);
  • trunk/LayoutTests/css3/compositing/background-blend-mode-gif-color.html

    r163633 r168167  
    2525    <div style="background-blend-mode: difference, normal"></div>
    2626    <div style="background-blend-mode: exclusion, normal"></div>
    27     <div style="background-blend-mode: hue, normal;"></div>
    28     <div style="background-blend-mode: saturation, normal"></div>
    29     <div style="background-blend-mode: color, normal"></div>
    30     <div style="background-blend-mode: luminosity, normal"></div>
    3127</body>
    3228</html>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-gradient-color.html

    r163633 r168167  
    3131        <li style="background-blend-mode: difference, normal"></li>
    3232        <li style="background-blend-mode: exclusion, normal"></li>
    33         <li style="background-blend-mode: hue, normal;"></li>
    34         <li style="background-blend-mode: saturation, normal"></li>
    35         <li style="background-blend-mode: color, normal"></li>
    36         <li style="background-blend-mode: luminosity, normal"></li>
    3733    </ul>
    3834</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-gradient-gradient.html

    r163633 r168167  
    3131        <li style="background-blend-mode: difference, normal"></li>
    3232        <li style="background-blend-mode: exclusion, normal"></li>
    33         <li style="background-blend-mode: hue, normal;"></li>
    34         <li style="background-blend-mode: saturation, normal"></li>
    35         <li style="background-blend-mode: color, normal"></li>
    36         <li style="background-blend-mode: luminosity, normal"></li>
    3733    </ul>
    3834</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-gradient-image.html

    r163633 r168167  
    3131        <li style="background-blend-mode: difference, normal"></li>
    3232        <li style="background-blend-mode: exclusion, normal"></li>
    33         <li style="background-blend-mode: hue, normal;"></li>
    34         <li style="background-blend-mode: saturation, normal"></li>
    35         <li style="background-blend-mode: color, normal"></li>
    36         <li style="background-blend-mode: luminosity, normal"></li>
    3733    </ul>
    3834</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-image-color.html

    r163633 r168167  
    2727        <li style="background-blend-mode: difference, normal"></li>
    2828        <li style="background-blend-mode: exclusion, normal"></li>
    29         <li style="background-blend-mode: hue, normal;"></li>
    30         <li style="background-blend-mode: saturation, normal"></li>
    31         <li style="background-blend-mode: color, normal"></li>
    32         <li style="background-blend-mode: luminosity, normal"></li>
    3329    </ul>
    3430</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-image-image.html

    r163633 r168167  
    2727        <li style="background-blend-mode: difference, normal"></li>
    2828        <li style="background-blend-mode: exclusion, normal"></li>
    29         <li style="background-blend-mode: hue, normal;"></li>
    30         <li style="background-blend-mode: saturation, normal"></li>
    31         <li style="background-blend-mode: color, normal"></li>
    32         <li style="background-blend-mode: luminosity, normal"></li>
    3329    </ul>
    3430</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-image-svg.html

    r163633 r168167  
    3131        <li style="background-blend-mode: difference, normal"></li>
    3232        <li style="background-blend-mode: exclusion, normal"></li>
    33         <li style="background-blend-mode: hue, normal;"></li>
    34         <li style="background-blend-mode: saturation, normal"></li>
    35         <li style="background-blend-mode: color, normal"></li>
    36         <li style="background-blend-mode: luminosity, normal"></li>
    3733    </ul>
    3834</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-multiple-background-layers.html

    r163633 r168167  
    1717<!-- This file should contain two divs with 3 background layers. Test background blend mode differences when only one layer blends differently. -->
    1818<body>
    19     <div style="background-blend-mode: hue, difference, normal;"></div>
     19    <div style="background-blend-mode: multiply, difference, normal;"></div>
    2020    <div style="background-blend-mode: difference, difference, normal;"></div>
    2121</body>
  • trunk/LayoutTests/css3/compositing/background-blend-mode-property-expected.txt

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

    r163633 r168167  
    2121PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
    2222
    23 Basic reference : screen, hue
     23Basic reference : screen, multiply
    2424PASS cssRule.type is 1
    2525PASS declaration.length is 1
    26 PASS declaration.getPropertyValue('background-blend-mode') is 'screen, hue'
     26PASS declaration.getPropertyValue('background-blend-mode') is 'screen, multiply'
    2727PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
    2828PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
     
    3737PASS jsWrapperClass(blendModeRule.constructor) is 'CSSValueListConstructor'
    3838
    39 Basic reference : darken, lighten, normal, luminosity
     39Basic reference : darken, lighten, normal, multiply
    4040PASS cssRule.type is 1
    4141PASS declaration.length is 1
    42 PASS declaration.getPropertyValue('background-blend-mode') is 'darken, lighten, normal, luminosity'
     42PASS declaration.getPropertyValue('background-blend-mode') is 'darken, lighten, normal, multiply'
    4343PASS jsWrapperClass(blendModeRule) is 'CSSValueList'
    4444PASS jsWrapperClass(blendModeRule.__proto__) is 'CSSValueListPrototype'
     
    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('background-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('background-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('background-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('background-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/background-blend-mode-svg-color.html

    r163633 r168167  
    3131        <div style="background-blend-mode: difference, normal"></div>
    3232        <div style="background-blend-mode: exclusion, normal"></div>
    33         <div style="background-blend-mode: hue, normal;"></div>
    34         <div style="background-blend-mode: saturation, normal"></div>
    35         <div style="background-blend-mode: color, normal"></div>
    36         <div style="background-blend-mode: luminosity, normal"></div>
    3733</body>
    3834</html>
  • trunk/LayoutTests/css3/compositing/effect-background-blend-mode-tiled.html

    r163633 r168167  
    3131<li style="background-blend-mode: difference, normal"></li>
    3232<li style="background-blend-mode: exclusion, normal"></li>
    33 <li style="background-blend-mode: hue, normal;"></li>
    34 <li style="background-blend-mode: saturation, normal"></li>
    35 <li style="background-blend-mode: color, normal"></li>
    36 <li style="background-blend-mode: luminosity, normal"></li>
    3733</ul>
    3834</body>
  • trunk/LayoutTests/css3/compositing/effect-background-blend-mode.html

    r163633 r168167  
    3434<li style="background-blend-mode: difference, normal"></li>
    3535<li style="background-blend-mode: exclusion, normal"></li>
    36 <li style="background-blend-mode: hue, normal;"></li>
    37 <li style="background-blend-mode: saturation, normal"></li>
    38 <li style="background-blend-mode: color, normal"></li>
    39 <li style="background-blend-mode: luminosity, normal"></li>
    4036</ul>
    4137</body>
  • trunk/LayoutTests/css3/compositing/script-tests/background-blend-mode-property-parsing.js

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

    r163633 r168167  
    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/background-blend-mode-gif-color-2-expected.txt

    r155097 r168167  
    1515      RenderBlock (floating) {DIV} at (565,145) size 130x130 [bgcolor=#008000]
    1616      RenderBlock (floating) {DIV} at (5,285) size 130x130 [bgcolor=#008000]
    17       RenderBlock (floating) {DIV} at (145,285) size 130x130 [bgcolor=#008000]
    18       RenderBlock (floating) {DIV} at (285,285) size 130x130 [bgcolor=#008000]
    19       RenderBlock (floating) {DIV} at (425,285) size 130x130 [bgcolor=#008000]
    20       RenderBlock (floating) {DIV} at (565,285) size 130x130 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/css3/compositing/background-blend-mode-gif-color-expected.txt

    r155097 r168167  
    1515      RenderBlock (floating) {DIV} at (565,145) size 130x130 [bgcolor=#008000]
    1616      RenderBlock (floating) {DIV} at (5,285) size 130x130 [bgcolor=#008000]
    17       RenderBlock (floating) {DIV} at (145,285) size 130x130 [bgcolor=#008000]
    18       RenderBlock (floating) {DIV} at (285,285) size 130x130 [bgcolor=#008000]
    19       RenderBlock (floating) {DIV} at (425,285) size 130x130 [bgcolor=#008000]
    20       RenderBlock (floating) {DIV} at (565,285) size 130x130 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/css3/compositing/background-blend-mode-image-color-expected.txt

    r151567 r168167  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x576
    4   RenderBlock {HTML} at (0,0) size 800x576
     3layer at (0,0) size 800x436
     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 [bgcolor=#008000]
    1818        RenderBlock (floating) {LI} at (185,285) size 130x130 [bgcolor=#008000]
    19         RenderBlock (floating) {LI} at (325,285) size 130x130 [bgcolor=#008000]
    20         RenderBlock (floating) {LI} at (465,285) size 130x130 [bgcolor=#008000]
    21         RenderBlock (floating) {LI} at (605,285) size 130x130 [bgcolor=#008000]
    22         RenderBlock (floating) {LI} at (45,425) size 130x130 [bgcolor=#008000]
  • trunk/LayoutTests/platform/mac/css3/compositing/background-blend-mode-image-image-expected.txt

    r151567 r168167  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x576
    4   RenderBlock {HTML} at (0,0) size 800x576
     3layer at (0,0) size 800x436
     4  RenderBlock {HTML} at (0,0) size 800x436
    55    RenderBody {BODY} at (8,16) size 784x0
    66      RenderBlock {UL} at (0,0) size 784x0
     
    1616        RenderBlock (floating) {LI} at (45,285) size 130x130
    1717        RenderBlock (floating) {LI} at (185,285) size 130x130
    18         RenderBlock (floating) {LI} at (325,285) size 130x130
    19         RenderBlock (floating) {LI} at (465,285) size 130x130
    20         RenderBlock (floating) {LI} at (605,285) size 130x130
    21         RenderBlock (floating) {LI} at (45,425) size 130x130
    2218layer at (473,21) size 130x130
    2319  RenderBlock (floating) {LI} at (465,5) size 130x130
  • trunk/Source/WebCore/ChangeLog

    r168166 r168167  
     12014-05-02  Ion Rosca  <rosca@adobe.com>
     2
     3        [CSS Blending] Remove support for non-separable blend modes from background-blend-mode
     4        https://bugs.webkit.org/show_bug.cgi?id=132327
     5
     6        Reviewed by Dean Jackson.
     7
     8        Removed support for non-separable background blend modes from the CSS parser.
     9        Covered by existing tests.
     10
     11        * css/CSSParser.cpp:
     12        (WebCore::CSSParser::parseFillProperty):
     13
    1142014-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    215
  • trunk/Source/WebCore/css/CSSParser.cpp

    r168108 r168167  
    43084308                        || val->id == CSSValueLighten ||  val->id == CSSValueColorDodge || val->id == CSSValueColorBurn
    43094309                        || val->id == CSSValueHardLight || val->id == CSSValueSoftLight || val->id == CSSValueDifference
    4310                         || val->id == CSSValueExclusion || val->id == CSSValueHue || val->id == CSSValueSaturation
    4311                         || val->id == CSSValueColor || val->id == CSSValueLuminosity)) {
     4310                        || val->id == CSSValueExclusion)) {
    43124311                        currValue = cssValuePool().createIdentifierValue(val->id);
    43134312                        m_valueList->next();
Note: See TracChangeset for help on using the changeset viewer.