<?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>13034</bug_id>
          
          <creation_ts>2011-06-23 19:27:32 +0000</creation_ts>
          <short_desc>Consider [TreatNullAs=EmptyString] for some reflected attributes</short_desc>
          <delta_ts>2011-10-04 18:25:08 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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 name="Aryeh Gregor">ayg</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>adrianba</cc>
    
    <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>cam</cc>
    
    <cc>hober0</cc>
    
    <cc>ian</cc>
    
    <cc>james</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>travil</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>50185</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-06-23 19:27:32 +0000</bug_when>
    <thetext>WebIDL now says that converting null to DOMString should result in &quot;null&quot; instead of &quot;&quot;.  This largely matches IE/Opera and contradicts Gecko/WebKit.  Usually it&apos;s a better idea to match Gecko/WebKit, but I assume there was some good reason for it.

However, IE9 converts the following reflected attributes to &quot;&quot; instead of &quot;null&quot;, so all browsers except Opera convert them to &quot;&quot;:

body.aLink
body.bgColor
body.link
body.text
body.vLink
#document.alinkColor (&lt;body alink&gt;)
#document.bgColor (&lt;body bgcolor&gt;)
#document.fgColor (&lt;body text&gt;)
#document.linkColor (&lt;body link&gt;)
#document.vlinkColor (&lt;body vlink&gt;)
font.color
frame.marginHeight
frame.marginWidth
hr.color
iframe.marginHeight
iframe.marginWidth
img.border
object.border
table.bgColor
table.cellPadding
table.cellSpacing
td.bgColor
th.bgColor
tr.bgColor

It would be more consistent to have these convert to &quot;null&quot; like everything else as the current spec requires, especially since the list is pretty short, but it wouldn&apos;t match browser behavior.  So I&apos;m just documenting the list in case we want to sacrifice some consistency in favor of better matching current reality, and add [TreatNullAs=EmptyString] to these.  I have no problem with a WONTFIX.

(Note: IE9 also treats null as an empty string for basefont.color, marquee.bgColor, and table.border.  But we&apos;d have no interop on those anyway: Gecko doesn&apos;t support the first two, and setting table.border to null or &quot;&quot; makes the attribute &quot;1&quot;; and WebKit unsets the DOM attribute of all three when you set the IDL attribute to null.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52525</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:02:17 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54526</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-10 01:13:49 +0000</bug_when>
    <thetext>Anyone have any opinion on this? How about moving the whole spec over to [TreatNullAs=EmptyString]? Why is the default to treat null as &quot;null&quot; rather than &quot;&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54585</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-08-10 09:23:57 +0000</bug_when>
    <thetext>Because it aligns with ES ToString. We want &quot;null&quot; unless compat dictates &quot;&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55609</commentid>
    <comment_count>4</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-08-22 20:43:32 +0000</bug_when>
    <thetext>I don&apos;t have a strong opinion. It&apos;s a pretty short list of mostly/only deprecated attributes.

We need to flip our default handling in Gecko and it&apos;d be interesting to see what would happen if we didn&apos;t add special handling for these attributes to see if something fails.

I&apos;d of course also love to hear from microsoft why they have these exceptions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57133</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-21 23:09:42 +0000</bug_when>
    <thetext>Adrian, do you have any input here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57521</commentid>
    <comment_count>6</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2011-09-29 20:56:07 +0000</bug_when>
    <thetext>I&apos;ve been meaning to do an exhaustive test of our DOM in order to document any exceptions we may have to the default null-&gt;&quot;null&quot; and undefined-&gt;&quot;undefined&quot; conversions... so thanks Aryeh!

These conversions (and APIs!) are carryovers from our classic behavior--I don&apos;t have any data on what the web compatibility story might be like for these. Considering that old versions of IE are probably the biggest consumer of these APIs from a compatibility standpoint, I think the safest approach for web compat is to simply call out each of these in HTML5 with the [TreatNullAs=EmptyString] annotation. As was said before, its a pretty short list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57528</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-29 22:11:52 +0000</bug_when>
    <thetext>Cool, thanks.

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>57532</commentid>
    <comment_count>8</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-29 22:33:21 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6600.
Check-in comment: Legacy IDL attribute compatibility WebIDL fix.
http://html5.org/tools/web-apps-tracker?from=6599&amp;to=6600</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57787</commentid>
    <comment_count>9</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-10-04 18:25:08 +0000</bug_when>
    <thetext>Tests updated:

http://dvcs.w3.org/hg/html/rev/1822fb46fc41</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>