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

Update data for when href (not xlink:href) can be used in SVG #6603

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

foolip
Copy link
Contributor

@foolip foolip commented Aug 30, 2020

Test case used for <image href>:

<svg width="400" height="200"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <image xlink:href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" x="0" height="200" width="200"/>
  <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" x="200" height="200" width="200"/>
</svg>

Test case used for <use href>:

<svg viewBox="0 0 30 10"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <circle id="myCircle" cx="5" cy="5" r="4" stroke="black"/>
  <use xlink:href="#myCircle" x="10" fill="green"/>
  <use href="#myCircle" x="20" fill="green"/>
</svg>

Based on these tests, the change was narrowed down to Chrome 50, and
this commit pinpointed:
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411

At the time, SVGURIReference was used in these C++ classes:

https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGAElement.h#32
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGCursorElement.h#35
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGFEImageElement.h#35
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGPatternElement.h#40
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGTextPathElement.h#46
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGUseElement.h#37

The following classes are the same, but for these there's no BCD entry
for the namespaceless href attribute, so they're not updated:
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGFilterElement.h#42
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGGradientElement.h#44
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGImageElement.h#36
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGMPathElement.h#34
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGScriptElement.h#38

Data is mirror for Chromium browsers expect Edge, which is mostly set to
"12" already and where it's null would require additional testing.

@github-actions github-actions bot added the data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG label Aug 30, 2020
@myakura
Copy link
Contributor

myakura commented Aug 30, 2020

TODO Safari.

The basic support for null-namespace href was added in r234683 and shipped in Safari 12.1 (iOS 12.2).
(the changeset landed in STP 63 and the Safari 12.1 blog post says it includes the changes made in STP 59-76).

However, the initial implementation has a bug where it preferes xlink:href over bare href when both attributes are specified (bug 195802). That was fixed in r249593, landed in STP 92, made its release in Safari 13.1.

@ddbeck
Copy link
Collaborator

ddbeck commented Oct 28, 2020

Hey @foolip, this PR has been in draft status for some time. What needs to happen to get this into a reviewable state? Any help needed here?

@foolip
Copy link
Contributor Author

foolip commented Nov 25, 2020

Thanks for the details, @myakura! Going to update the Safari data, I found that it was actually already there, added in #5255.

Since the changes I've made are correct, I'm just going to leave it like this instead of trying to track down every last detail. I'll edit the description to say what this does now.

Test case used for <image href>:

```svg
<svg width="400" height="200"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <image xlink:href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" x="0" height="200" width="200"/>
  <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" x="200" height="200" width="200"/>
</svg>
```

Test case used for <use href>:

```svg
<svg viewBox="0 0 30 10"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <circle id="myCircle" cx="5" cy="5" r="4" stroke="black"/>
  <use xlink:href="#myCircle" x="10" fill="green"/>
  <use href="#myCircle" x="20" fill="green"/>
</svg>
```

Based on these tests, the change was narrowed down to Chrome 50, and
this commit pinpointed:
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411

At the time, SVGURIReference was used in these C++ classes:

https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGAElement.h#32
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGCursorElement.h#35
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGFEImageElement.h#35
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGPatternElement.h#40
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGTextPathElement.h#46
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGUseElement.h#37

The following classes are the same, but for these there's no BCD entry
for the namespaceless href attribute, so they're not updated:
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGFilterElement.h#42
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGGradientElement.h#44
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGImageElement.h#36
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGMPathElement.h#34
https://chromium.googlesource.com/chromium/src/+/2f0b655515af2df03d41d4f894e0dd59d5cb6411/third_party/WebKit/Source/core/svg/SVGScriptElement.h#38

Data is mirror for Chromium browsers expect Edge, which is mostly set to
"12" already and where it's null would require additional testing.
@foolip foolip marked this pull request as ready for review November 25, 2020 09:12
@foolip
Copy link
Contributor Author

foolip commented Nov 25, 2020

@ddbeck this is now ready for review.

@ddbeck
Copy link
Collaborator

ddbeck commented Jan 28, 2021

(I've temporarily relaxed the branch protection rules to merge this, since the older workflows satisfied.)

@ddbeck ddbeck merged commit cd51f9e into mdn:master Jan 28, 2021
@foolip foolip deleted the svg-href branch January 28, 2021 14:47
germain-gg pushed a commit to germain-gg/browser-compat-data that referenced this pull request Feb 1, 2021
…icture

* upstream/master: (1123 commits)
  Remove Chromium 89 from String.at / Array.at / TypedArray.at (mdn#8869)
  Add worker_support info for CacheStorage (mdn#8783)
  Remove several needless "Enabled by default" notes (mdn#8899)
  Add HTML global attribute nonce (mdn#8764)
  api.Navigator.vibrate - Firefox for Android doesn't vibrate (mdn#7172)
  Mark MediaSource's onsourceclose as not supported in Firefox (mdn#8881)
  Update Florian's ownership (mdn#8893)
  Mention fix for Chrome's broken PDF loading (mdn#8867)
  Fill out Chrome data for html.elements.source.{sizes,srcset} (mdn#8889)
  Weekly data release for 2021-01-28
  Add text-decoration-thickness for Opera 73+ (mdn#8872)
  Update :is and :where pseudo-classes for Chrome (mdn#7375)
  Add note re Safari <9 partial srcset/sizes support (mdn#7353)
  Update data for when href (not xlink:href) can be used in SVG (mdn#6603)
  Add top-level await (mdn#8807)
  TouchList: Add Safari Desktop and Safari iOS versions (mdn#8848)
  Update Firefox versions to account for Firefox 85 release (mdn#8864)
  Fix page_action.show_matches support for Android (mdn#8844)
  Update Safari support for devicechange_event (mdn#8863)
  Add HTTPS-only to privacy.network (mdn#8830)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants