-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
HTML Parser: confusion about adoption agency algorithm #9559
Comments
cc @whatwg/html-parser |
Chromium and html5lib both have a Do you have a test that shows different output between implementations here? |
Further steps at AAA call site, not in the AAA algorithm itself. See how it is implemented in Ladybird. No, I don't have a test. |
The relevant line for Firefox I think is |
If Chrome/html5lib behavior is the correct one, I propose to change the wording to:
I.e. swap "return" and "act as described..." This makes it much clearer what implementation is supposed to do. |
This might be a test for this:
If the remaining steps at the call site at https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody:adoption-agency-algorithm-3 are not run, then the second |
No, we need AAA step 4.3 to not find |
I believe this is the test (found by brute force): <object><a><p><a> Update: No, Ladybird tree is the same as Chrome: <html>
<head>
<body>
<object>
<a>
<p>
<a>
<a> |
If lexbor behavior is changed to match that of Ladybird, it still passes all the html5lib tests. If lexbor behavior is changed to match that of Chrome, it still passes all the html5lib tests. Lexbor author says that "for open tags ( So there might indeed be no difference between Ladybird and Chrome behavior, but this is not obvious at all. |
https://html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm
What exactly does this text mean:
What UA should do after executing steps in "any other end tag"?
Ladybird behaves like 1, Chrome and html5lib - like 2 (they call
any_other_end_tag
directly fromadoption_agency
). Firefox, gumbo, and lexbor don't callany_other_end_tag
at all (they ignore the return value ofadoption_agency
).The text was updated successfully, but these errors were encountered: