<?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>144652</bug_id>
          
          <creation_ts>2015-05-05 18:34:24 -0700</creation_ts>
          <short_desc>baseURI getter returns bogus values in some cases</short_desc>
          <delta_ts>2022-07-30 13:24:10 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <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="Boris Zbarsky">bzbarsky</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1091980</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-05-05 18:34:24 -0700</bug_when>
    <thetext>Consider this web page:

  &lt;iframe&gt;&lt;/iframe&gt;
  &lt;script&gt;
    onload = function() {
      var doc = frames[0].document;
      doc.body.innerHTML = &apos;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&apos;
      alert(&quot;Document base URI: &quot; + doc.baseURI);
      alert(&quot;Anchor base URI: &quot; + doc.querySelector(&apos;a&apos;).baseURI);
      alert(&quot;Anchor href: &quot; + doc.querySelector(&apos;a&apos;).href);    }
  &lt;/script&gt;

This should alert the URI of the web page three times.  In Safari it instead alerts &quot;about:blank&quot;, &quot;null&quot;, and the URI of the web page, respectively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1091981</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-05-05 18:34:54 -0700</bug_when>
    <thetext>A live demo of this is available at http://jsfiddle.net/n0gdh5y4/5/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887854</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-30 07:16:54 -0700</bug_when>
    <thetext>Here are updated test results across all browsers (using test case from Comment 01):

*** Safari 15.6 on macOS 12.5 ***

JSFiddle changed to &quot;show&quot;:

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/light/

JSFiddle with &quot;show&quot; in URL (not Standalone but Editor mode):

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=

*** Chrome Canary 106 ***

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/light/

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=

*** Firefox Nightly 105 ***

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/light/
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/light/

Document base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor base URI: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=
Anchor href: https://fiddle.jshell.net/n0gdh5y4/5/show/?editor_console=

_______________

I think it was fixed along the way since, I don&apos;t see any &quot;about:blank&quot;, &quot;null&quot; etc. as mentioned from Comment 0. I think this can be marked as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887888</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-30 13:24:10 -0700</bug_when>
    <thetext>Nice. Thanks for testing!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>