[Webkit-unassigned] [Bug 269522] Align URL Processing rules for SVG

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 3 17:23:45 PST 2024


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

Karl Dubost <karlcow at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |BrowserCompat

--- Comment #2 from Karl Dubost <karlcow at apple.com> ---
For example for test
http://wpt.live/svg/linking/reftests/url-processing-invalid-base.svg

An base which can't be resolved is defined in:
  <html:base href="invalid:" />

Then a gradient is defined with and id p2

  <linearGradient id="p2">
    <stop stop-color="orange"/>
  </linearGradient>

which is called as #p2 aka invalid:#p2
  <linearGradient id="p" href="#p2"/>


  <rect width="100" height="100" fill="red"/>

And then called in URL here by referring to #p
   <rect width="100" height="100" fill="url(#p) green"/>

There are two methods in 
https://searchfox.org/wubkat/rev/98f0251a08ba2c2bbba7e3750d2c68cfec14e975/Source/WebCore/svg/SVGURIReference.cpp#63-111

one is checking for the baseURL, the other is not.
* AtomString SVGURIReference::fragmentIdentifierFromIRIString(const String& url, const Document& document) {}
* auto SVGURIReference::targetElementFromIRIString(const String& iri, const TreeScope& treeScope, RefPtr<Document> externalDocument) -> TargetElementResult {}

linearGradient is calling targetElementFromIRIString
https://searchfox.org/wubkat/source/Source/WebCore/svg/SVGLinearGradientElement.cpp#155

-- 
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/20240304/f9f82943/attachment.htm>


More information about the webkit-unassigned mailing list