diff --git a/crates/resvg/tests/integration/render.rs b/crates/resvg/tests/integration/render.rs index dbeeac0b1..6d558dcfb 100644 --- a/crates/resvg/tests/integration/render.rs +++ b/crates/resvg/tests/integration/render.rs @@ -1161,7 +1161,11 @@ use crate::render; #[test] fn structure_style_iD_selector() { assert_eq!(render("tests/structure/style/iD-selector"), 0); } #[test] fn structure_style_important() { assert_eq!(render("tests/structure/style/important"), 0); } #[test] fn structure_style_invalid_type() { assert_eq!(render("tests/structure/style/invalid-type"), 0); } -#[test] fn structure_style_non_presentational_attribute() { assert_eq!(render("tests/structure/style/non-presentational-attribute"), 0); } +#[test] fn structure_style_presentation_attributes() { assert_eq!(render("tests/structure/style/presentation-attributes"), 0); } +#[test] fn structure_style_presentation_attributes_2() { assert_eq!(render("tests/structure/style/presentation-attributes-2"), 0); } +#[test] fn structure_style_presentation_attributes_3() { assert_eq!(render("tests/structure/style/presentation-attributes-3"), 0); } +#[test] fn structure_style_presentation_attributes_4() { assert_eq!(render("tests/structure/style/presentation-attributes-4"), 0); } +#[test] fn structure_style_presentation_attributes_5() { assert_eq!(render("tests/structure/style/presentation-attributes-5"), 0); } #[test] fn structure_style_resolve_order() { assert_eq!(render("tests/structure/style/resolve-order"), 0); } #[test] fn structure_style_rule_specificity() { assert_eq!(render("tests/structure/style/rule-specificity"), 0); } #[test] fn structure_style_style_after_usage() { assert_eq!(render("tests/structure/style/style-after-usage"), 0); } @@ -1171,7 +1175,7 @@ use crate::render; #[test] fn structure_style_universal_selector() { assert_eq!(render("tests/structure/style/universal-selector"), 0); } #[test] fn structure_style_unresolved_class_selector() { assert_eq!(render("tests/structure/style/unresolved-class-selector"), 0); } #[test] fn structure_style_attribute_comments() { assert_eq!(render("tests/structure/style-attribute/comments"), 0); } -#[test] fn structure_style_attribute_non_presentational_attribute() { assert_eq!(render("tests/structure/style-attribute/non-presentational-attribute"), 0); } +#[test] fn structure_style_attribute_presentation_attributes() { assert_eq!(render("tests/structure/style-attribute/presentation-attributes"), 0); } #[test] fn structure_style_attribute_simple_case() { assert_eq!(render("tests/structure/style-attribute/simple-case"), 0); } #[test] fn structure_style_attribute_transform() { assert_eq!(render("tests/structure/style-attribute/transform"), 0); } #[test] fn structure_svg_attribute_value_via_ENTITY_reference() { assert_eq!(render("tests/structure/svg/attribute-value-via-ENTITY-reference"), 0); } diff --git a/crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.png b/crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.png deleted file mode 100644 index 0c96ac6a1..000000000 Binary files a/crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.png and /dev/null differ diff --git a/crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.png b/crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.png new file mode 100644 index 000000000..bc940e3b0 Binary files /dev/null and b/crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.png differ diff --git a/crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.svg b/crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.svg similarity index 67% rename from crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.svg rename to crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.svg index f47a39ac6..780a9d05c 100644 --- a/crates/resvg/tests/tests/structure/style-attribute/non-presentational-attribute.svg +++ b/crates/resvg/tests/tests/structure/style-attribute/presentation-attributes.svg @@ -1,7 +1,7 @@ - - Non-presentational attribute + + Presentation attributes (SVG 2) - Geometry attributes can be set via `style` only in SVG 2. + Geometry attributes can be set via `style`. diff --git a/crates/resvg/tests/tests/structure/style/non-presentational-attribute.png b/crates/resvg/tests/tests/structure/style/non-presentational-attribute.png deleted file mode 100644 index 0c96ac6a1..000000000 Binary files a/crates/resvg/tests/tests/structure/style/non-presentational-attribute.png and /dev/null differ diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-2.png b/crates/resvg/tests/tests/structure/style/presentation-attributes-2.png new file mode 100644 index 000000000..0c017b220 Binary files /dev/null and b/crates/resvg/tests/tests/structure/style/presentation-attributes-2.png differ diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-2.svg b/crates/resvg/tests/tests/structure/style/presentation-attributes-2.svg new file mode 100644 index 000000000..8e8369fc6 --- /dev/null +++ b/crates/resvg/tests/tests/structure/style/presentation-attributes-2.svg @@ -0,0 +1,11 @@ + + Presentation attributes (SVG 2) + + Geometry attributes can be set via CSS type selectors. + + + + + diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-3.png b/crates/resvg/tests/tests/structure/style/presentation-attributes-3.png new file mode 100644 index 000000000..3dfa0ec09 Binary files /dev/null and b/crates/resvg/tests/tests/structure/style/presentation-attributes-3.png differ diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-3.svg b/crates/resvg/tests/tests/structure/style/presentation-attributes-3.svg new file mode 100644 index 000000000..5471062a1 --- /dev/null +++ b/crates/resvg/tests/tests/structure/style/presentation-attributes-3.svg @@ -0,0 +1,12 @@ + + Presentation attributes (SVG 2) + `cx` can be set via CSS + + + + + + + diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-4.png b/crates/resvg/tests/tests/structure/style/presentation-attributes-4.png new file mode 100644 index 000000000..01a2a1d8a Binary files /dev/null and b/crates/resvg/tests/tests/structure/style/presentation-attributes-4.png differ diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-4.svg b/crates/resvg/tests/tests/structure/style/presentation-attributes-4.svg new file mode 100644 index 000000000..ad04350a1 --- /dev/null +++ b/crates/resvg/tests/tests/structure/style/presentation-attributes-4.svg @@ -0,0 +1,7 @@ + + Presentation attributes (SVG 2) + width/height styling ignored on non-outermost SVG element + + + + diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-5.png b/crates/resvg/tests/tests/structure/style/presentation-attributes-5.png new file mode 100644 index 000000000..c98f3eca6 Binary files /dev/null and b/crates/resvg/tests/tests/structure/style/presentation-attributes-5.png differ diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes-5.svg b/crates/resvg/tests/tests/structure/style/presentation-attributes-5.svg new file mode 100644 index 000000000..31ee31346 --- /dev/null +++ b/crates/resvg/tests/tests/structure/style/presentation-attributes-5.svg @@ -0,0 +1,12 @@ + + Presentation attributes (SVG 2) + width/height styling ignored on USE element + + + + + + + + diff --git a/crates/resvg/tests/tests/structure/style/presentation-attributes.png b/crates/resvg/tests/tests/structure/style/presentation-attributes.png new file mode 100644 index 000000000..bc940e3b0 Binary files /dev/null and b/crates/resvg/tests/tests/structure/style/presentation-attributes.png differ diff --git a/crates/resvg/tests/tests/structure/style/non-presentational-attribute.svg b/crates/resvg/tests/tests/structure/style/presentation-attributes.svg similarity index 71% rename from crates/resvg/tests/tests/structure/style/non-presentational-attribute.svg rename to crates/resvg/tests/tests/structure/style/presentation-attributes.svg index 01ec4ead9..9349e5e0b 100644 --- a/crates/resvg/tests/tests/structure/style/non-presentational-attribute.svg +++ b/crates/resvg/tests/tests/structure/style/presentation-attributes.svg @@ -1,7 +1,7 @@ - - Non-presentational attribute + + Presentation attributes (SVG 2) - Geometry attributes can be set via `style` only in SVG 2. + Geometry attributes can be set via CSS ID selectors.