Bug 1390088 - Part 2. Add a reftest to check percentage width/height on inner-<svg> resolves against the nearest <svg> ancestor. r=jwatt

MozReview-Commit-ID: KmWd9kMx8j3

--HG--
extra : rebase_source : 8ab6e8c41890c0f89c9521b5ad9f48a4a197c23d
This commit is contained in:
cku 2017-08-21 16:21:38 +08:00
parent c0dea4d930
commit 250c4094f7
2 changed files with 12 additions and 0 deletions

View File

@ -416,6 +416,7 @@ fuzzy-if(skiaContent,1,340) == stroke-dasharray-03.svg pass.svg
== svg-in-foreignObject-01.xhtml svg-in-foreignObject-01-ref.xhtml
fuzzy-if(skiaContent,1,2600) == svg-in-foreignObject-02.xhtml svg-in-foreignObject-01-ref.xhtml # reuse -01-ref.xhtml
== svg-in-inner-svg-dimensions.svg pass.svg
== switch-01.svg pass.svg
== suspend-01.svg pass.svg

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg">
<title>Test that percentage width/height for inner-&lt;svg&gt; resolves against the nearest &lt;svg&gt; ancestor, not the outer-&lt;svg&gt;</title>
<rect width="100%" height="100%" fill="lime"/>
<!-- This red rect should be covered by the lime one below -->
<rect x="50" y="50" width="50" height="50" fill="red"/>
<svg width="100" height="100">
<svg viewBox="0 0 100 100">
<rect x="50" y="50" width="50" height="50" fill="lime"/>
</svg>
</svg>
</svg>

After

Width:  |  Height:  |  Size: 517 B