Bug 695677: Add <use> element to svg-image-script-2.svg, to force its resources file to load before onload fires. r=longsonr

This commit is contained in:
Daniel Holbert 2011-12-30 05:03:08 -08:00
parent a9fa22ee9c
commit a1aad22f2c
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
width="100" height="100">
<defs>
<!-- So that other documents can svg:use this one and force it to
load before onload -->
<g id="empty" />
<pattern id="p1" patternUnits="userSpaceOnUse" width="100%" height="100%">
<rect width="100%" height="100%" fill="lime"/>
<rect id="r1" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Script" width="100%" height="100%" fill="orange"/>

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 665 B

View File

@ -1,6 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100" height="100" class="reftest-wait">
<!-- This <use> just forces our resources file to load before onload fires -->
<use xlink:href="script100x100.svg#empty" />
<rect width="100%" height="100%" fill="red"/>
<rect width="100%" height="100%" fill="url(script100x100.svg#p1)"/>
<rect id="r1" width="100%" height="100%" fill="transparent"/>

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 850 B