Source/WebCore/ChangeLog

 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-sep 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 Zan Dobersek <zdobersek@igalia.com>
218
319 Move cross-port Source/WebCore/page/ code to std::unique_ptr
167594

Source/WebCore/css/CSSParser.cpp

@@static inline bool isValidKeywordPropert
816816 if (parserContext.isCSSCompositingEnabled && (valueID == CSSValueNormal || valueID == CSSValueMultiply || valueID == CSSValueScreen
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;
823822 case CSSPropertyIsolation:
167527

Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm

@@void PlatformCAFilters::setBlendingFilte
584584 case BlendModeScreen:
585585 filter = [CAFilter filterWithType:kCAFilterScreenBlendMode];
586586 break;
587  case BlendModeHue:
588  case BlendModeSaturation:
589  case BlendModeColor:
590  case BlendModeLuminosity:
591  // Non-separable blend modes are not supported.
592  break;
 587 default:
 588 ASSERT_NOT_REACHED();
593589 }
594590
595591 [layer setCompositingFilter:filter];
167527

LayoutTests/ChangeLog

 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 Alexey Proskuryakov <ap@apple.com>
225
326 REGRESSION (r167530): ASSERT(m_selfTime <= m_totalTime) on tests that run after certain Inspector tests
167594

LayoutTests/css3/compositing/blend-mode-property-expected.txt

@@PASS declaration.getPropertyValue('mix-b
3939PASS cssRule.type is 1
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
5644TEST COMPLETE
167527

LayoutTests/css3/compositing/blend-mode-property-parsing-expected.txt

@@PASS declaration.getPropertyValue('mix-b
9999PASS jsWrapperClass(blendModeRule) is 'CSSPrimitiveValue'
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
136104TEST COMPLETE
167527

LayoutTests/css3/compositing/blend-mode-simple-composited.html

3939 <li><img style="mix-blend-mode: soft-light" src="resources/ducky.png"></li>
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>
167527

LayoutTests/css3/compositing/blend-mode-simple.html

3838 <li><img style="mix-blend-mode: soft-light" src="resources/ducky.png"></li>
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>
167527

LayoutTests/css3/compositing/svg-blend-color.html

1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
5 <defs>
6  <g id="patch">
7  <rect x="0" y="0" width="10" height="40" fill="rgb(255,0,0)"/>
8  <rect x="10" y="0" width="10" height="40" fill="rgb(0,255,0)"/>
9  <rect x="20" y="0" width="10" height="40" fill="rgb(0,0,255)"/>
10  <rect x="30" y="0" width="10" height="40" fill="rgb(127,127,0)"/>
11  </g>
12  <rect x="0" y="0" width="10" height="10" fill="rgb(255,0,0)"/>
13 </defs>
14 <g transform="scale(4 4)">
15  <use xlink:href="#patch" x="0" y="0" width="40" height="10"></use>
16  <use xlink:href="#patch" x="0" y="0" width="40" height="10" transform="rotate(90 20 20)" style="mix-blend-mode: color"></use>
17 </g>
18 </svg>
19 </body>
20 </html>
167527

LayoutTests/css3/compositing/svg-blend-hue.html

1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
5 <defs>
6  <g id="patch">
7  <rect x="0" y="0" width="10" height="40" fill="rgb(255,0,0)"/>
8  <rect x="10" y="0" width="10" height="40" fill="rgb(0,255,0)"/>
9  <rect x="20" y="0" width="10" height="40" fill="rgb(0,0,255)"/>
10  <rect x="30" y="0" width="10" height="40" fill="rgb(127,127,0)"/>
11  </g>
12  <rect x="0" y="0" width="10" height="10" fill="rgb(255,0,0)"/>
13 </defs>
14 <g transform="scale(4 4)">
15  <use xlink:href="#patch" x="0" y="0" width="40" height="10"></use>
16  <use xlink:href="#patch" x="0" y="0" width="40" height="10" transform="rotate(90 20 20)" style="mix-blend-mode: hue"></use>
17 </g>
18 </svg>
19 </body>
20 </html>
167527

LayoutTests/css3/compositing/svg-blend-luminosity.html

1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
5 <defs>
6  <g id="patch">
7  <rect x="0" y="0" width="10" height="40" fill="rgb(255,0,0)"/>
8  <rect x="10" y="0" width="10" height="40" fill="rgb(0,255,0)"/>
9  <rect x="20" y="0" width="10" height="40" fill="rgb(0,0,255)"/>
10  <rect x="30" y="0" width="10" height="40" fill="rgb(127,127,0)"/>
11  </g>
12  <rect x="0" y="0" width="10" height="10" fill="rgb(255,0,0)"/>
13 </defs>
14 <g transform="scale(4 4)">
15  <use xlink:href="#patch" x="0" y="0" width="40" height="10"></use>
16  <use xlink:href="#patch" x="0" y="0" width="40" height="10" transform="rotate(90 20 20)" style="mix-blend-mode: luminosity"></use>
17 </g>
18 </svg>
19 </body>
20 </html>
167527

LayoutTests/css3/compositing/svg-blend-saturation.html

1 <!DOCTYPE HTML>
2 <html>
3 <body>
4 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
5 <defs>
6  <g id="patch">
7  <rect x="0" y="0" width="10" height="40" fill="rgb(255,0,0)"/>
8  <rect x="10" y="0" width="10" height="40" fill="rgb(0,255,0)"/>
9  <rect x="20" y="0" width="10" height="40" fill="rgb(0,0,255)"/>
10  <rect x="30" y="0" width="10" height="40" fill="rgb(127,127,0)"/>
11  </g>
12  <rect x="0" y="0" width="10" height="10" fill="rgb(255,0,0)"/>
13 </defs>
14 <g transform="scale(4 4)">
15  <use xlink:href="#patch" x="0" y="0" width="40" height="10"></use>
16  <use xlink:href="#patch" x="0" y="0" width="40" height="10" transform="rotate(90 20 20)" style="mix-blend-mode: saturation"></use>
17 </g>
18 </svg>
19 </body>
20 </html>
167527

LayoutTests/css3/compositing/script-tests/blend-mode-property-parsing.js

@@function testBlendModeRule(description,
4343 shouldBeType("blendModeRule", "CSSPrimitiveValue");
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)
4949 testBlendModeRule("Basic reference", blendmodes[x], 1, blendmodes[x]);
167527

LayoutTests/css3/compositing/script-tests/blend-mode-property.js

@@shouldBe("declaration.length", "1");
2020shouldBe("declaration.getPropertyValue('mix-blend-mode')", "\'" + blendmode + "\'");
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)
2626 testblendmode(blendmodes[x]);
167527

LayoutTests/platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt

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
77 RenderBlock (floating) {LI} at (45,5) size 130x130

@@layer at (0,0) size 800x576 isolatesBlen
1616 RenderBlock (floating) {LI} at (605,145) size 130x130
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
2521layer at (193,21) size 130x130 blendMode: overlay

@@layer at (53,301) size 130x130 blendMode
4440 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
167527

LayoutTests/platform/mac/css3/compositing/blend-mode-simple-expected.txt

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
77 RenderBlock (floating) {LI} at (45,5) size 130x130

@@layer at (0,0) size 800x576 isolatesBlen
1717 RenderBlock (floating) {LI} at (605,145) size 130x130
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
2622layer at (333,21) size 130x130 blendMode: screen

@@layer at (53,301) size 130x130 blendMode
4339 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
167527