You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm not sure what the best practice is for rebaselining errors, but for now I removed all errors from affected tests. There are probably errors in tests I didn't change which may need to be rebaselined as well.
FWIW when CI workflows are enabled, Nokogiri (downstream) tests will fail. I've started working on a branch with the proposed changes from whatwg/html#10557
It looks like Nokogiri is nesting one inside the other, and my spec/chromium change intentionally fully closes the outer select before inserting the new one, so yeah I think the test's assertion is correct.
It looks like Nokogiri is nesting one select inside the other
No, sorry, unless I'm misunderstanding your comment, this is not a correct description of what Nokogiri's parser is doing. Here's a more graphical representation of the tree from my previous comment:
body
├── select
│ └── b
│ └── option
└── b
└── select
└── option
I looked into why chromium is putting the b inside the select instead of the other way around, and i found that the tag in the test is what's making the difference - without it I am getting the same output as Nokogiri.
I verified that chromium does the same thing as Nokogiri when I comment out that call to the adoption agency algorithm.
There's a lot of steps in that algorithm and I'm having a hard time wrapping my head around it, but does Nokogiri have that call to the adoption agency algorithm too? Or perhaps the implementations of the algorithm are different?
Yes, Nokogiri's libgumbo has implemented the adoption agency algorithm, and I have confirmed that in these tests we are invoking it. It's helpful to know this is likely the source of the behavior difference, so I'll focus my efforts on making sure it matches the current spec (though I'll note it passes every other test in this suite ... 🤷).
will not trigger a parse-error-and-return, and the algorithm will continue. But selectis in the list now, and so the formatting element b is not in scope.
If I remove the select tag from the default scope tags in Nokogiri's libgumbo, then behavior matches the test (and presumably chromium).
I've got a patch to get the error messages to a point where libgumbo is passing, would you mind taking a look and potentially applying to this PR? (Renamed to .txt to get by the github attachment filter.)
This change was included in the parser spec changes but I forgot to add
it to the implementation. It was identified here:
html5lib/html5lib-tests#178
Change-Id: I13f7ba11dc2dda814e488829a05fe4ee7c670d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5948083
Commit-Queue: Joey Arhar
Reviewed-by: David Baron
Cr-Commit-Position: refs/heads/main@{#1375607}
html5lib/html5lib-tests#178
The proposal isn't merged yet, and the error codes are off. The forked
html5lib-tests makes it more complicated. I recommend to ditch the fork
of html5lib-tests and give up on standardizing errors.
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
…t>, a=testonly
Automatic update from web-platform-tests
Change parser behavior of
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
…t>, a=testonly
Automatic update from web-platform-tests
Change parser behavior of
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
…t>, a=testonly
Automatic update from web-platform-tests
Change parser behavior of
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
…t>, a=testonly
Automatic update from web-platform-tests
Change parser behavior of
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
…t>, a=testonly
Automatic update from web-platform-tests
Change parser behavior of
This patch makes the HTML parser convert nested tags into
instead of for backwards compatibility with
the old parser. This behavior will apply to any nested selects, such as
@josepharhar Twelve of the tests changed or added in the recent commits do not have the correct number of error messages in the test data.
I'm not sure if you wish to fix those up given the @untitaker feedback above, but if so here are the failures from the Nokogiri test suite. Please let me know if I can help format these for you.
nokogiri libgumbo error match failures
Finished in 1.434869s, 4618.5409 runs/s, 79923.6865 assertions/s.
1) Failure:
TestHtml5TreeConstructionTests2#test_37__script_on [test/html5/test_tree_construction.rb:131]:
Expected 2 errors for
This PR updates the tree-construction dat files for the HTML change which will allow additional tags within
:
whatwg/html#10557