Index: LayoutTests/fast/canvas/canvas-css-clip-path-nested-container.html |
diff --git a/LayoutTests/fast/canvas/canvas-css-clip-path-nested-container.html b/LayoutTests/fast/canvas/canvas-css-clip-path-nested-container.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8d3b01f16cd1d9d192ac67bdab88a0eba792f958 |
--- /dev/null |
+++ b/LayoutTests/fast/canvas/canvas-css-clip-path-nested-container.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<body> |
+ <p>This test verifies that nested divs with clip-paths apply correctly to canvas elements</p> |
+ <p>Below there should be two identical green squares nested in blue squares, nested in yellow squares</p> |
+ <div style="background-color:yellow; width:100px; height:100px;"> |
+ <div style="background-color:blue;-webkit-clip-path: rectangle(10px, 10px, 80px, 80px); width:100px; height:100px;"> |
+ <div style="background-color:red;-webkit-clip-path: rectangle(20px, 20px, 60px, 60px); width:100px; height:100px;"> |
+ <canvas id="c1" width="300" height="300"></canvas> |
+ </div> |
+ </div> |
+ </div> |
+ <br> |
+ <div style="background-color:yellow; width:100px; height:100px;"> |
+ <div style="background-color:blue; position:relative; left:5px; top:7px; -webkit-clip-path: rectangle(5px, 3px, 80px, 80px); width:100px; height:100px;"> |
+ <div style="background-color:red; position:relative; left:11px; top:11px; -webkit-clip-path: rectangle(4px, 2px, 60px, 60px); width:100px; height:100px;"> |
+ <canvas id="c2" width="300" height="300"></canvas> |
+ </div> |
+ </div> |
+ </div> |
+ <script> |
+ var ctx1 = document.getElementById("c1").getContext("2d"); |
+ ctx1.fillStyle = 'green'; |
+ ctx1.fillRect(0,0, 300, 300); |
+ var ctx2 = document.getElementById("c2").getContext("2d"); |
+ ctx2.fillStyle = 'green'; |
+ ctx2.fillRect(0,0, 300, 300); |
+ </script> |
+</body> |
+</html> |