Skip to content
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

Implement the <search> element #13887

Merged

Conversation

annevk
Copy link
Contributor

@annevk annevk commented May 15, 2023

de16e2b

Implement the <search> element
https://bugs.webkit.org/show_bug.cgi?id=254327
rdar://107175819

Reviewed by Tim Nguyen.

Adds the new HTML search element as specified in
whatwg/html#7320 Given the code changes are
minimal there is no preferences guard.

It doesn't address the unicode-bidi rendering requirements as they are
not addressed for many elements in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=256829

This change also syncs most of WPT html/syntax/parsing and adds
accessibility test coverage for the main element.

* LayoutTests/accessibility/roles-exposed.html:
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/Element.getElementsByTagName-foreign-02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/README:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html-integration-point.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=uri-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=write-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=write_single-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/math-parse03.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/test.js:
(test_fragment):
(convert_innerHTML):
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/w3c-import.log:
* LayoutTests/inspector/css/shadow-scoped-style-expected.txt:
* LayoutTests/platform/mac-wk1/accessibility/roles-exposed-expected.txt:
* LayoutTests/platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* LayoutTests/tests-options.json:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
* Source/WebCore/css/html.css:
(address, article, aside, div, footer, header, hgroup, main, nav, search, section):
(address, article, aside, div, footer, header, hgroup, main, nav, section): Deleted.
* Source/WebCore/html/HTMLTagNames.in:
* Source/WebCore/html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):

Canonical link: https://commits.webkit.org/264110@main

26e4ebf

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 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

@annevk annevk requested review from cdumez and rniwa as code owners May 15, 2023 17:09
@annevk annevk self-assigned this May 15, 2023
@annevk annevk added the DOM For bugs specific to XML/HTML DOM elements (including parsing). label May 15, 2023
@nt1m
Copy link
Member

nt1m commented May 15, 2023

Looks good to me, but I think someone from AX should sign off on the picked role

@twilco
Copy link
Contributor

twilco commented May 15, 2023

The role matches how we map role="search" which seems like the intention according to the spec, so looks good to me.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 15, 2023
Copy link
Contributor

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AX bits LGTM. Thanks.

@annevk annevk removed the merging-blocked Applied to prevent a change from being merged label May 16, 2023
@annevk annevk force-pushed the eng/Implement-the-search-element branch from a136b01 to 26e4ebf Compare May 16, 2023 07:27
@annevk annevk requested a review from patrickangle as a code owner May 16, 2023 07:27
@annevk annevk added the merge-queue Applied to send a pull request to merge-queue label May 16, 2023
https://bugs.webkit.org/show_bug.cgi?id=254327
rdar://107175819

Reviewed by Tim Nguyen.

Adds the new HTML search element as specified in
whatwg/html#7320. Given the code changes are
minimal there is no preferences guard.

It doesn't address the unicode-bidi rendering requirements as they are
not addressed for many elements in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=256829

This change also syncs most of WPT html/syntax/parsing and adds
accessibility test coverage for the main element.

* LayoutTests/accessibility/roles-exposed.html:
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/Element.getElementsByTagName-foreign-02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/README:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html-integration-point.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=uri-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=write-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=write_single-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tables01_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_template_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests20_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit01_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=uri-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=write-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02_run_type=write_single-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/math-parse03.html:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/test.js:
(test_fragment):
(convert_innerHTML):
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/w3c-import.log:
* LayoutTests/inspector/css/shadow-scoped-style-expected.txt:
* LayoutTests/platform/mac-wk1/accessibility/roles-exposed-expected.txt:
* LayoutTests/platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* LayoutTests/tests-options.json:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
* Source/WebCore/css/html.css:
(address, article, aside, div, footer, header, hgroup, main, nav, search, section):
(address, article, aside, div, footer, header, hgroup, main, nav, section): Deleted.
* Source/WebCore/html/HTMLTagNames.in:
* Source/WebCore/html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):

Canonical link: https://commits.webkit.org/264110@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Implement-the-search-element branch from 26e4ebf to de16e2b Compare May 16, 2023 12:02
@webkit-commit-queue
Copy link
Collaborator

Committed 264110@main (de16e2b): https://commits.webkit.org/264110@main

Reviewed commits have been landed. Closing PR #13887 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit de16e2b into WebKit:main May 16, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 16, 2023
@annevk annevk deleted the eng/Implement-the-search-element branch May 16, 2023 14:21
aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 16, 2023
This was added to the HTML spec here:
whatwg/html#7320

I mostly based on this on the webkit patch:
WebKit/WebKit#13887

Bug: 1294294
Change-Id: Ia34836f7e5172d862a3a1f24f1e5cbcbb10e6a55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4767222
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1184358}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOM For bugs specific to XML/HTML DOM elements (including parsing).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants