<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140488</bug_id>
          
          <creation_ts>2015-01-14 20:02:21 -0800</creation_ts>
          <short_desc>WebKit ignores HTML &lt;base&gt; when resolving URIs like xlink:href=&quot;#foo&quot;, in SVG within HTML</short_desc>
          <delta_ts>2022-07-10 12:32:44 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=1121708</see_also>
    
    <see_also>http://code.google.com/p/chromium/issues/detail?id=449027</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=189499</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Holbert">dholbert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bbrinza</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1061464</commentid>
    <comment_count>0</comment_count>
      <attachid>244675</attachid>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2015-01-14 20:02:21 -0800</bug_when>
    <thetext>Created attachment 244675
testcase 1

STEPS TO REPRODUCE:
  View attached testcase.
(which is a slightly tweaked version of https://bug1121708.bugzilla.mozilla.org/attachment.cgi?id=8549260 )

EXPECTED RESULTS
  One blue rect.

ACTUAL RESULTS:
  Two blue rects.

Please use labels and text to provide additional information.
  The second blue rect is from a &lt;use&gt; element, with xlink:href=&quot;#original-rect&quot;. The problem is, there&apos;s a &lt;base&gt; element, which is supposed to set the base URL to be used when resolving relative URLs in attributes in the document (including this xlink:href attribute), as described at https://html.spec.whatwg.org/multipage/semantics.html#the-base-element

So, the xlink:href=&quot;#original-rect&quot; URL *should* be interpreted as &quot;/foo#original-rect&quot;, which doesn&apos;t resolve to anything (in this case), so nothing should show up.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1121708 for a discussion of how this works in Firefox. I&apos;m filing this bug here in the hopes of getting interoperability on this.


NOTE: I filed this on Blink here: https://code.google.com/p/chromium/issues/detail?id=449027

VERSION INFO:
WebKit version tested: Midori version 0.4.3, which reports itself as using &quot;WebKitGTK+&quot; version &quot;1.10.1 (2.4.6)&quot; (in about:version) 
I also tested Safari 8 on OS X Yosemite.  Same results in each. (and in Chrome)

Firefox matches my EXPECTED RESULTS.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1121708 for discussion on Firefox&apos;s behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1161875</commentid>
    <comment_count>1</comment_count>
    <who name="bbrinza@microsoft.com">bbrinza</who>
    <bug_when>2016-02-03 20:34:46 -0800</bug_when>
    <thetext>Blink bug was fixed and now the pages with &lt;base&gt; work interoperably in Edge, Chrome (canary) and Firefox, but not Safari/WebKit

This was resolved last August during Paris face to face SVG WG meeting - https://www.w3.org/2015/08/25-svg-minutes.html#item08</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1477303</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-11-10 12:17:18 -0800</bug_when>
    <thetext>This behavior was changed via https://github.com/w3c/svgwg/issues/61. CSS Values now has &lt;https://drafts.csswg.org/css-values/#local-urls&gt;:

&quot;When matching a url() with the local url flag set, ignore everything but the URL’s fragment, and resolve that fragment against the current document that relative URLs are resolved against.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881958</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-10 11:42:03 -0700</bug_when>
    <thetext>I am unable to get &quot;Expected Result&quot; based on attached test case in Safari 15.5 on macOS 12.4 and Safari Technical Preview 148 but the actual results (of two blue rects) is now consistent with other browsers (Chrome Canary 105 and Firefox Nightly 104).

Further, Comment 02 mentioned an update in Web-Spec, should this be marked as &quot;RESOLVED INVALID&quot; or &quot;RESOLVED CONFIGURATION CHANGED&quot;? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881968</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-10 12:32:44 -0700</bug_when>
    <thetext>Yeah, this is config changed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>244675</attachid>
            <date>2015-01-14 20:02:21 -0800</date>
            <delta_ts>2015-01-14 20:02:21 -0800</delta_ts>
            <desc>testcase 1</desc>
            <filename>testcase.html</filename>
            <type>text/html</type>
            <size>410</size>
            <attacher name="Daniel Holbert">dholbert</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCiAgPGhlYWQ+DQogICAgPGJhc2UgaHJlZj0iL2ZvbyIg
Lz4gICA8IS0tIFRoaXMgYmFzZSB0YWcuLi4gLS0+DQogIDwvaGVhZD4NCiAgPGJvZHk+DQogICAg
PHN2ZyB2aWV3Qm94PSIwIDAgNDAwIDEwMCI+DQogICAgICA8cmVjdCBpZD0ib3JpZ2luYWwtcmVj
dCINCiAgICAgICAgeD0iMTAwIiB5PSIyMCINCiAgICAgICAgd2lkdGg9IjUwIiBoZWlnaHQ9IjUw
Ig0KICAgICAgICBmaWxsPSIjMjllIiAvPg0KICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0t
IC4uLnNob3VsZCBoaWRlIHRoaXMgZWxlbWVudDogLS0+DQogICAgICA8dXNlIHhsaW5rOmhyZWY9
IiNvcmlnaW5hbC1yZWN0IiB4PSIxNTAiIHk9IjEwIiAvPg0KICAgIDwvc3ZnPg0KICA8L2JvZHk+
DQo8L2h0bWw+DQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>