<?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>12945</bug_id>
          
          <creation_ts>2011-06-13 12:31:08 +0000</creation_ts>
          <short_desc>&quot;On setting, if the given element has an id attribute, then the content attribute must be set to the value of that id attribute. Otherwise, the IDL attribute must be set to the empty string.&quot; is strange and breaks reflection. If the given element isn&apos;t in</short_desc>
          <delta_ts>2011-09-22 23:46:45 +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>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>bugs</cc>
    
    <cc>ian</cc>
    
    <cc>jan.varga</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</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>49496</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-06-13 12:31:08 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#reflecting-content-attributes-in-idl-attributes

Comment:
&quot;On setting, if the given element has an id attribute, then the content
attribute must be set to the value of that id attribute. Otherwise, the IDL
attribute must be set to the empty string.&quot; is strange and breaks reflection.
If the given element isn&apos;t in document or is in different document, the
parameter != element.reflectedHTMLElementAttribute.

Posted from: 91.154.40.146
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110610 Firefox/7.0a1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49497</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-06-13 12:42:18 +0000</bug_when>
    <thetext>&quot;On setting, if the given element has an id attribute, then the content attribute must be set to the value of that id attribute. Otherwise, the IDL attribute must be set to the empty string.&quot; is strange and breaks reflection. If the given element isn&apos;t in document or is in different document, the parameter != element.reflectedHTMLElementAttribute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50154</commentid>
    <comment_count>2</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-06-23 12:36:40 +0000</bug_when>
    <thetext>HTMLElement reflection is actually not consistent.
In one hand, we have input.list that is readonly and the specs say we should set the id of the element in the content attribute then read the IDL attribute which returns the datalist element (if any).
In the other hand, we have element.contextMenu that takes an element and keeps it&apos;s id and return the given menu element (if any).

I think the second solution is bad because:
1. If you do:
element.contextMenu = foo;
element.contextMenu == foo;
This might be false if bar element if foo and bar share the same id and bar is before foo in the document.
2. If you do:
element.contextMenu = foo;
Then read element.getAttribute(&apos;contextmenu&apos;); the value you are going to read will not be foo at all. AFAIK, that&apos;s not common in attribute reflection.

I think the distinction between the content attribute and the IDL attribute with input.list is clever and makes thing clear. It might be annoying to change the value from a script but prevent this auto-magic craziness that happens with .centextMenu. In addition, it&apos;s consistent with other elements like the label element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53658</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:16:05 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55176</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-16 04:25:44 +0000</bug_when>
    <thetext>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: I think .list and .htmlFor are lame. They&apos;re not a big deal though since you&apos;re unlikely to want to dynamically change those things. The same is not true for .contextMenu, where it&apos;s quite plausible that you&apos;ll have multiple context menus. I only wish we could do it better, e.g. support out-of-document &lt;menu&gt;s or id-less menus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55213</commentid>
    <comment_count>5</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-08-16 09:06:13 +0000</bug_when>
    <thetext>This is a clear bug in attribute &quot;reflection&quot;.
Reopening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55653</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-23 05:05:15 +0000</bug_when>
    <thetext>Please explain what the bug is. I do not understand why you think it&apos;s a bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56263</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-04 03:32:51 +0000</bug_when>
    <thetext>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: Did Not Understand Request
Change Description: no spec change
Rationale: please see comment 6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56272</commentid>
    <comment_count>8</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-09-04 09:43:48 +0000</bug_when>
    <thetext>I would assume that after setting reflectedAttribute,
reflectedAttribute would give back the same element it was set to.
But that is not the case.

If reflectedAttribute would be set to element_in_some_other_document
element.reflectedAttribute would give back null or perhaps some
other element which has the same ID as element_in_some_other_document.

So, the spec should probably require that
when setting reflected attribute, the element which ID attribute is read
is in the same document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57099</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-21 20:06:09 +0000</bug_when>
    <thetext>Ah, ok. That seems reasonable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57208</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-22 23:45:51 +0000</bug_when>
    <thetext>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: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57209</commentid>
    <comment_count>11</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-22 23:46:45 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6568.
Check-in comment: Make HTMLElement-type reflecting IDL attributes only set the attribute if the element they&apos;re being set to would then match the attribute.
http://html5.org/tools/web-apps-tracker?from=6567&amp;to=6568</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>