[Webkit-unassigned] [Bug 232906] New: CSS variables in partial URLs are resolving to the current domain instead of the stylesheet's domain
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 9 14:33:13 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=232906
Bug ID: 232906
Summary: CSS variables in partial URLs are resolving to the
current domain instead of the stylesheet's domain
Product: WebKit
Version: Safari 15
Hardware: Unspecified
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dm at mahaffy.org
When using CSS variables to populate URLs with relative paths (i.e. "/myapp/gifs/happy.gif") and linking the stylesheet from a subdomain, WebKit is resolving the partial URL to the parent domain instead of the subdomain.
Per the W3 spec, the partial URL should be resolved according to the location of the stylesheet:
https://www.w3.org/TR/CSS1/#url
For example, if the stylesheet is located on www.mysite.com but it's being linked by a page in www.subsite.mysite.com, and the partial URL is "/myapp/gifs/happy.gif" I would expect the URL to resolve to "www.mysite.com/myapp/gifs/happy.gif" but WebKit is resolving it as "www.subsite.mysite.com/myapp/gifs.happy.gif"
An example page demonstrating this behavior:
https://qa.ea.financial-net.com/cssVarTest.html
The image appears correctly when opened in Chrome, Firefox, Brave, Opera, Edge on Windows or Android, but Safari does not display the image because the stylesheet and graphic are both on the qa.financial-net.com domain but WebKit is trying to pull the graphic from the qa.ea.financial-net.com domain.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211109/589ace68/attachment.htm>
More information about the webkit-unassigned
mailing list