<?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>10331</bug_id>
          
          <creation_ts>2010-08-09 17:31:36 +0000</creation_ts>
          <short_desc>Clarify meaning of &quot;defined to contain a URL&quot; and &quot;defined to contain one or more URLs&quot;</short_desc>
          <delta_ts>2010-10-04 14:32:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#reflecting-content-attributes-in-idl-attributes</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37311</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-08-09 17:31:36 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#reflecting-content-attributes-in-idl-attributes

Comment:
What do &quot;defined to contain a URL&quot; and &quot;defined to contain one or more URLs&quot;
mean?  There are some cases that are unclear.  For instance, useMap can only
contain (a subset of) valid URLs AFAICT, does that count?  Also, obsolete
stuff like applet.src has no authoring conformance requirements, so it&apos;s not
defined to contain anything, there are only algorithms that tell you how to
treat it.  You should make this like &quot;limited to only known values&quot;, &quot;limited
to only non-negative numbers&quot;, etc., with explicit links wherever you mean it.

Posted from: 68.175.61.233</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37312</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-09 18:05:31 +0000</bug_when>
    <thetext>The behavior of longDesc is also unclear from the spec.  WebKit treats as a regular string, Gecko treats as a URL.  Same for object.code and applet.object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37366</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-11 21:53:15 +0000</bug_when>
    <thetext>Also for body.background, object.codeBase, applet.codeBase.  I created a test case to see how browsers treat them:

&lt;!doctype html&gt;
&lt;script&gt;
    var els = {
        &quot;body&quot;: [&quot;background&quot;],
        &quot;iframe&quot;: [&quot;longDesc&quot;],
        &quot;img&quot;: [&quot;longDesc&quot;],
        &quot;object&quot;: [&quot;code&quot;, &quot;codeBase&quot;],
        &quot;applet&quot;: [&quot;object&quot;, &quot;codeBase&quot;],
        &quot;frame&quot;: [&quot;longDesc&quot;]
    }
    var urls = [], strings = [];
    for (var elName in els) {
        for (var i = 0; i &lt; els[elName].length; i++) {
            var el = document.createElement(elName);
            el.setAttribute(els[elName][i], &quot;abcd&quot;);
            if (el[els[elName][i]] == &quot;abcd&quot;) {
                strings.push(elName + &quot;.&quot; + els[elName][i]);
            } else {
                urls.push(elName + &quot;.&quot; + els[elName][i]);
            }
        }
    }
    document.write(&quot;&lt;ul&gt;&lt;li&gt;urls: &quot; + urls.join(&quot;, &quot;) + &quot;&lt;li&gt;strings: &quot; + strings.join(&quot;, &quot;));
&lt;/script&gt;

Chrome/Safari:

* urls: img.longDesc
* strings: body.background, iframe.longDesc, object.code, object.codeBase, applet.object, applet.codeBase, frame.longDesc

Firefox:

* urls: body.background, iframe.longDesc, img.longDesc, object.code, object.codeBase, applet.object, applet.codeBase, frame.longDesc
* strings: 

Opera:

* urls: iframe.longDesc, img.longDesc, object.codeBase, applet.codeBase, frame.longDesc
* strings: body.background, object.code, applet.object

IE8 (applet.object gave some weird error and I had to comment it out):

* urls: body.background, iframe.longDesc, img.longDesc, object.codeBase, applet.codeBase, frame.longDesc
* strings: object.code

IE9PP4:
* urls: iframe.longDesc, img.longDesc, applet.object, applet.codeBase, frame.longDesc
* strings: body.background, object.code, object.codeBase

Probably no big deal whatever these end up being, but I&apos;d like some clarity before I file bugs against browsers, since some of these might be oversights in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38387</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-09-01 22:41:58 +0000</bug_when>
    <thetext>Note also that form.action is reflected as a string by all browsers other than IE, contrary to my expectations from reading the spec.  So this really has to be clarified.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39835</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-28 23:31:57 +0000</bug_when>
    <thetext>usemap isn&apos;t defined to take a URL, it&apos;s defined to take valid hash-name reference. That seems quite clear.

form.action is a URL (this is intentionally not like non-IE browsers, since IE&apos;s behaviour makes more sense).

The legacy ones are all plain text (not URLs), since none are defined to be URLs. This is explicitly stated for body.background for some reason, but it&apos;s true for all the others as well.

I would really rather not go through marking all the URL-reflecting IDL attributes explicitly, since that&apos;s just a huge pain and I&apos;m bound to make mistakes, both in doing it and later in maintaining it.

I&apos;d accept a patch against the &quot;source&quot; file, though, if you feel strongly about this and want to do it. Feel free to contact me on IRC if you need help with that.


EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Spec seems well-defined as is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40013</commentid>
    <comment_count>5</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-09-29 20:37:36 +0000</bug_when>
    <thetext>I&apos;ll mark this CLOSED, unless I find the time to write a patch.  I&apos;m going to file a new bug on some of these attributes, though.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>