Minefields "<a>1<button>2</a>3</button>" behavior is wrong, update results
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: https://bugzilla.mozilla.org/show_bug.cgi?id=578568
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 coalesced.
Ahha. The spec has changed: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9496
See also: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9829
We need to implement this diff: http://html5.org/tools/web-apps-tracker?from=5031&to=5032
Created attachment 62232 [details] Patch
Comment on attachment 62232 [details] Patch 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.
I think we should track the spec. If the spec changes again, we can change the code again too.
Comment on attachment 62232 [details] Patch OK. There was talk of reverting this change in the spec... but we can always revert this revision too. Sigh.
Comment on attachment 62232 [details] Patch Clearing flags on attachment: 62232 Committed r63868: <http://trac.webkit.org/changeset/63868>
All reviewed patches have been landed. Closing bug.