From 59edc20248e37f9c72406390a606a2cef7865b93 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 10 Dec 2009 09:26:27 -0800 Subject: [PATCH] Bug 520487: Support URI-valued properties in SVG/SMIL. r=roc --- content/smil/nsSMILCSSProperty.cpp | 12 ++++++------ content/smil/test/db_smilCSSFromBy.js | 11 ++++++++++- content/smil/test/db_smilCSSFromTo.js | 12 +++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/content/smil/nsSMILCSSProperty.cpp b/content/smil/nsSMILCSSProperty.cpp index ec8517ebae9..f5876951c93 100644 --- a/content/smil/nsSMILCSSProperty.cpp +++ b/content/smil/nsSMILCSSProperty.cpp @@ -228,7 +228,7 @@ nsSMILCSSProperty::IsPropertyAnimatable(nsCSSProperty aPropID) // commenting those properties out here for the time being, so that we // don't try to animate them yet. case eCSSProperty_clip_rule: - // case eCSSProperty_clip_path: + case eCSSProperty_clip_path: case eCSSProperty_color: case eCSSProperty_color_interpolation: case eCSSProperty_color_interpolation_filters: @@ -238,7 +238,7 @@ nsSMILCSSProperty::IsPropertyAnimatable(nsCSSProperty aPropID) case eCSSProperty_fill: case eCSSProperty_fill_opacity: case eCSSProperty_fill_rule: - // case eCSSProperty_filter: + case eCSSProperty_filter: case eCSSProperty_flood_color: case eCSSProperty_flood_opacity: case eCSSProperty_font_family: @@ -251,10 +251,10 @@ nsSMILCSSProperty::IsPropertyAnimatable(nsCSSProperty aPropID) case eCSSProperty_image_rendering: case eCSSProperty_letter_spacing: case eCSSProperty_lighting_color: - // case eCSSProperty_marker_end: - // case eCSSProperty_marker_mid: - // case eCSSProperty_marker_start: - // case eCSSProperty_mask: + case eCSSProperty_marker_end: + case eCSSProperty_marker_mid: + case eCSSProperty_marker_start: + case eCSSProperty_mask: case eCSSProperty_opacity: case eCSSProperty_pointer_events: case eCSSProperty_shape_rendering: diff --git a/content/smil/test/db_smilCSSFromBy.js b/content/smil/test/db_smilCSSFromBy.js index 54e332dc11b..8fb0bceb14e 100644 --- a/content/smil/test/db_smilCSSFromBy.js +++ b/content/smil/test/db_smilCSSFromBy.js @@ -74,7 +74,14 @@ var _fromByTestLists = new AnimTestcaseFromBy("url(#gradA)", "url(#gradB) red", { noEffect: 1 }), new AnimTestcaseFromBy("url(#gradA)", "none", { noEffect: 1 }), new AnimTestcaseFromBy("red", "url(#gradA)", { noEffect: 1 }), - ] + ], + URIsAndNone: [ + // No need to specify { noEffect: 1 }, since plain URI-valued properties + // aren't additive + new AnimTestcaseFromBy("url(#idA)", "url(#idB)"), + new AnimTestcaseFromBy("none", "url(#idB)"), + new AnimTestcaseFromBy("url(#idB)", "inherit"), + ], }; // List of attribute/testcase-list bundles to be tested @@ -82,6 +89,8 @@ var gFromByBundles = [ new TestcaseBundle(gPropList.fill, [].concat(_fromByTestLists.color, _fromByTestLists.paint)), + // Check that 'by' animations involving URIs have no effect + new TestcaseBundle(gPropList.filter, _fromByTestLists.URIsAndNone), new TestcaseBundle(gPropList.font_size, _fromByTestLists.lengthPx), new TestcaseBundle(gPropList.font_size_adjust, [ // These testcases implicitly have no effect, because font-size-adjust is diff --git a/content/smil/test/db_smilCSSFromTo.js b/content/smil/test/db_smilCSSFromTo.js index 001fb1b7819..7900e986531 100644 --- a/content/smil/test/db_smilCSSFromTo.js +++ b/content/smil/test/db_smilCSSFromTo.js @@ -139,15 +139,12 @@ var _fromToTestLists = { URIsAndNone: [ new AnimTestcaseFromTo("url(#idA)", "url(#idB)", { fromComp: "url(\"" + document.URL + "#idA\")", - toComp: "url(\"" + document.URL + "#idB\")"}, - "need support for URI values"), + toComp: "url(\"" + document.URL + "#idB\")"}), new AnimTestcaseFromTo("none", "url(#idB)", - { toComp: "url(\"" + document.URL + "#idB\")"}, - "need support for URI values"), + { toComp: "url(\"" + document.URL + "#idB\")"}), new AnimTestcaseFromTo("url(#idB)", "inherit", { fromComp: "url(\"" + document.URL + "#idB\")", - toComp: "none"}, - "need support for URI values"), + toComp: "none"}), ], }; @@ -331,7 +328,8 @@ var gFromToBundles = [ new TestcaseBundle(gPropList.lighting_color, [].concat(_fromToTestLists.color, _fromToTestLists.colorFromInheritWhite)), - new TestcaseBundle(gPropList.marker, _fromToTestLists.URIsAndNone), + new TestcaseBundle(gPropList.marker, _fromToTestLists.URIsAndNone, + "need support for 'marker' shorthand property"), new TestcaseBundle(gPropList.marker_end, _fromToTestLists.URIsAndNone), new TestcaseBundle(gPropList.marker_mid, _fromToTestLists.URIsAndNone), new TestcaseBundle(gPropList.marker_start, _fromToTestLists.URIsAndNone),