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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22096</bug_id>
          
          <creation_ts>2013-05-20 07:41:12 +0000</creation_ts>
          <short_desc>no one set URLQuery&apos;s url object</short_desc>
          <delta_ts>2014-01-14 11:14:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="NARUSE, Yui">naruse</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87903</commentid>
    <comment_count>0</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 07:41:12 +0000</bug_when>
    <thetext>Maybe this is intentional, on current spec no one set URLQuery&apos;s url object though it is not a public API.
set the input, Setting the search, and Setting the query looks need to set url object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87905</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 07:45:29 +0000</bug_when>
    <thetext>If you mean something other than http://url.spec.whatwg.org/#concept-uq-update could you please clarify.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87909</commentid>
    <comment_count>2</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 08:01:02 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; If you mean something other than
&gt; http://url.spec.whatwg.org/#concept-uq-update could you please clarify.

As far as I understand, current spec causes following situation:

    url = URL.new(&quot;http://example.com/?foo=bar&quot;)
    q = url.query
    q.get(&quot;foo&quot;) #=&gt; &quot;bar&quot;
    q.set(&quot;foo&quot;, &quot;blah&quot;)
    q.get(&quot;foo&quot;) #=&gt; &quot;blah&quot;
    q.url_object #=&gt; null
    url.href #=&gt; http://example.com/?foo=bar

I changed the URLQuery object, but original URL object is unchanged.
I felt this is odd.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87910</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 08:04:05 +0000</bug_when>
    <thetext>When you do set() the update steps are run and those update the associated url object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87912</commentid>
    <comment_count>4</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 08:28:25 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; When you do set() the update steps are run and those update the associated
&gt; url object.

It can get &quot;the associated url object&quot; from URL Query&apos;s url object.
But when URL Query&apos;s associated url object property is set?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87913</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-05-20 08:59:56 +0000</bug_when>
    <thetext>So url object of x is just defined as whatever object that has its query object set to x. It&apos;s mostly a convenience. I guess I could add a note to that effect once I think of what it should say.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87914</commentid>
    <comment_count>6</comment_count>
    <who name="NARUSE, Yui">naruse</who>
    <bug_when>2013-05-20 09:29:34 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; So url object of x is just defined as whatever object that has its query
&gt; object set to x. It&apos;s mostly a convenience. I guess I could add a note to
&gt; that effect once I think of what it should say.

You mean URLUtils and URL doesn&apos;t specify to set url object, but a browser may implement another object which sets the object x&apos;s url object?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89632</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-06-20 06:04:39 +0000</bug_when>
    <thetext>Your questions are hard to follow for me, but from what you say in comment 4 &quot;But when URL Query&apos;s associated url object property is set?&quot;

What the standard does is it defines this in English as follows: &quot;A URLQuery object has an associated /url object/ which is an object implementing URLUtils whose /query object/ is the URLQuery object, and null if there is no such object.&quot; So basically it does not have to be set, it will always be something. When you implement this you&apos;ll have to do this manually and there&apos;s a number of ways you can do that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>