Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <?xml-stylesheet
2 type="text/css"
3 href="data:text/css,circle { fill: white }" ?>
4 <!-- test for javascript: execution: shouldn't happen -->
5 <?xml-stylesheet
6 type="text/css"
7 href="javascript:'circle { fill: black }'" ?>
8 <svg height="0" xmlns="http://www.w3.org/2000/svg">
9 <style type="text/css">
10 /* XXXbz this should really be an external reference to mask-html-01.xhtml
11 but there's the little problem of "fill" not using nsReferencedElement
12 yet, so that's broken */
13 /* Test that media queries work on resource documents while we're here */
14 @media (min-resolution: 1dpi) {
15 rect { fill: url(#g); }
16 }
17 </style>
18 <!-- so that other documents can svg:use this one and force it to
19 load before onload -->
20 <g id="empty" />
21 <mask id="m1" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
22 <linearGradient id="g" gradientUnits="objectBoundingBox" x2="0" y2="1">
23 <stop stop-color="white" offset="0"/>
24 <stop stop-color="white" stop-opacity="0" offset="1"/>
25 </linearGradient>
26 <circle cx="0.25" cy="0.25" r="0.25" id="circle" fill="black"/>
27 <rect x="0.5" y="0" width="0.5" height="1" fill="black"/>
28 </mask>
29 <script type="application/ecmascript">
30 // Make sure scripts don't run
31 document.getElementById("m1").textContent = "";
32 </script>
33 </svg>