[Webkit-unassigned] [Bug 229917] Correctly support fragment-only URLs in CSS images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 15 18:25:52 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=229917

--- Comment #18 from Matt Woodrow <m_woodrow at apple.com> ---
Comment on attachment 444322
  --> https://bugs.webkit.org/attachment.cgi?id=444322
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444322&action=review

>> Source/WebCore/dom/Document.cpp:5606
>> +        return URL(URL(), url);
> 
> I think you are correct to say that it may be incorrect to have this here. We’ll need to see which regression tests fail.
> 
> Instead we may want to change CSSImageValue to use another function specific to CSS that adds this behavior and then calls through to Document::completeURL. I might put it in CSSParserContext as a static member function that takes a document, or somewhere else that CSSImageValue can find it. I think there are possibly other call sites like CSSCursorImageValue that may need the same code.

I'm not sure about CSSCursorImageValue, it looks like that's checking the 'href' attribute of an SVG cursor element and likely isn't covered by the css values spec.

How about a static 'should this string be kept as-is without resolving relative to the base url' static helper to CSSValue, and then have both the parser and CSSImageValue check that?

-- 
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/20211116/d41fef0d/attachment.htm>


More information about the webkit-unassigned mailing list