-
Notifications
You must be signed in to change notification settings - Fork 63
Incorrect expectations in tree-construction webkit02 tests #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Oh. Those tests. I remember them taking me quite a while to convince myself of their correctness. It looks like they're checking the interaction between the Noah's Ark clause (does |
The |
We have interop, and I'm pretty sure that's the key to working out what's going on. |
I've doen some calculations myself. Here is is the state when first entering the AAA with
Blink and WebKit limit the inner loop counter to 3. This is also true for the html5lib-python implementation. However, the current spec doesn't state this explicitly, at least not explicitly enough as it is the case for the outer loop So in this case the So the state directly after the inner loop is as follows:
and the DOM tree is untouched.
with the following tree:
with the following tree:
Notice the ordering of I have also tested the HTML snippet in Chrome, Safari & Firefox, all three produce this tree, i.e. As I see it, the spec is ambiguous when it comes to the inner loop handling. |
And for the sake of completeness: |
@RReverser or @zcorpan are probably much more able to address this than I am. |
Just re-checked @iabudiab's steps per spec and in parse5 - test's expected value is wrong. |
I don't see what in @iabudiab's explanation disproves what @gsnedders stated in #78 (comment). To me by the time the algorithm reaches FWIW, html5ever passes this test. |
In Gecko I get this tree for http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4199
i.e. no cc @hsivonen |
I feel like there was some change to the spec which caused fragmentation in results |
From #78 (comment) (@iabudiab)
You're saying that it doesn't get reached in Blink and WebKit because they break out of the loop when the inner loop counter is three, and hence that never gets hit? Given the spec doesn't have that breakout from the loop, it should therefore get removed, no? |
@inikulin whatwg/html@22ce3c31 is why WebKit/Blink/IE11/html5lib-python has that behaviour |
As far as I can tell, @iabudiab's proposed behaviour is what would be expected by the spec prior to whatwg/html@22ce3c31. (And hence why it matches WebKit/Blink/IE11/html5lib-python.) |
@gsnedders same in parse5 |
Edge matches IE11, FWIW. So is there agreement that that was a good spec change, and we should be filing bugs on WebKit/Blink/Edge/html5lib-python/parse5? Or do we want to align with the majority, revert the spec change, and file bugs on Gecko/html5ever? |
It would be nice to know motivation behind whatwg/html@22ce3c3 |
@domenic html5lib-python just has a generic "update to match the spec" issue (it hasn't been properly updated in a long time) :) @inikulin https://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0401.html |
@inikulin https://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0006.html which that is a response to gives more of it |
Notably, |
Well, I don't see a problem. With foster parenting you will have similar results: |
Reordering in tables is something that all browsers did pre-HTML5. Reordering for misnested formatting elements is not. Since it seems Gecko has successfully shipped the spec change, we should go ahead and implement it in the other browsers, too (unless we have data suggesting the new spec is less Web-compatible). The change in Gecko was https://bugzilla.mozilla.org/show_bug.cgi?id=901319 @travisleithead any update on this issue for Edge? re https://lists.w3.org/Archives/Public/public-html/2013Aug/0002.html |
So we have consensus that the tests are right v. the spec, and impls should change? Closing as a result. (If that understanding is wrong, feel free to reopen it. Or ping me if you can't.) |
This implements the specification change: whatwg/html@22ce3c31 Current implementation should pass all new html5lib test cases, including those from Blink, WebKit, and namespace sensitivity. See related: html5lib/html5lib-tests#78 https://bugzilla.mozilla.org/show_bug.cgi?id=901319 https://lists.w3.org/Archives/Public/public-html/2013Aug/0002.html https://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0401.html https://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0006.html
Mmm. The 2013 bug is likely gone with our old bug database. I opened an issue on our public tracker--you can monitor progress there: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9854392/ |
Correct if I'm wrong. I could prepare a PR, but wanted to verify this first.
I believe the expectations for the following tests (15, 16, 17 in webkit02) to be incorrect:
<b><em><foo><foo><foo><aside></b></em>
<b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>
<b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>
This
<b><em><foo><foo><foo><aside></b></em>
expects the following tree:but should expect:
The same is true for the other two tests, i.e. the
<b>
element, child of<aside>
, should have an<em>
after running the adoption agency algorithm.The text was updated successfully, but these errors were encountered: