forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
48 changed files
with
402 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
12 changes: 12 additions & 0 deletions
12
...form-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
PASS <search> - display | ||
PASS <search> - margin-top | ||
PASS <search> - margin-right | ||
PASS <search> - margin-bottom | ||
PASS <search> - margin-left | ||
PASS <search> - padding-top | ||
PASS <search> - padding-right | ||
PASS <search> - padding-bottom | ||
PASS <search> - padding-left | ||
FAIL <search> - unicode-bidi assert_equals: expected "isolate" but got "normal" | ||
|
13 changes: 13 additions & 0 deletions
13
...html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
PASS Verify document.characterSet is ISO-8859-8 | ||
PASS <search> - display | ||
PASS <search> - margin-top | ||
PASS <search> - margin-right | ||
PASS <search> - margin-bottom | ||
PASS <search> - margin-left | ||
PASS <search> - padding-top | ||
PASS <search> - padding-right | ||
PASS <search> - padding-bottom | ||
PASS <search> - padding-left | ||
FAIL <search> - unicode-bidi assert_equals: expected "bidi-override" but got "normal" | ||
|
54 changes: 54 additions & 0 deletions
54
...m-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles-iso-8859-8.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!doctype html> | ||
<meta charset="ISO-8859-8"> | ||
<title>default styles for the search element, ISO-8859-8</title> | ||
<meta name="viewport" content="width=device-width"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/rendering/support/test-ua-stylesheet.js"></script> | ||
<style> | ||
/* Specify this bogus namespace, so the rules in this stylesheet only apply to the `fakeClone`d elements in #refs, not the HTML elements in #tests. */ | ||
@namespace url(urn:not-html); | ||
|
||
address, blockquote, center, dialog, div, figure, figcaption, footer, form, | ||
header, hr, legend, listing, main, p, plaintext, pre, search, xmp { | ||
display: block; | ||
} | ||
|
||
address, blockquote, center, div, figure, figcaption, footer, form, header, hr, | ||
legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, | ||
h3, h4, h5, h6, hgroup, nav, section, search, table, caption, colgroup, col, | ||
thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output, | ||
[dir=ltr i], [dir=rtl i], [dir=auto i], * /* only apply to the bogus namespace */ { | ||
unicode-bidi: bidi-override; | ||
} | ||
|
||
</style> | ||
|
||
<div id="log"></div> | ||
|
||
<div id="tests"> | ||
<search></search> | ||
</div> | ||
|
||
<div id="refs"></div> | ||
|
||
<script> | ||
test(() => { | ||
assert_equals(document.characterSet, "ISO-8859-8") | ||
}, "Verify document.characterSet is ISO-8859-8"); | ||
|
||
const props = [ | ||
'display', | ||
'margin-top', | ||
'margin-right', | ||
'margin-bottom', | ||
'margin-left', | ||
'padding-top', | ||
'padding-right', | ||
'padding-bottom', | ||
'padding-left', | ||
'unicode-bidi', | ||
]; | ||
runUAStyleTests(props); | ||
|
||
</script> |
49 changes: 49 additions & 0 deletions
49
...web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/search-styles.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!doctype html> | ||
<title>default styles for the search element</title> | ||
<meta name="viewport" content="width=device-width"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/html/rendering/support/test-ua-stylesheet.js"></script> | ||
<style> | ||
/* Specify this bogus namespace, so the rules in this stylesheet only apply to the `fakeClone`d elements in #refs, not the HTML elements in #tests. */ | ||
@namespace url(urn:not-html); | ||
|
||
address, blockquote, center, dialog, div, figure, figcaption, footer, form, | ||
header, hr, legend, listing, main, p, plaintext, pre, search, xmp { | ||
display: block; | ||
} | ||
|
||
address, blockquote, center, div, figure, figcaption, footer, form, header, hr, | ||
legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, | ||
h3, h4, h5, h6, hgroup, nav, section, search, table, caption, colgroup, col, | ||
thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output, | ||
[dir=ltr i], [dir=rtl i], [dir=auto i] { | ||
unicode-bidi: isolate; | ||
} | ||
|
||
</style> | ||
|
||
<div id="log"></div> | ||
|
||
<div id="tests"> | ||
<search></search> | ||
</div> | ||
|
||
<div id="refs"></div> | ||
|
||
<script> | ||
const props = [ | ||
'display', | ||
'margin-top', | ||
'margin-right', | ||
'margin-bottom', | ||
'margin-left', | ||
'padding-top', | ||
'padding-right', | ||
'padding-bottom', | ||
'padding-left', | ||
'unicode-bidi', | ||
]; | ||
runUAStyleTests(props); | ||
|
||
</script> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
5 changes: 5 additions & 0 deletions
5
...orted/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
html5lib Parser Test | ||
|
||
|
||
PASS html5lib_innerHTML_template.html 64d3e0e4395745b6ea928e5f5cf888bf675a598b | ||
|
25 changes: 25 additions & 0 deletions
25
...ests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_template.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf8"> | ||
<title>HTML 5 Parser tests html5lib_innerHTML_template.html</title> | ||
<meta name="timeout" content="long"> | ||
</head> | ||
<body> | ||
<h1>html5lib Parser Test</h1> | ||
<div id="log"></div> | ||
<script src="common.js"></script> | ||
<script src="test.js"></script> | ||
<script src="template.js"></script> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
var num_iframes = 8; | ||
var order = ['64d3e0e4395745b6ea928e5f5cf888bf675a598b',]; | ||
var tests = { | ||
"64d3e0e4395745b6ea928e5f5cf888bf675a598b":[async_test('html5lib_innerHTML_template.html 64d3e0e4395745b6ea928e5f5cf888bf675a598b'), "%3Ctemplate%3E%3Cform%3E%3Cinput%20name%3D%22q%22%3E%3C/form%3E%3Cdiv%3Esecond%3C/div%3E%3C/template%3E", "%23document%0A%7C%20%3Ctemplate%3E%0A%7C%20%20%20content%0A%7C%20%20%20%20%20%3Cform%3E%0A%7C%20%20%20%20%20%20%20%3Cinput%3E%0A%7C%20%20%20%20%20%20%20%20%20name%3D%22q%22%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%22second%22", 'template'], | ||
} | ||
init_tests("innerHTML"); | ||
</script> | ||
</body> | ||
</html> |
1 change: 1 addition & 0 deletions
1
...orted/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02-expected.txt
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_search-element.html
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf8"> | ||
<title>HTML 5 Parser tests html5lib_search-element.html</title> | ||
<meta name="timeout" content="long"> | ||
<meta name="variant" content="?run_type=uri"> | ||
<meta name="variant" content="?run_type=write"> | ||
<meta name="variant" content="?run_type=write_single"> | ||
</head> | ||
<body> | ||
<h1>html5lib Parser Test</h1> | ||
<div id="log"></div> | ||
<script src="common.js"></script> | ||
<script src="test.js"></script> | ||
<script src="template.js"></script> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
var num_iframes = 8; | ||
var order = ['114b9f3c8147c0ed8ef3ed1811a9da3f10d74402','2204afb9037ec886f428ab5dcead5ee9f87c65cb','5153f797fbb63a23a40d19e298aca06d53d22f7f',]; | ||
var tests = { | ||
"114b9f3c8147c0ed8ef3ed1811a9da3f10d74402":[async_test('html5lib_search-element.html 114b9f3c8147c0ed8ef3ed1811a9da3f10d74402'), "%3C%21doctype%20html%3E%3Cp%3Efoo%3Csearch%3Ebar%3Cp%3Ebaz", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Csearch%3E%0A%7C%20%20%20%20%20%20%20%22bar%22%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22baz%22"],"2204afb9037ec886f428ab5dcead5ee9f87c65cb":[async_test('html5lib_search-element.html 2204afb9037ec886f428ab5dcead5ee9f87c65cb'), "%3C%21doctype%20html%3E%3Csearch%3E%3Cp%3Efoo%3C/search%3Ebar", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csearch%3E%0A%7C%20%20%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%22bar%22"],"5153f797fbb63a23a40d19e298aca06d53d22f7f":[async_test('html5lib_search-element.html 5153f797fbb63a23a40d19e298aca06d53d22f7f'), "%3C%21DOCTYPE%20html%3Exxx%3Csvg%3E%3Cx%3E%3Cg%3E%3Ca%3E%3Csearch%3E%3Cb%3E", "%23document%0A%7C%20%3C%21DOCTYPE%20html%3E%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22xxx%22%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20x%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20g%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20a%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20search%3E%0A%7C%20%20%20%20%20%3Cb%3E"], | ||
} | ||
init_tests(get_type()); | ||
</script> | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
.../web-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=uri-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html5lib Parser Test | ||
|
||
|
||
PASS html5lib_search-element.html 114b9f3c8147c0ed8ef3ed1811a9da3f10d74402 | ||
PASS html5lib_search-element.html 2204afb9037ec886f428ab5dcead5ee9f87c65cb | ||
PASS html5lib_search-element.html 5153f797fbb63a23a40d19e298aca06d53d22f7f | ||
|
7 changes: 7 additions & 0 deletions
7
...eb-platform-tests/html/syntax/parsing/html5lib_search-element_run_type=write-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html5lib Parser Test | ||
|
||
|
||
PASS html5lib_search-element.html 114b9f3c8147c0ed8ef3ed1811a9da3f10d74402 | ||
PASS html5lib_search-element.html 2204afb9037ec886f428ab5dcead5ee9f87c65cb | ||
PASS html5lib_search-element.html 5153f797fbb63a23a40d19e298aca06d53d22f7f | ||
|
7 changes: 7 additions & 0 deletions
7
...form-tests/html/syntax/parsing/html5lib_search-element_run_type=write_single-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html5lib Parser Test | ||
|
||
|
||
PASS html5lib_search-element.html 114b9f3c8147c0ed8ef3ed1811a9da3f10d74402 | ||
PASS html5lib_search-element.html 2204afb9037ec886f428ab5dcead5ee9f87c65cb | ||
PASS html5lib_search-element.html 5153f797fbb63a23a40d19e298aca06d53d22f7f | ||
|
Oops, something went wrong.