blob: 43dd32fedc8e08438c62618ec7bb3cc3f7960c51 [file] [log] [blame]
stavila@adobe.com582e02e2014-12-12 14:19:21 +00001<!DOCTYPE html>
2<html>
3 <head>
4 <style>
5 p {
6 margin: 0px;
7 }
8 #maskedElement {
9 width: 300px;
10 height: 400px;
11 background-color: green;
12 -webkit-mask-image:url('resources/circle.png');
13 }
14 #redSvg {
15 position: absolute;
16 }
17 </style>
18 </head>
19
20 <body>
21 <p><a href="https://bugs.webkit.org/show_bug.cgi?id=129682">Bug 129682</a> - On success, you should see a blue inverted-L shape and no red.</p>
22 <p>This test sets the mask-image via CSS to a PNG and then changes it to a &lt;mask&gt; element from an SVG file via a script.</p>
23 <svg id="redSvg" width="300px" height="400px">
24 <path fill="red" d="M80,20 L280,20 L280,380 L240,380 L240,60 L80,60 L80,20"/>
25 </svg>
26 <div id="maskedElement"></div>
27
28 <script>
29 var maskedElement = document.getElementById("maskedElement");
30 maskedElement.style.cssText += "-webkit-mask-image:url('resources/masks.svg#upperHalf');background-color: blue";
31 </script>
32 </body>
33</html>