From 0d21bd40913a5f398a6f6a56368cd3cc43fd12b0 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Tue, 15 Apr 2014 11:48:02 +0100 Subject: [PATCH] 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 --- content/svg/content/src/SVGMaskElement.cpp | 2 + content/svg/content/src/SVGPatternElement.cpp | 3 ++ layout/reftests/svg/mask-basic-03.svg | 38 +++++++++---------- layout/reftests/svg/mask-basic-04.svg | 18 +++++++++ layout/reftests/svg/pattern-basic-01.svg | 18 +++++++++ layout/reftests/svg/reftest.list | 2 + 6 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 layout/reftests/svg/mask-basic-04.svg create mode 100644 layout/reftests/svg/pattern-basic-01.svg diff --git a/content/svg/content/src/SVGMaskElement.cpp b/content/svg/content/src/SVGMaskElement.cpp index c0ad2b96b8b..abdf2d4d7ac 100644 --- a/content/svg/content/src/SVGMaskElement.cpp +++ b/content/svg/content/src/SVGMaskElement.cpp @@ -127,7 +127,9 @@ NS_IMETHODIMP_(bool) SVGMaskElement::IsAttributeMapped(const nsIAtom* name) const { static const MappedAttributeEntry* const map[] = { + sColorMap, sFEFloodMap, + sFillStrokeMap, sFiltersMap, sFontSpecificationMap, sGradientStopMap, diff --git a/content/svg/content/src/SVGPatternElement.cpp b/content/svg/content/src/SVGPatternElement.cpp index cfe44156686..0fe840b842c 100644 --- a/content/svg/content/src/SVGPatternElement.cpp +++ b/content/svg/content/src/SVGPatternElement.cpp @@ -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, diff --git a/layout/reftests/svg/mask-basic-03.svg b/layout/reftests/svg/mask-basic-03.svg index 95727570c87..63585078831 100644 --- a/layout/reftests/svg/mask-basic-03.svg +++ b/layout/reftests/svg/mask-basic-03.svg @@ -1,19 +1,19 @@ - - - - - - Test that the x/y/width/height attributes work on the mask element - - - - - - - - - - + + + + + + Test that the x/y/width/height attributes work on the mask element + + + + + + + + + + diff --git a/layout/reftests/svg/mask-basic-04.svg b/layout/reftests/svg/mask-basic-04.svg new file mode 100644 index 00000000000..db90104bf9b --- /dev/null +++ b/layout/reftests/svg/mask-basic-04.svg @@ -0,0 +1,18 @@ + + + + + + Test mapped attributes work on the mask element + + + + + + + + + diff --git a/layout/reftests/svg/pattern-basic-01.svg b/layout/reftests/svg/pattern-basic-01.svg new file mode 100644 index 00000000000..b643a8943e1 --- /dev/null +++ b/layout/reftests/svg/pattern-basic-01.svg @@ -0,0 +1,18 @@ + + + + + + Test mapped attributes work on the pattern element + + + + + + + + + diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list index 749b9dad335..8da49e622a1 100644 --- a/layout/reftests/svg/reftest.list +++ b/layout/reftests/svg/reftest.list @@ -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