Skip to content

Commit

Permalink
Fixes to wpt/svg/styling/presentation-attributes-* tests
Browse files Browse the repository at this point in the history
Missing negation in the "d presentation attribute not supported on other
elements" subtest in ...-special-cases.html test.

Set 'irrelevantElement' to null for 'd', 'height', 'r', 'rx', 'ry',
'transform', 'width', 'x' and 'y' since they are all mentioned in the
table in the spec[1] as being special. They are also covered by the
...-special-cases.html test.
The definition of 'Applies to' for the 'transform' attribute varies
slightly between the SVG specification and CSS transforms
specifications, so this applies essentially the intersection of those
two.

[1] https://svgwg.org/svg2-draft/styling.html#PresentationAttributes

Bug: 1056055
Change-Id: Id7a6e604d4f48abbd601bdc09ec9f7ff795b86ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078581
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#745452}
  • Loading branch information
Fredrik Söderquist authored and chromium-wpt-export-bot committed Feb 28, 2020
1 parent 1f45266 commit 99bdd54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion svg/styling/presentation-attributes-special-cases.html
Expand Up @@ -89,7 +89,7 @@

if (CSS.supports("d", "initial")) {
test(function() {
assertPresentationAttributeIsSupported("g", "d", "M0,0 L1,1", "d");
assertPresentationAttributeIsNotSupported("g", "d", "M0,0 L1,1", "d");
}, `d presentation attribute not supported on other elements`);
}

Expand Down
18 changes: 9 additions & 9 deletions svg/styling/presentation-attributes.js
Expand Up @@ -62,7 +62,7 @@ const PROPERTIES = {
"d": {
value: "M0,0 L1,1",
relevantElement: "path",
irrelevantElement: "image",
irrelevantElement: null,
},
"dominant-baseline": {
value: "middle",
Expand Down Expand Up @@ -142,7 +142,7 @@ const PROPERTIES = {
"height": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"image-rendering": {
value: "optimizeSpeed",
Expand Down Expand Up @@ -207,17 +207,17 @@ const PROPERTIES = {
"r": {
value: "1",
relevantElement: "circle",
irrelevantElement: "rect",
irrelevantElement: null,
},
"rx": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"ry": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"shape-rendering": {
value: "geometricPrecision",
Expand Down Expand Up @@ -302,7 +302,7 @@ const PROPERTIES = {
"transform": {
value: "scale(2)",
relevantElement: "g",
irrelevantElement: "linearGradient",
irrelevantElement: null,
},
"unicode-bidi": {
value: "embed",
Expand All @@ -327,7 +327,7 @@ const PROPERTIES = {
"width": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"word-spacing": {
value: "1",
Expand All @@ -342,12 +342,12 @@ const PROPERTIES = {
"x": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
"y": {
value: "1",
relevantElement: "rect",
irrelevantElement: "path",
irrelevantElement: null,
},
};

Expand Down

0 comments on commit 99bdd54

Please sign in to comment.