W3C home > Mailing lists > Public > public-html@w3.org > April 2012

[Bug 16845] New: Some algorithms in the HTML Parser must also override the "reset the form owner" (e.g., Adoption Agency algorithm)

From: <bugzilla@jessica.w3.org>
Date: Tue, 24 Apr 2012 23:00:07 +0000
To: public-html@w3.org
Message-ID: <bug-16845-2495@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16845

           Summary: Some algorithms in the HTML Parser must also override
                    the "reset the form owner" (e.g., Adoption Agency
                    algorithm)
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: travil@microsoft.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org, tross@microsoft.com


We traced a real-world site issue [1] to an ambiguity in the HTML5 parsing spec
regarding the magical "form owner". For a refresher, the HTML5 spec says:

4.10.18 >

| When a form-associated element's ancestor chain changes, e.g. because
| it or one of its ancestors was inserted or removed from a Document, 
| then the user agent must reset the form owner of that element. The 
| HTML parser overrides this requirement when inserting form controls.

...so, DOM operations that move elements around should reset the form owner.
Cool. So, then what's the caveot with the HTML parser? It's here:

8.2.5.1 >

| If an element created by the insert an HTML element algorithm is a 
| form-associated element, and the form element pointer is not null, 
| and the newly created element doesn't have a form attribute, the 
| user agent must associate the newly created element with the form 
| element pointed to by the form element pointer when the element is 
| inserted, instead of running the reset the form owner algorithm.

...OK. This only identifies the "insert an HTML element algorithm" as meeting
this requirement. This is what IE10 implemented. However, it turns out that the
above exception is too narrow. 

4.10.18 should add that any algorithm employed by the HTML5 parser (such as the
Adoption Agency algorithm), also overrides this behavior. Suggested text for
the note:

"Note: The HTML parser overrides this requirement when inserting *or
re-arranging* form controls, such as in the Adoption Agency algorithm."

The modified note above appears to match the behavior we are seeing currently
in Firefox and Chrome, and is compatible with existing web content.

[1] http://www.elightbulbs.com/shopping_cart_process.cfm?action=pre_checkout

-- 
Configure bugmail: https://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 Wednesday, 25 April 2012 10:45:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:31 UTC