W3C home > Mailing lists > Public > public-html@w3.org > June 2011

[Bug 13034] New: Consider [TreatNullAs=EmptyString] for some reflected attributes

From: <bugzilla@jessica.w3.org>
Date: Thu, 23 Jun 2011 19:27:33 +0000
To: public-html@w3.org
Message-ID: <bug-13034-2495@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13034

           Summary: Consider [TreatNullAs=EmptyString] for some reflected
                    attributes
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: Simetrical+w3cbug@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


WebIDL now says that converting null to DOMString should result in "null"
instead of "".  This largely matches IE/Opera and contradicts Gecko/WebKit. 
Usually it'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 "" instead of
"null", so all browsers except Opera convert them to "":

body.aLink
body.bgColor
body.link
body.text
body.vLink
#document.alinkColor (<body alink>)
#document.bgColor (<body bgcolor>)
#document.fgColor (<body text>)
#document.linkColor (<body link>)
#document.vlinkColor (<body vlink>)
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 "null" like everything
else as the current spec requires, especially since the list is pretty short,
but it wouldn't match browser behavior.  So I'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'd have no interop on those anyway:
Gecko doesn't support the first two, and setting table.border to null or ""
makes the attribute "1"; and WebKit unsets the DOM attribute of all three when
you set the IDL attribute to null.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 23 June 2011 19:27:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:33 GMT