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
Родитель daa39d9a32
Коммит 06fbeaf02f
6 изменённых файлов: 62 добавлений и 19 удалений

Просмотреть файл

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

Просмотреть файл

@ -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,

Просмотреть файл

@ -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>

До

Ширина:  |  Высота:  |  Размер: 693 B

После

Ширина:  |  Высота:  |  Размер: 674 B

Просмотреть файл

@ -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>

После

Ширина:  |  Высота:  |  Размер: 580 B

Просмотреть файл

@ -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>

После

Ширина:  |  Высота:  |  Размер: 612 B

Просмотреть файл

@ -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