Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVGGeometryElement/SVGPathElement duplication of members #9183

Closed
foolip opened this issue Feb 19, 2021 · 0 comments · Fixed by #9479
Closed

SVGGeometryElement/SVGPathElement duplication of members #9183

foolip opened this issue Feb 19, 2021 · 0 comments · Fixed by #9479
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@foolip
Copy link
Contributor

foolip commented Feb 19, 2021

There are 3 members that were originally in SVGPathElement which have been moved to SVGGeometryElement: getPointAtLength, getTotalLength and pathLength.

For Chromium, that move happened in M33: https://bugs.chromium.org/p/chromium/issues/detail?id=315802

BCD still has these 3 members on SVGPathElement as well as on SVGGeometryElement, and the data isn't entirely aligned.

Fixing this will run into #3463, because it will be necessary to say that some members of SVGGeometryElement were introduced earlier than SVGGeometryElement itself.

@queengooborg queengooborg added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Feb 20, 2021
foolip added a commit to foolip/browser-compat-data that referenced this issue Mar 16, 2021
This was tested by checking for the 3 members on all 7 types of elements
which currently inherit from SVGGeometryElement:

http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=9076

```js
var tags = ['circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect'];
var members = ['getPointAtLength', 'getTotalLength', 'pathLength'];
tags.forEach(function(localName) {
  var e = document.createElementNS('http://www.w3.org/2000/svg', localName);
  members.forEach(function(member) {
    w(localName + '.' + member + ': ' + typeof e[member]);
  });
});
```

In Chromium, getTotalLength and getPointAtLength were moved in M56,
and pathLength was moved in M57:
https://bugs.chromium.org/p/chromium/issues/detail?id=596043
https://storage.googleapis.com/chromium-find-releases-static/887.html#887bbf6c0edcabfa012099379c2d68a3dc4afd3f
https://storage.googleapis.com/chromium-find-releases-static/6fd.html#6fd1cbb3c5a636ee3830729e4b26ca1d5d78c8d6

In Gecko, the SVGGeometryElement was introduced in 53, but elements
other than <path> were made to inherit in 61:
https://bugzilla.mozilla.org/show_bug.cgi?id=1239100
https://bugzilla.mozilla.org/show_bug.cgi?id=1325320

In WebKit the change was made at trunk version 606.1.14:
https://trac.webkit.org/changeset/230829/webkit
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=230829

In Edge 13 and IE 11, only path.getPointAtLength and path.getTotalLength
were supported, there was no support for pathLength.

In Opera 12.16, all 3 members were supported on path and nowhere else.

Fixes mdn#9183.
ddbeck pushed a commit that referenced this issue Mar 22, 2021
* Merge duplicate SVGGeometryElement+SVGPathElement entries

This was tested by checking for the 3 members on all 7 types of elements
which currently inherit from SVGGeometryElement:

http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=9076

```js
var tags = ['circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect'];
var members = ['getPointAtLength', 'getTotalLength', 'pathLength'];
tags.forEach(function(localName) {
  var e = document.createElementNS('http://www.w3.org/2000/svg', localName);
  members.forEach(function(member) {
    w(localName + '.' + member + ': ' + typeof e[member]);
  });
});
```

In Chromium, getTotalLength and getPointAtLength were moved in M56,
and pathLength was moved in M57:
https://bugs.chromium.org/p/chromium/issues/detail?id=596043
https://storage.googleapis.com/chromium-find-releases-static/887.html#887bbf6c0edcabfa012099379c2d68a3dc4afd3f
https://storage.googleapis.com/chromium-find-releases-static/6fd.html#6fd1cbb3c5a636ee3830729e4b26ca1d5d78c8d6

In Gecko, the SVGGeometryElement was introduced in 53, but elements
other than <path> were made to inherit in 61:
https://bugzilla.mozilla.org/show_bug.cgi?id=1239100
https://bugzilla.mozilla.org/show_bug.cgi?id=1325320

In WebKit the change was made at trunk version 606.1.14:
https://trac.webkit.org/changeset/230829/webkit
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Configurations/Version.xcconfig?rev=230829

In Edge 13 and IE 11, only path.getPointAtLength and path.getTotalLength
were supported, there was no support for pathLength.

In Opera 12.16, all 3 members were supported on path and nowhere else.

Fixes #9183.

* Update api/SVGGeometryElement.json

* split entries for api.SVGGeometryElement itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants