Skip to content

Support <hr>-in-<select>#167

Merged
annevk merged 1 commit into
html5lib:masterfrom
annevk:annevk/hr-in-select
May 3, 2023
Merged

Support <hr>-in-<select>#167
annevk merged 1 commit into
html5lib:masterfrom
annevk:annevk/hr-in-select

Conversation

@annevk

@annevk annevk commented May 2, 2023

Copy link
Copy Markdown
Contributor

annevk added a commit to whatwg/html that referenced this pull request May 2, 2023
This is a long-standing WebKit feature that regressed as part of the standardized HTML parser effort. This suggests bringing it back with optional semantics, but a mandatory HTML parser change.

The HTML parser change is not expected to be significant for existing content or XSS. When the feature is correctly used it will also not hurt HTML parsers that have not yet incorporated the change. I.e., it should be fully backwards compatible.

Tests: html5lib/html5lib-tests#167.

Fixes #3410.
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request May 3, 2023
https://bugs.webkit.org/show_bug.cgi?id=80686
rdar://107656886

Reviewed by Ryosuke Niwa.

Revive support in the HTML parser for <hr>-in-<select>, thereby making an existing UI feature much more accessible to web developers.

This reflects a recent change in the HTML Standard: whatwg/html#9124.

* LayoutTests/html5lib/resources/webkit02.dat:

These are being upstreamed via html5lib/html5lib-tests#167 and will then be incorporated into web-platform-tests.

* Source/WebCore/html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag):

Canonical link: https://commits.webkit.org/263624@main
@annevk

annevk commented May 3, 2023

Copy link
Copy Markdown
Contributor Author

@flavorjones do you want to push a fixup commit for the errors perhaps?

@flavorjones

Copy link
Copy Markdown
Contributor

@annevk Thanks for asking. I have to do some work on the gumbo parser to support #9124. I'll very likely get to it today, but if you'd like to merge this in the meantime I'm happy to submit a PR once I get there.

@annevk

annevk commented May 3, 2023

Copy link
Copy Markdown
Contributor Author

That works too. I'll merge this then.

@annevk annevk merged commit 55aa183 into html5lib:master May 3, 2023
@annevk annevk deleted the annevk/hr-in-select branch May 3, 2023 12:02
flavorjones added a commit to flavorjones/html5lib-tests that referenced this pull request May 3, 2023
flavorjones added a commit to sparklemotion/nokogiri that referenced this pull request May 3, 2023
Ms2ger pushed a commit that referenced this pull request May 3, 2023
flavorjones added a commit to sparklemotion/nokogiri that referenced this pull request May 3, 2023
txgk added a commit to gumbo-parser/gumbo-parser that referenced this pull request Aug 26, 2025
GerHobbelt pushed a commit to GerHobbelt/gumbo-parser that referenced this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants