Closed Bug 1352979 Opened 5 years ago Closed 5 years ago

<use xlink:href> should not respect <base> for local references


(Core :: SVG, defect)

Not set



Tracking Status
firefox55 --- fixed


(Reporter: rik, Unassigned)



(Whiteboard: [webcompat])


(1 file)

Steps to reproduce:
Open the testcase

Actual result:
Logo is invisible

Expected result:
Logo is displayed

Works as expected: Chrome, Safari, IE 10 and 11
Works as actual: Firefox, Edge

A lot of people are running into this issue and fixing by using absolute references:

I think <base> should not be used for local references aka #foo.
Please approach w3c first if you want things to change and get agreement on a specification update. The SVG specification currently says to generate an absolute URL says 

In contrast, a base element affects relative URLs in any SVG or HTML document, by altering the document base URL. 

so you'll need to get the SVG specification changed first.
Closed: 5 years ago
Resolution: --- → INVALID
Whiteboard: [webcompat]
Thanks Anthony for the report. 
The closest I find so far is 
* Document.baseURI getter doesn't return the parent document's base URL for iframes

I opened another issue on the Chromium project to see what would be the comments.

I checked in Blink (Opera), the use.baseURI is properly set on the element but is not used for deferencing the xlink:href
Test case showing the issue.
Robert: What's the best forum to bring up those issues?
Flags: needinfo?(longsonr)
Actually, that issue has already been brought up:

"As defined in CSS Values and Units, a fragment-only URL in a style property must be treated as a same-document URL reference, regardless of the file in which the property was declared."

Reopening per spec.
Resolution: INVALID → ---
Yes and in addition, the issue was closed as WONTFIX on Chrome project because of Web Compatibility issues.
> This was changed via issue 470608 after we had attempted to implement the Gecko behavior in issue 449027 and got push-back (possibly because this "broken" behavior had existed in WebKit for quite a while.)

Given that Chrome, Safari, IE 10 and 11 works the same, I would be in favor of following the behavior of others.
Flags: webcompat?
It has been fixed in Edge.
Robert : Do you think this bug is easy enough to fix that it could be a mentored bug?
Flags: needinfo?(longsonr)
Seems to be the same issue as bug 1357432 which already has a patch. Maybe just dup to that one.
Flags: needinfo?(longsonr)
Closed: 5 years ago5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1357432
You need to log in before you can comment on or make changes to this bug.