<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16656</bug_id>
          
          <creation_ts>2007-12-28 21:57:39 -0800</creation_ts>
          <short_desc>Acid3 expects form.elements.length == form.elements</short_desc>
          <delta_ts>2007-12-28 22:43:36 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65554</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-28 21:57:39 -0800</bug_when>
    <thetext>// test 56: &lt;form&gt; and .elements
      var ok = false;
      test = document.getElementsByTagName(&apos;form&apos;)[0];
      if (// test.elements === test || // (IE would fail this, but HTML5 might require it)
          test.elements === test.getAttribute(&apos;elements&apos;) ||
          test.elements.length != 1 ||
          test.elements.length != test.elements)
        ok = false;
      if (ok)
        return 4;

The only part of that test that we fail is &quot;form.elements.length == form.elements&quot;

I&apos;m not sure why that would be expected.  I guess HTMLCollection is supposed to have a special toNumber implementation which returns the number of elements in the collection!?

It would be nice to see a spec to back up that claim.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65555</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-12-28 21:59:16 -0800</bug_when>
    <thetext>http://www.whatwg.org/specs/web-apps/current-work/#htmlcollection

makes no such reference to this expected toNumber implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65562</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2007-12-28 22:37:38 -0800</bug_when>
    <thetext>See this is why you shouldn&apos;t look at the test before it&apos;s ready. :-P

It was supposed to test form.elements.length == form.length. Fixed the test. :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>