HTML parser: allow <hr> to be used inside <select> as a separator#12407
Conversation
|
EWS run on previous version of this PR (hash 7fc5303) Details |
7fc5303 to
927f7bd
Compare
|
EWS run on previous version of this PR (hash 927f7bd) Details
|
|
Note: I plan to make the commit message reflect that the HTML standard has been updated and the tests are being upstreamed in html5lib/html5lib-tests#167, but I'm waiting with that as I don't want to let the bots run just for that. |
There was a problem hiding this comment.
Could/should it be an else if ?
There was a problem hiding this comment.
No, that would do the wrong thing. It's equivalent to the case just above this, except that it inserts a void element at the end.
Consider <select><optgroup><option><hr> (one of the tests as well). First <option> is the current item so you pop that off. Then <optgroup> is and you want to pop that off as well. Ultimately inserting <hr> as a child of <select>.
927f7bd to
5c5f004
Compare
|
EWS run on current version of this PR (hash 5c5f004) Details
|
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
5c5f004 to
d9e3a62
Compare
|
Committed 263624@main (d9e3a62): https://commits.webkit.org/263624@main Reviewed commits have been landed. Closing PR #12407 and removing active labels. |
As per whatwg/html#9124. Tests from WebKit/WebKit#12407.
This is based on this webkit patch: WebKit/WebKit#12407 https://chromestatus.com/feature/6198448366026752 Bug: 1441883 Change-Id: I47d208edd9367c89bf85fb366c3163094669a286 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4875298 Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1199621}
d9e3a62
5c5f004
🧪 style🛠 ios🛠 mac🛠 wpe🛠 wincairo🧪 bindings🛠 ios-sim🛠 mac-AS-debug🧪 wpe-wk2🧪 webkitperl🧪 ios-wk2🧪 api-mac🛠 gtk🧪 ios-wk2-wpt🧪 mac-wk1🧪 gtk-wk2🧪 api-ios🧪 mac-wk2🧪 api-gtk🛠 tv🧪 mac-AS-debug-wk2🛠 tv-sim🧪 mac-wk2-stress🛠 🧪 merge🛠 watch🛠 watch-sim