<?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>10345</bug_id>
          
          <creation_ts>2010-08-11 04:38:51 +0000</creation_ts>
          <short_desc>hspace and vspace on HTMLImageElement are signed long in DOM 2 HTML.  Was there a good reason for the incompatible change to unsigned long?</short_desc>
          <delta_ts>2010-10-04 23:59:24 +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>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis</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>annevk</cc>
    
    <cc>ayg</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</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>37347</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-08-11 04:38:51 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis

Comment:
hspace and vspace on HTMLImageElement are signed long in DOM 2 HTML.  Was
there a good reason for the incompatible change to unsigned long?

Posted from: 71.178.154.231</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37363</commentid>
    <comment_count>1</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-11 20:16:44 +0000</bug_when>
    <thetext>*** Bug 9914 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37364</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-11 20:22:07 +0000</bug_when>
    <thetext>Also width on HTMLPreElement, and rowSpan/colSpan on HTMLTableCellElement, and hspace/vspace on various interfaces other than HTMLImageElement, and span on HTMLTableColElement, and cols/rows on HTMLTextAreaElement.  Those are all the ones I can see.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37438</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2010-08-16 07:54:57 +0000</bug_when>
    <thetext>What are they in implementations though? That is what matters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37441</commentid>
    <comment_count>4</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-08-16 10:50:33 +0000</bug_when>
    <thetext>They&apos;re signed long in Gecko.  See discussion:

https://bugzilla.mozilla.org/show_bug.cgi?id=586126</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39244</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-24 01:34:07 +0000</bug_when>
    <thetext>There are a number of other unsigned long attributes; the bug you linked to mentions that Gecko only has four. Are you sure the ones you mentioned are the only ones that need changing?

(The differences from DOM2 are completely unintentional; I just assumed these were unsigned instead of checking when I added them. My bad.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39468</commentid>
    <comment_count>6</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-09-26 12:08:27 +0000</bug_when>
    <thetext>I think those are all the cases for reflected attributes, yes.  IIRC, I used my reflection test suite to get the list in comment #2 (just seeing which tests Gecko failed), so I didn&apos;t look for other places where the types didn&apos;t match.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39469</commentid>
    <comment_count>7</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-09-26 12:09:53 +0000</bug_when>
    <thetext>(I mean, I looked for where Gecko failed and then confirmed that there was indeed a mismatch between HTML5 and DOM 2 HTML, I didn&apos;t just assume that Gecko must be right.  I did implicitly assume that Gecko doesn&apos;t match HTML5 anywhere that HTML5 disagrees with DOM 2 HTML, so if that&apos;s wrong the list might be incomplete.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39766</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-28 17:54:47 +0000</bug_when>
    <thetext>*** Bug 10344 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40459</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-01 18:55:59 +0000</bug_when>
    <thetext>Given:
   http://www.hixie.ch/tests/adhoc/dom/webidl/attributes/
   http://krijnhoetmer.nl/irc-logs/whatwg/20090714#l-102
...I&apos;m not really sure what it means, in practice, for an attribute to be signed or unsigned, from a historical perspective.

Given how bad the interop is here, I think it might be better to just go with sanity, which the spec, IMHO, is closer to than most browsers. In particular, I&apos;m not sure Gecko&apos;s behaviour here is necessarily more sensible than any other browser&apos;s. They&apos;re all pretty nutty.

However, I am very open to changing the spec here, if we know what we want to change it _to_. It&apos;s not clear to me that DOM2 HTML is any more sensible (or closer to interop) here than what we have here in DOM5 HTML.

Any opinions?

Maybe we should WONTFIX this overall bug and just consider changes on a per-attribute basis?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40515</commentid>
    <comment_count>10</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-10-03 16:23:32 +0000</bug_when>
    <thetext>Behavior when giving negative values for this sort of attribute is all over the place.  Some browsers clamp, some browsers wrap, some ignore out-of-range values, some do one thing sometimes and another thing other times.  The current spec seems sane to me: make them unsigned longs in the interface, and unsigned longs ignore out-of-range values in content attributes.  And the ones we don&apos;t want to be 0 also ignore a content attribute of 0.  (Not so sure about the reasonableness of throwing exceptions on IDL set, though, unless that consistently happens on out-of-range IDL sets.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40595</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-04 23:59:24 +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:

Ok.

As per the discussion above, I&apos;m rejecting this bug on the principle that in general we want the types to represent roughly what the allowed ranges are for the IDL attributes.

It&apos;s almost certainly the case that:

 * some IDL attributes have the wrong types, given this definition
 * the &quot;reflection&quot; rules are wrong, either on specific aspects (e.g. raising exceptions on certain cases), or for specific attributes (e.g. maybe some attributes need particular weird behaviours for compat).
 * some attributes have the wrong ranges.

Please file specific bugs if there are specific concerns like this. In particular there are three rationales that are IMHO strong here:

 1. Specific pages require specific behaviour (legacy content compatibility). Please cite URLs so I can look into what the constraints are when filing such bugs.

 2. What the spec says is illogical, and no known specific compatibility constraints exist, and there is no wide interop, so we can probably change the spec to be more logical.

 3. All (or most) of the browsers do the same thing on a specific case that the spec disagrees on.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>