Title: [287309] trunk
Revision
287309
Author
[email protected]
Date
2021-12-21 04:38:52 -0800 (Tue, 21 Dec 2021)

Log Message

<dialog> should generate implied end tags
https://bugs.webkit.org/show_bug.cgi?id=234442

Reviewed by Antti Koivisto.

See references to dialog in: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody

LayoutTests/imported/w3c:

* web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt:

Source/WebCore:

Test: web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
`<p>XXX<dialog></dialog>` turns into: `<p>XXX</p><dialog></dialog>`

(WebCore::HTMLTreeBuilder::processEndTagForInBody):
`<dialog><p>XXX</dialog>` turns into: `<dialog><p>XXX</p></dialog>`

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287308 => 287309)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-12-21 10:33:01 UTC (rev 287308)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-12-21 12:38:52 UTC (rev 287309)
@@ -1,3 +1,14 @@
+2021-12-21  Tim Nguyen  <[email protected]>
+
+        <dialog> should generate implied end tags
+        https://bugs.webkit.org/show_bug.cgi?id=234442
+
+        Reviewed by Antti Koivisto.
+
+        See references to dialog in: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody
+
+        * web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt:
+
 2021-12-21  Carlos Garcia Campos  <[email protected]>
 
         CSP: Include the sample in eval violation reports

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt (287308 => 287309)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt	2021-12-21 10:33:01 UTC (rev 287308)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt	2021-12-21 12:38:52 UTC (rev 287309)
@@ -13,8 +13,8 @@
 PASS html5lib_blocks.html 1394f443495c04661d70ec27e44d99e6fcb3b536
 PASS html5lib_blocks.html 9a977cfacba03a56f6ccd11dd6595a7fa65b3c3e
 PASS html5lib_blocks.html 284962aa35b722a4d05a22c264c0bbbc859f7d41
-FAIL html5lib_blocks.html 88dfa3115905b28f4086717b8d6547b8f88ee46a assert_equals: expected "#document\n| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n|     <dialog>\n|       \"bar\"\n|       <p>\n|         \"baz\"" but got "#document\n| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <p>\n|       \"foo\"\n|       <dialog>\n|         \"bar\"\n|     <p>\n|       \"baz\""
-FAIL html5lib_blocks.html d5e8a935c5b5c3723b77ff0a9079bbee3e8f02ad assert_equals: expected "#document\n| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dialog>\n|       <p>\n|         \"foo\"\n|     \"bar\"" but got "#document\n| <!DOCTYPE html>\n| <html>\n|   <head>\n|   <body>\n|     <dialog>\n|       <p>\n|         \"foobar\""
+PASS html5lib_blocks.html 88dfa3115905b28f4086717b8d6547b8f88ee46a
+PASS html5lib_blocks.html d5e8a935c5b5c3723b77ff0a9079bbee3e8f02ad
 PASS html5lib_blocks.html 6cb6f36b9c042e41b18967b46b068db7b36431ef
 PASS html5lib_blocks.html 68111d7cbc22fd47cbec6912d008ab93bc1719ec
 PASS html5lib_blocks.html 5ff74097bb1276f6d595d17674c04d2d9ba9a49a
@@ -49,61 +49,4 @@
 PASS html5lib_blocks.html 17f3861b008afd895cc5e642218d4aed099afc77
 PASS html5lib_blocks.html fe4badd0b7469c6ddb8cd243133f10ffd1b84814
 PASS html5lib_blocks.html b130e7f7a09b5516e13e281d577c5bcc1f56cb5d
-88dfa3115905b28f4086717b8d6547b8f88ee46a
 
-Input
-
-<!doctype html><p>foo<dialog>bar<p>baz
-Expected
-
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "foo"
-|     <dialog>
-|       "bar"
-|       <p>
-|         "baz"
-Actual
-
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "foo"
-|       <dialog>
-|         "bar"
-|     <p>
-|       "baz"
-d5e8a935c5b5c3723b77ff0a9079bbee3e8f02ad
-
-Input
-
-<!doctype html><dialog><p>foo</dialog>bar
-Expected
-
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <dialog>
-|       <p>
-|         "foo"
-|     "bar"
-Actual
-
-#document
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <dialog>
-|       <p>
-|         "foobar"
-

Modified: trunk/Source/WebCore/ChangeLog (287308 => 287309)


--- trunk/Source/WebCore/ChangeLog	2021-12-21 10:33:01 UTC (rev 287308)
+++ trunk/Source/WebCore/ChangeLog	2021-12-21 12:38:52 UTC (rev 287309)
@@ -1,3 +1,22 @@
+2021-12-21  Tim Nguyen  <[email protected]>
+
+        <dialog> should generate implied end tags
+        https://bugs.webkit.org/show_bug.cgi?id=234442
+
+        Reviewed by Antti Koivisto.
+
+        See references to dialog in: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody
+
+        Test: web-platform-tests/html/syntax/parsing/html5lib_blocks-expected.txt
+
+        * html/parser/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+        `<p>XXX<dialog></dialog>` turns into: `<p>XXX</p><dialog></dialog>`
+
+        (WebCore::HTMLTreeBuilder::processEndTagForInBody):
+        `<dialog><p>XXX</dialog>` turns into: `<dialog><p>XXX</p></dialog>`
+
+
 2021-12-21  Yusuke Suzuki  <[email protected]>
 
         [WTF] Remove RefCountedArray and use RefCountedFixedVector

Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (287308 => 287309)


--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp	2021-12-21 10:33:01 UTC (rev 287308)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp	2021-12-21 12:38:52 UTC (rev 287309)
@@ -612,6 +612,7 @@
         || token.name() == blockquoteTag
         || token.name() == centerTag
         || token.name() == detailsTag
+        || token.name() == dialogTag
         || token.name() == dirTag
         || token.name() == divTag
         || token.name() == dlTag
@@ -1725,6 +1726,7 @@
         || token.name() == buttonTag
         || token.name() == centerTag
         || token.name() == detailsTag
+        || token.name() == dialogTag
         || token.name() == dirTag
         || token.name() == divTag
         || token.name() == dlTag
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to