Bug 995813 - Mask and pattern elements should map more attributes to styles. r=dholbert

--HG--
rename : layout/reftests/svg/mask-basic-03.svg => layout/reftests/svg/mask-basic-04.svg
rename : layout/reftests/svg/mask-basic-03.svg => layout/reftests/svg/pattern-basic-01.svg
This commit is contained in:
Robert Longson 2014-04-15 11:48:02 +01:00
parent bd2330e021
commit 0d21bd4091
6 changed files with 62 additions and 19 deletions

View File

@ -127,7 +127,9 @@ NS_IMETHODIMP_(bool)
SVGMaskElement::IsAttributeMapped(const nsIAtom* name) const
{
static const MappedAttributeEntry* const map[] = {
sColorMap,
sFEFloodMap,
sFillStrokeMap,
sFiltersMap,
sFontSpecificationMap,
sGradientStopMap,

View File

@ -138,10 +138,13 @@ NS_IMETHODIMP_(bool)
SVGPatternElement::IsAttributeMapped(const nsIAtom* name) const
{
static const MappedAttributeEntry* const map[] = {
sColorMap,
sFEFloodMap,
sFillStrokeMap,
sFiltersMap,
sFontSpecificationMap,
sGradientStopMap,
sGraphicsMap,
sLightingEffectsMap,
sMarkersMap,
sTextContentElementsMap,

View File

@ -1,19 +1,19 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=779029 -->
<title>Test that the x/y/width/height attributes work on the mask element</title>
<mask id="mask" x="20%" y="20%" width="60%" height="60%">
<rect width="1000" height="1000" fill="white"/>
</mask>
<rect width="100%" height="100%" fill="lime"/>
<rect x="50" y="50" width="100" height="100" fill="red" mask="url(#mask)"/>
<rect x="70" y="70" width="60" height="60" fill="lime"/>
</svg>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=779029 -->
<title>Test that the x/y/width/height attributes work on the mask element</title>
<mask id="mask" x="20%" y="20%" width="60%" height="60%">
<rect width="1000" height="1000" fill="white"/>
</mask>
<rect width="100%" height="100%" fill="lime"/>
<rect x="50" y="50" width="100" height="100" fill="red" mask="url(#mask)"/>
<rect x="70" y="70" width="60" height="60" fill="lime"/>
</svg>

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 674 B

View File

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=995813 -->
<title>Test mapped attributes work on the mask element</title>
<mask id="mask" fill="white" maskContentUnits="objectBoundingBox">
<rect width="100%" height="100%"/>
</mask>
<rect width="100%" height="100%" fill="red"/>
<rect width="100%" height="100%" fill="lime" mask="url(#mask)"/>
</svg>

After

Width:  |  Height:  |  Size: 580 B

View File

@ -0,0 +1,18 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=995813 -->
<title>Test mapped attributes work on the pattern element</title>
<pattern id="pattern" width="100%" height="100%" fill="lime" patternContentUnits="objectBoundingBox">
<rect width="100%" height="100%"/>
</pattern>
<rect width="100%" height="100%" fill="red"/>
<rect width="100%" height="100%" fill="url(#pattern)"/>
</svg>

After

Width:  |  Height:  |  Size: 612 B

View File

@ -197,6 +197,7 @@ pref(svg.marker-improvements.enabled,true) == marker-orientation-02.svg marker-o
== mask-basic-01.svg pass.svg
== mask-basic-02.svg mask-basic-02-ref.svg
== mask-basic-03.svg pass.svg
== mask-basic-04.svg pass.svg
== mask-extref-dataURI-01.svg pass.svg
== mask-containing-masked-content-01.svg pass.svg
== mask-transformed-01.svg mask-transformed-01-ref.svg
@ -246,6 +247,7 @@ fuzzy-if(azureQuartz,6,47) == path-01.svg path-01-ref.svg
== path-08.svg pass.svg
== pathLength-01.svg pass.svg
== pathLength-02.svg pass.svg
== pattern-basic-01.svg pass.svg
== pattern-invalid-01.svg pattern-invalid-01-ref.svg
== pattern-live-01a.svg pattern-live-01-ref.svg
== pattern-live-01b.svg pattern-live-01-ref.svg