Bug 42233 - HTMLTreeBuilder needs to update to match new spec behavior for <button>
Summary: HTMLTreeBuilder needs to update to match new spec behavior for <button>
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
Depends on:
Blocks: 41123
  Show dependency treegraph
Reported: 2010-07-13 22:24 PDT by Eric Seidel (no email)
Modified: 2010-07-21 18:01 PDT (History)
2 users (show)

See Also:

Patch (11.41 KB, patch)
2010-07-21 14:47 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-07-13 22:24:56 PDT
Minefields "<a>1<button>2</a>3</button>" behavior is wrong, update results
Comment 1 Eric Seidel (no email) 2010-07-13 22:28:50 PDT
Actually,  I now realize that the LegacyHTMLTreeBuilder matches minefield's behavior.  Maybe I read the HTML5 spec wrong?

I've filed a bug with Mozilla:
Comment 2 Eric Seidel (no email) 2010-07-13 22:32:04 PDT
I'm still pretty certain that Minefield's behavior violates HTML5.

As far as I can tell, when you hit the </a> the adoption agency
algorithm does not run because of:

"If there is no such node, or, if that node is also in the stack of
open elements but the element is not in scope, then this is a parse
error; ignore the token, and abort these steps."

There is an <a> in the open elements, but its not in scope, because
<button> is a scope marker.

So the </a> is just ignored, and the 3 ends up inside <button> and is
Comment 3 Eric Seidel (no email) 2010-07-13 22:33:04 PDT
Ahha.  The spec has changed:
Comment 4 Eric Seidel (no email) 2010-07-13 22:34:14 PDT
See also:
Comment 5 Eric Seidel (no email) 2010-07-13 22:50:01 PDT
We need to implement this diff:
Comment 6 Adam Barth 2010-07-21 14:47:33 PDT
Created attachment 62232 [details]
Comment 7 Eric Seidel (no email) 2010-07-21 15:46:33 PDT
Comment on attachment 62232 [details]

There was discussion between Henri and Ian just today about rolling out this spec change, making me wary of trying to do anything here yet.
Comment 8 Adam Barth 2010-07-21 15:55:31 PDT
I think we should track the spec.  If the spec changes again, we can change the code again too.
Comment 9 Eric Seidel (no email) 2010-07-21 17:31:02 PDT
Comment on attachment 62232 [details]

OK.  There was talk of reverting this change in the spec... but we can always revert this revision too.  Sigh.
Comment 10 Adam Barth 2010-07-21 18:00:54 PDT
Comment on attachment 62232 [details]

Clearing flags on attachment: 62232

Committed r63868: <http://trac.webkit.org/changeset/63868>
Comment 11 Adam Barth 2010-07-21 18:01:01 PDT
All reviewed patches have been landed.  Closing bug.