Changeset 127615 in webkit
- Timestamp:
- Sep 5, 2012 11:26:57 AM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r127612 r127615 1 2012-09-05 Max Vujovic <mvujovic@adobe.com> 2 3 [CSS Shaders] Update custom filter tests to use the new security model 4 https://bugs.webkit.org/show_bug.cgi?id=95760 5 6 Reviewed by Dirk Schulze. 7 8 This patch updates the custom filter tests to not sample u_texture and not write 9 to gl_FragColor. Now, the tests use the new security model by writing to 10 css_MixColor and indirectly blending with the DOM element texture. 11 12 This patch prepares us to remove direct DOM texture access via "u_texture": 13 https://bugs.webkit.org/show_bug.cgi?id=93871 14 15 * css3/filters/custom/custom-filter-css-keyword-as-parameter-name-expected.png: 16 * css3/filters/custom/custom-filter-shader-cache-expected.png: 17 * css3/filters/custom/custom-filter-shader-cache.html: 18 Use the CSS mix function with the updated color-offset.fs. 19 * css3/filters/custom/effect-color-check-expected.png: 20 * css3/filters/custom/effect-color-check.html: 21 Use the CSS mix function with the updated color-fill.fs. 22 * css3/filters/custom/effect-custom-combined-missing-expected.png: 23 * css3/filters/custom/effect-custom-combined-missing.html: 24 Use the CSS mix function with the updated color-offset.fs. 25 * css3/filters/custom/effect-custom-expected.png: 26 * css3/filters/custom/effect-custom-parameters-expected.png: 27 * css3/filters/custom/effect-custom-parameters.html: 28 Use the mix-color.fs shader instead of color-offset-parameters.fs. 29 * css3/filters/custom/effect-custom.html: 30 Use the CSS mix function with the updated color-offset.fs. 31 * css3/filters/custom/filter-repaint-custom-clipped-expected.png: 32 * css3/filters/custom/filter-repaint-custom-clipped.html: 33 Use the mix-color.fs shader instead of color-add.fs. 34 * css3/filters/custom/filter-repaint-custom-expected.png: 35 * css3/filters/custom/filter-repaint-custom-rotated-expected.png: 36 * css3/filters/custom/filter-repaint-custom-rotated.html: 37 Use the mix-color.fs shader instead of color-add.fs. Fix a small typo in a comment. 38 * css3/filters/custom/filter-repaint-custom.html: 39 Use the mix-color.fs shader instead of color-add.fs. 40 * css3/filters/custom/invalid-custom-filter-shader.html: 41 Use the CSS mix function with the updated color-offset.fs. 42 * css3/filters/custom/missing-custom-filter-shader-expected.png: 43 * css3/filters/custom/missing-custom-filter-shader.html: 44 Use the CSS mix function with the updated color-offset.fs. 45 * css3/filters/resources/color-add.fs: 46 Removed. The mix-color.fs shader can perform this shader's function. 47 * css3/filters/resources/color-fill.fs: 48 Rewrote this shader to write to css_MixColor instead of sampling u_texture and writing 49 to gl_FragColor. 50 * css3/filters/resources/color-offset-parameters.fs: 51 Removed. The mix-color.fs shader can perform this shader's function. 52 * css3/filters/resources/color-offset.fs: 53 Rewrote this shader to write to css_MixColor instead of sampling u_texture and writing 54 to gl_FragColor. 55 * platform/chromium-mac/css3/filters/custom/custom-filter-shader-cache-expected.png: 56 * platform/chromium-mac/css3/filters/custom/effect-color-check-expected.png: 57 * platform/chromium-mac/css3/filters/custom/effect-custom-combined-missing-expected.png: 58 * platform/chromium-mac/css3/filters/custom/effect-custom-expected.png: 59 * platform/chromium-mac/css3/filters/custom/effect-custom-parameters-expected.png: 60 * platform/chromium-mac/css3/filters/custom/filter-repaint-custom-clipped-expected.png: 61 * platform/chromium-mac/css3/filters/custom/filter-repaint-custom-expected.png: 62 * platform/chromium-mac/css3/filters/custom/filter-repaint-custom-rotated-expected.png: 63 * platform/chromium/TestExpectations: 64 1 65 2012-09-05 Tommy Widenflycht <tommyw@google.com> 2 66 -
trunk/LayoutTests/css3/filters/custom/custom-filter-shader-cache.html
r127217 r127615 26 26 .fragment_shader 27 27 { 28 -webkit-filter: custom(url('../resources/pass-tex-coord.vs') url('../resources/color-offset.fs'));28 -webkit-filter: custom(url('../resources/pass-tex-coord.vs') mix(url('../resources/color-offset.fs') normal source-atop)); 29 29 } 30 30 .both_shaders 31 31 { 32 -webkit-filter: custom(url('../resources/vertex-offset.vs') url('../resources/color-offset.fs'));32 -webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/color-offset.fs') normal source-atop)); 33 33 } 34 34 </style> -
trunk/LayoutTests/css3/filters/custom/effect-color-check.html
r127217 r127615 20 20 </head> 21 21 <body onload="runTest()"> 22 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') url('../resources/color-fill.fs'), color 1 0 0 1)" src="../../../compositing/resources/thiswayup.png">23 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') url('../resources/color-fill.fs'), color 0 1 0 1)" src="../../../compositing/resources/thiswayup.png">24 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') url('../resources/color-fill.fs'), color 0 0 1 1)" src="../../../compositing/resources/thiswayup.png">22 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') mix(url('../resources/color-fill.fs') normal source-atop), color 1 0 0 1)" src="../../../compositing/resources/thiswayup.png"> 23 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') mix(url('../resources/color-fill.fs') normal source-atop), color 0 1 0 1)" src="../../../compositing/resources/thiswayup.png"> 24 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') mix(url('../resources/color-fill.fs') normal source-atop), color 0 0 1 1)" src="../../../compositing/resources/thiswayup.png"> 25 25 <!-- 26 26 Testing that the color channels are specified correctly. You should see 3 boxes filled with red, green and blue. The arrow should 27 point up side and the text should be written from left to right (no mirror). Also the gradient starts from up - transparentto down - full color.27 point upward and the text should be written from left to right (no mirror). Also the gradient starts from up - no color to down - full color. 28 28 Note: WebGL needs to be enabled for this test to succeed. 29 29 --> -
trunk/LayoutTests/css3/filters/custom/effect-custom-combined-missing.html
r119990 r127615 25 25 } 26 26 .filterA { 27 -webkit-filter: custom(url('../resources/vertex-offset.vs') url('../resources/color-offset.fs'))28 custom(url('../resources/missing-vertex-offset.vs') url('../resources/missing-color-offset.fs'))29 custom(url('../resources/vertex-offset.vs') url('../resources/color-offset.fs'));27 -webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/color-offset.fs') normal source-atop)) 28 custom(url('../resources/missing-vertex-offset.vs') mix(url('../resources/missing-color-offset.fs') normal source-atop)) 29 custom(url('../resources/vertex-offset.vs') mix(url('../resources/color-offset.fs') normal source-atop)); 30 30 } 31 31 </style> … … 36 36 </div> 37 37 <!-- 38 Testing that multiple filters can be applied even if some filters cannot be loaded. You should see a washed out block of colored bars on top of green background. 39 There should be two columns at the left of the block with different shades of green. 38 Testing that multiple filters can be applied even if some filters cannot be loaded. 39 You should see a rectangle with a washed out block of colored bars on top of green background. 40 There should be a green column left of the block spanning 20% of the rectangle's width. 40 41 --> 41 42 </body> -
trunk/LayoutTests/css3/filters/custom/effect-custom-parameters.html
r119990 r127615 21 21 /* Testing parameters of type float, vec2 and vec3 in vertex-offset-parameters.vs and vec4 in color-offset-parameters.fs. */ 22 22 .filterA { 23 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') url('../resources/color-offset-parameters.fs'),23 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') mix(url('../resources/mix-color.fs') normal source-atop), 24 24 perspective 2, 25 25 vertex_offset -0.05 0.1, 26 26 rotate 45 -25 -10, 27 color_offset 0.4 0.2 0.5 0.1);27 mix_color 0.4 0.2 0.5 0.5); 28 28 } 29 29 .filterB { 30 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') url('../resources/color-offset-parameters.fs'),30 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') mix(url('../resources/mix-color.fs') normal source-atop), 31 31 rotate 45 25 -10, 32 32 perspective 10, 33 33 vertex_offset -0.05 0.1, 34 color_offset 0.1 0.9 0.5 -0.5);34 mix_color 0.1 0.9 0.5 0.5); 35 35 } 36 36 .filterC { 37 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') url('../resources/color-offset-parameters.fs'),38 color_offset 0 0 0 0,37 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') mix(url('../resources/mix-color.fs') normal source-atop), 38 mix_color 0 0 0 0.5, 39 39 perspective 2, 40 40 vertex_offset -0.05 0.1, … … 42 42 } 43 43 .filterD { 44 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') url('../resources/color-offset-parameters.fs'),44 -webkit-filter: custom(url('../resources/vertex-offset-parameters.vs') mix(url('../resources/mix-color.fs') normal source-atop), 45 45 vertex_offset -0.15 0.1, 46 46 rotate 15 -45 10, 47 47 perspective 1.5, 48 color_offset 0.4 0.2 0.5 0.1);48 mix_color 0.4 0.2 0.5 0.5); 49 49 } 50 50 </style> -
trunk/LayoutTests/css3/filters/custom/effect-custom.html
r127217 r127615 20 20 </head> 21 21 <body onload="runTest()"> 22 <img style="-webkit-filter: custom(url('../resources/vertex-offset.vs') url('../resources/color-offset.fs'))" src="../resources/reference.png">22 <img style="-webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/color-offset.fs') normal source-atop))" src="../resources/reference.png"> 23 23 <img style="-webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/empty-shader.fs') normal source-atop), 6 11)" src="../resources/reference.png"> 24 24 <img style="-webkit-filter: custom(url('../resources/vertex-explode-detached.vs') mix(url('../resources/empty-shader.fs') normal source-atop), 3 3 detached)" src="../resources/reference.png"> 25 <img style="-webkit-filter: custom(url('../resources/vertex-explode-detached.vs') url('../resources/color-offset.fs'), 3 3 detached)" src="../resources/reference.png">26 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') url('../resources/color-offset.fs'))" src="../resources/reference.png">25 <img style="-webkit-filter: custom(url('../resources/vertex-explode-detached.vs') mix(url('../resources/color-offset.fs') normal source-atop), 3 3 detached)" src="../resources/reference.png"> 26 <img style="-webkit-filter: custom(url('../resources/pass-tex-coord.vs') mix(url('../resources/color-offset.fs') normal source-atop))" src="../resources/reference.png"> 27 27 <!-- 28 28 Testing that simple custom filters work in software mode. You should see 5 blocks of colored bars with different effects applied, from left to right: -
trunk/LayoutTests/css3/filters/custom/filter-repaint-custom-clipped.html
r119990 r127615 42 42 43 43 .shader { 44 -webkit-filter: custom(url(../resources/vertex-horizontal-offset.vs) url(../resources/color-add.fs), offset -0.5, add0.1);44 -webkit-filter: custom(url(../resources/vertex-horizontal-offset.vs) mix(url(../resources/mix-color.fs) normal source-atop), offset -0.5, mix_color 1.0 1.0 1.0 0.1); 45 45 } 46 46 </style> -
trunk/LayoutTests/css3/filters/custom/filter-repaint-custom-rotated.html
r119990 r127615 3 3 This tests verifies that filter shader is repainted using the full source image of the element instead of just the dirty area. 4 4 Also it tests that the clipping or the transform rectangle of the box is not affecting the filter. 5 There should be one light green box eson the screen. No red should be visible.5 There should be one light green box on the screen. No red should be visible. 6 6 --> 7 7 <html> … … 42 42 43 43 .shader { 44 -webkit-filter: custom(url(../resources/vertex-horizontal-offset.vs) url(../resources/color-add.fs), offset -0.5, add0.1);44 -webkit-filter: custom(url(../resources/vertex-horizontal-offset.vs) mix(url(../resources/mix-color.fs) normal source-atop), offset -0.5, mix_color 1.0 1.0 1.0 0.1); 45 45 -webkit-transform-origin: 50px 50px; 46 46 -webkit-transform: rotate(90deg); -
trunk/LayoutTests/css3/filters/custom/filter-repaint-custom.html
r119990 r127615 33 33 border-top: 50px solid blue; 34 34 width: 50px; 35 -webkit-filter: custom(url(../resources/vertex-rotate.vs) url(../resources/color-add.fs), rotateBy 90, add0.1);35 -webkit-filter: custom(url(../resources/vertex-rotate.vs) mix(url(../resources/mix-color.fs) normal source-atop), rotateBy 90, mix_color 1.0 1.0 1.0 0.1); 36 36 } 37 37 </style> -
trunk/LayoutTests/css3/filters/custom/invalid-custom-filter-shader.html
r125128 r127615 26 26 .invalid_fragment_shader 27 27 { 28 -webkit-filter: custom(none url('../resources/invalid-shader.vs'));28 -webkit-filter: custom(none mix(url('../resources/invalid-shader.vs') normal source-atop)); 29 29 } 30 30 .both_shaders_but_invalid_vertex_shader 31 31 { 32 -webkit-filter: custom(url('../resources/invalid-shader.vs') url('../resources/color-offset.fs'));32 -webkit-filter: custom(url('../resources/invalid-shader.vs') mix(url('../resources/color-offset.fs') normal source-atop)); 33 33 } 34 34 35 35 .both_shaders_but_invalid_fragment_shader 36 36 { 37 -webkit-filter: custom(url('../resources/vertex-offset.vs') url('../resources/invalid-shader.vs'));37 -webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/invalid-shader.vs') normal source-atop)); 38 38 } 39 39 .both_shaders_invalid 40 40 { 41 -webkit-filter: custom(url('../resources/invalid-shader.vs') url('../resources/invalid-shader.vs'));41 -webkit-filter: custom(url('../resources/invalid-shader.vs') mix(url('../resources/invalid-shader.vs') normal-source-atop)); 42 42 } 43 43 </style> -
trunk/LayoutTests/css3/filters/custom/missing-custom-filter-shader.html
r119990 r127615 26 26 .missing_fragment_shader 27 27 { 28 -webkit-filter: custom(none url('../resources/missing-color-offset.fs'));28 -webkit-filter: custom(none mix(url('../resources/missing-color-offset.fs') normal source-atop)); 29 29 } 30 30 .both_shaders_but_missing_vertex_shader 31 31 { 32 -webkit-filter: custom(url('../resources/missing-vertex-offset.vs') url('../resources/color-offset.fs'));32 -webkit-filter: custom(url('../resources/missing-vertex-offset.vs') mix(url('../resources/color-offset.fs') normal source-atop)); 33 33 } 34 34 35 35 .both_shaders_but_missing_fragment_shader 36 36 { 37 -webkit-filter: custom(url('../resources/vertex-offset.vs') url('../resources/missing-color-offset.fs'));37 -webkit-filter: custom(url('../resources/vertex-offset.vs') mix(url('../resources/missing-color-offset.fs') normal source-atop)); 38 38 } 39 39 .both_shaders_missing 40 40 { 41 -webkit-filter: custom(url('../resources/missing-vertex-offset.vs') url('../resources/missing-color-offset.fs'));41 -webkit-filter: custom(url('../resources/missing-vertex-offset.vs') mix(url('../resources/missing-color-offset.fs') normal source-atop)); 42 42 } 43 43 </style> -
trunk/LayoutTests/css3/filters/resources/color-fill.fs
r125044 r127615 2 2 uniform vec4 color; 3 3 varying vec2 v_texCoord; 4 uniform sampler2D u_texture;5 4 void main() 6 5 { 7 vec4 sourceColor = texture2D(u_texture, v_texCoord); 8 // Note that gl_FragColor and sourceColor are unmultiplied. 9 // Multiply the texture with the color specified as an uniform. Also apply a 10 // gradient to check for the right direction. The result should be transparent on top. 11 gl_FragColor = vec4(sourceColor.xyz * color.xyz, sourceColor.a * color.a * v_texCoord.y); 6 // Mix the texture with the color specified as an uniform. 7 // Also apply a gradient to check for the right direction. 8 // The color should be lightest at the top and darkest at the bottom. 9 css_MixColor = vec4(color.xyz, color.a * v_texCoord.y); 12 10 } -
trunk/LayoutTests/css3/filters/resources/color-offset.fs
r119990 r127615 1 1 precision mediump float; 2 varying vec2 v_texCoord;3 uniform sampler2D u_texture;4 2 void main() 5 3 { 6 // Offset the color value with 0.3 on each color channel.7 gl_FragColor = texture2D(u_texture, v_texCoord) + 0.3;4 // Mix some white with the DOM element texture. 5 css_MixColor = vec4(1.0, 1.0, 1.0, 0.5); 8 6 } -
trunk/LayoutTests/platform/chromium/TestExpectations
r127608 r127615 3431 3431 BUGWK94492 WIN LINUX : css3/filters/custom/custom-filter-color-matrix.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3432 3432 BUGWK94492 WIN LINUX : css3/filters/custom/custom-filter-composite-source-atop.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3433 BUGWK94492 WIN LINUX : css3/filters/custom/custom-filter-shader-cache.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3434 BUGWK94492 WIN LINUX : css3/filters/custom/effect-color-check.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3435 BUGWK94492 WIN LINUX : css3/filters/custom/effect-custom-combined-missing.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3436 BUGWK94492 WIN LINUX : css3/filters/custom/effect-custom.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3437 BUGWK94492 WIN LINUX : css3/filters/custom/effect-custom-parameters.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3438 BUGWK94492 WIN LINUX : css3/filters/custom/filter-repaint-custom-clipped.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3439 BUGWK94492 WIN LINUX : css3/filters/custom/filter-repaint-custom.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3440 BUGWK94492 WIN LINUX : css3/filters/custom/filter-repaint-custom-rotated.html = PASS IMAGE IMAGE+TEXT TEXT MISSING 3433 3441 3434 3442 // Flaky
Note: See TracChangeset
for help on using the changeset viewer.