Bug 181283

Summary: SVG2: Drop xlink namespace
Product: WebKit Reporter: Peter Holbein Kapoun <webkit.20.phk>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: sabouhallawa, zimmermann
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
<pattern> with nested <use>
none
<pattern> with some <use>
none
<pattern
none
<pattern> with no <use> none

Description Peter Holbein Kapoun 2018-01-04 03:24:27 PST
Created attachment 330453 [details]
<pattern> with nested <use>

Steps to reproduce the problem:
1. Open all three test cases.

What is the expected behavior?
In each case there should be a <circle> filled with an argyle <pattern>.

What went wrong?
The two cases where <use> inside <pattern> is used do not work in Safari (and probably other Webkit browsers).

Does this work in other browsers?
Works in current versions of Google Chrome, Mozilla Firefox and Microsoft Internet Explorer and Microsoft Edge.
Comment 1 Peter Holbein Kapoun 2018-01-04 03:24:47 PST
Created attachment 330454 [details]
<pattern> with some <use>
Comment 2 Peter Holbein Kapoun 2018-01-04 03:25:02 PST
Created attachment 330455 [details]
<pattern
Comment 3 Peter Holbein Kapoun 2018-01-04 03:25:39 PST
Created attachment 330456 [details]
<pattern> with no <use>

(This one works in Safari)
Comment 4 Peter Holbein Kapoun 2018-01-04 06:13:35 PST
Also broken in the newest Safari Tech Preview (WebKit 13605.1.18.2), just a black circle there.
Comment 5 Said Abou-Hallawa 2018-01-04 10:53:52 PST
The problem here is WebKit still supports the "xlink" namespace and expects the "href" attribute to be prefixed by it. SVG 2 dropped the "xlink" namespace. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href. WebKit has not dropped it yet.

So get all the test cases working in WebKit, all the href attributes should be replaced by xlink:href.
Comment 6 Peter Holbein Kapoun 2018-01-04 11:31:55 PST
Thank you, I could kick myself for this. I knew about this now-unique characteristic of Webkit but I totally forgot about it and none of the checkers and HTML5 validators pointed it out to me since they are already targeting SVG2 in that regard (which is also good for since I am also already using SVG2-specific attributes in another instance).

I would have closed this issue now but judging from the new title I guess the intention is on giving this bug a new raison d'ĂȘtre as a bug tracking WebKit catching up with the rest of the browser gang in that regard. Fine with me.
Comment 7 Said Abou-Hallawa 2019-05-07 09:16:51 PDT
This is fixed by https://bugs.webkit.org/show_bug.cgi?id=153854.

*** This bug has been marked as a duplicate of bug 153854 ***