Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement HTML spec change to Adoption Agency Algorithm to not revers…
…e the order of nodes in the document, by removing nodes that we're not recreating from the stack of open elements https://bugs.webkit.org/show_bug.cgi?id=119478 Reviewed by Chris Dumez. Implement the spec change. Also updated labeling of each line of code to match the latest spec. New behavior matches the spec and that of Firefox. * LayoutTests/html5lib/resources/webkit02.dat: Updated the expected parsing result to match the new behavior. * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_adoption01-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02-expected.txt: * Source/WebCore/html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::swapTo): * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Canonical link: https://commits.webkit.org/253505@main
- Loading branch information
Showing
6 changed files
with
45 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -154,8 +154,7 @@ div | ||
| <missing_glyph> | ||
| <hkern> | ||
| <aside> | ||
| <em> | ||
| <b> | ||
| <b> | ||
|
||
#data | ||
<option><XH<optgroup></optgroup> | ||
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 |
---|---|---|
@@ -1,31 +1,5 @@ | ||
html5lib Parser Test | ||
|
||
|
||
FAIL html5lib_innerHTML_adoption01.html 0bf80e1546d4c221354aa9734f61713b7d64ee6d assert_equals: expected "#document\n| <b>\n| <em>\n| <foo>\n| <foob>\n| <fooc>\n| <aside>\n| <b>" but got "#document\n| <b>\n| <em>\n| <foo>\n| <foob>\n| <fooc>\n| <aside>\n| <em>\n| <b>" | ||
0bf80e1546d4c221354aa9734f61713b7d64ee6d | ||
|
||
Input | ||
|
||
undefined | ||
Expected | ||
|
||
#document | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foob> | ||
| <fooc> | ||
| <aside> | ||
| <b> | ||
Actual | ||
|
||
|<div> | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foob> | ||
| <fooc> | ||
| <aside> | ||
| <em> | ||
| <b> | ||
PASS html5lib_innerHTML_adoption01.html 0bf80e1546d4c221354aa9734f61713b7d64ee6d | ||
|
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 |
---|---|---|
@@ -1,87 +1,7 @@ | ||
html5lib Parser Test | ||
|
||
|
||
FAIL html5lib_innerHTML_webkit02.html bafeef55f21b568ab89a91082464614e4ebe7c2f assert_equals: expected "#document\n| <b>\n| <em>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <aside>\n| <b>" but got "#document\n| <b>\n| <em>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <foo>\n| <aside>\n| <em>\n| <b>" | ||
FAIL html5lib_innerHTML_webkit02.html 9461cfc6d9d4f08b05b3a95bbe5baa264f868a44 assert_equals: expected "#document\n| <b>\n| <em>\n| <foo>\n| <foob>\n| <foob>\n| <foob>\n| <foob>\n| <fooc>\n| <fooc>\n| <fooc>\n| <fooc>\n| <food>\n| <aside>\n| <b>" but got "#document\n| <b>\n| <em>\n| <foo>\n| <foob>\n| <foob>\n| <foob>\n| <foob>\n| <fooc>\n| <fooc>\n| <fooc>\n| <fooc>\n| <food>\n| <aside>\n| <em>\n| <b>" | ||
PASS html5lib_innerHTML_webkit02.html bafeef55f21b568ab89a91082464614e4ebe7c2f | ||
PASS html5lib_innerHTML_webkit02.html 9461cfc6d9d4f08b05b3a95bbe5baa264f868a44 | ||
PASS html5lib_innerHTML_webkit02.html c2c4647447354abc154f1917a7fbefa4a679d5fb | ||
bafeef55f21b568ab89a91082464614e4ebe7c2f | ||
|
||
Input | ||
|
||
undefined | ||
Expected | ||
|
||
#document | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <aside> | ||
| <b> | ||
Actual | ||
|
||
|<div> | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <foo> | ||
| <aside> | ||
| <em> | ||
| <b> | ||
9461cfc6d9d4f08b05b3a95bbe5baa264f868a44 | ||
|
||
Input | ||
|
||
undefined | ||
Expected | ||
|
||
#document | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foob> | ||
| <foob> | ||
| <foob> | ||
| <foob> | ||
| <fooc> | ||
| <fooc> | ||
| <fooc> | ||
| <fooc> | ||
| <food> | ||
| <aside> | ||
| <b> | ||
Actual | ||
|
||
|<div> | ||
| <b> | ||
| <em> | ||
| <foo> | ||
| <foob> | ||
| <foob> | ||
| <foob> | ||
| <foob> | ||
| <fooc> | ||
| <fooc> | ||
| <fooc> | ||
| <fooc> | ||
| <food> | ||
| <aside> | ||
| <em> | ||
| <b> | ||
|
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