| 1 |
<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4" reviewer="CL" author="Microsoft" status="accepted" version="$Revision: 1.5 $" testname="$RCSfile: masking-path-12-f.svg,v $"> |
| 12 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://dev.w3.org/SVG/profiles/1.1F2/publish/masking.html#clipPath-geometry"> |
| 13 |
<p> |
| 14 |
Properties inherit into the 'clipPath' element and its children. |
| 15 |
</p> |
| 16 |
</d:testDescription> |
| 17 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 18 |
<p>Run the test. No interaction required.</p> |
| 19 |
</d:operatorScript> |
| 20 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 21 |
<p> |
| 22 |
Test passes if there is a green rect visible, and no red. |
| 23 |
</p> |
| 24 |
</d:passCriteria> |
| 25 |
</d:SVGTestCase> |
| 26 |
<title id="test-title">$RCSfile: masking-path-12-f.svg,v $</title> |
| 27 |
<defs> |
| 28 |
<font-face |
| 29 |
font-family="SVGFreeSansASCII" |
| 30 |
unicode-range="U+0-7F"> |
| 31 |
<font-face-src> |
| 32 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 33 |
</font-face-src> |
| 34 |
</font-face> |
| 35 |
</defs> |
| 36 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 37 |
<g display="table"> |
| 38 |
<clipPath id="testClip" display="inherit"> |
| 39 |
<rect x="100" y="100" width="50" height="50" display="inherit" /> |
| 40 |
</clipPath> |
| 41 |
</g> |
| 42 |
|
| 43 |
<rect id="pass" x="200" y="100" width="50" height="50" fill="green"/> |
| 44 |
<rect id="fail" x="200" y="100" width="50" height="50" fill="red"/> |
| 45 |
|
| 46 |
<script type="text/javascript"><![CDATA[ |
| 47 |
try |
| 48 |
{ |
| 49 |
var test = document.getElementById("testClip"); |
| 50 |
var testChild = test.firstChild.nextSibling; |
| 51 |
var testAppliedStyle = document.defaultView.getComputedStyle(test, null).getPropertyValue("display"); |
| 52 |
var testChildAppliedStyle = document.defaultView.getComputedStyle(testChild, null).getPropertyValue("display"); |
| 53 |
var testExpectedStyle = "table"; |
| 54 |
if((testAppliedStyle == testExpectedStyle) && (testChildAppliedStyle == testExpectedStyle)) |
| 55 |
{ |
| 56 |
document.getElementById("fail").setAttribute("display", "none"); |
| 57 |
} |
| 58 |
} |
| 59 |
catch(ex) |
| 60 |
{ |
| 61 |
//alert('ERROR: ' + ex.message); |
| 62 |
}]]> |
| 63 |
</script> |
| 64 |
</g> |
| 65 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 66 |
<text id="revision" x="10" y="340" stroke="none" |
| 67 |
fill="black">$Revision: 1.5 $</text> |
| 68 |
</g> |
| 69 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
</svg> |