haikuwebkit/LayoutTests/html5lib/resources/ruby.dat

299 lines
4.3 KiB
Plaintext
Raw Permalink Normal View History

Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014 https://bugs.webkit.org/show_bug.cgi?id=131175 Patch by Koji Ishii <kojishi@gmail.com> on 2014-04-17 Reviewed by Darin Adler. Source/WebCore: Tests: html5lib/resources/ruby.dat html5lib/resources/tests19.dat This patch makes WebKit HTML parser to match to the tag omission rules of HTML5 CR Feb 2014: http://www.w3.org/TR/2014/CR-html5-20140204/syntax.html#syntax-tag-omission with the support for two new elements (rb, rtc) which were also defined in the spec: http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rb-element http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rtc-element to better support use cases presented by W3C I18N WG: http://www.w3.org/TR/ruby-use-cases/ * html/HTMLTagNames.in: rb and rtc added as HTMLElement interfaces. * html/parser/HTMLConstructionSite.cpp: (WebCore::hasImpliedEndTag): the spec says rb and rtc have implied end tags. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): rb and rtc added. rt excludes rtc from its implied end tags. LayoutTests: 25 new test cases in 2 test files imported from pull requests to html5lib-tests, with run- and expected-files generated. All new tests pass with the changes included in this patch. * html5lib/generated/run-ruby-data-expected.txt: Added. * html5lib/generated/run-ruby-data.html: Added (generated by generate-test-wrappers.py) * html5lib/generated/run-ruby-write-expected.txt: Added. * html5lib/generated/run-ruby-write.html: Added (generated by generate-test-wrappers.py) * html5lib/resources/ruby.dat: Added from https://github.com/darobin/html5lib-tests/pull/1 * html5lib/resources/tests19.dat: Updated from https://github.com/html5lib/html5lib-tests/pull/27 Canonical link: https://commits.webkit.org/149867@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-17 17:41:38 +00:00
#data
<html><ruby>a<rb>b<rb></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rb>
| "b"
| <rb>
#data
<html><ruby>a<rb>b<rt></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rb>
| "b"
| <rt>
#data
<html><ruby>a<rb>b<rtc></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rb>
| "b"
| <rtc>
#data
<html><ruby>a<rb>b<rp></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rb>
| "b"
| <rp>
#data
<html><ruby>a<rb>b<span></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rb>
| "b"
| <span>
#data
<html><ruby>a<rt>b<rb></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rt>
| "b"
| <rb>
#data
<html><ruby>a<rt>b<rt></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rt>
| "b"
| <rt>
#data
<html><ruby>a<rt>b<rtc></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rt>
| "b"
| <rtc>
#data
<html><ruby>a<rt>b<rp></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rt>
| "b"
| <rp>
#data
<html><ruby>a<rt>b<span></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rt>
| "b"
| <span>
#data
<html><ruby>a<rtc>b<rb></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rtc>
| "b"
| <rb>
#data
<html><ruby>a<rtc>b<rt>c<rt>d</ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rtc>
| "b"
| <rt>
| "c"
| <rt>
| "d"
#data
<html><ruby>a<rtc>b<rtc></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rtc>
| "b"
| <rtc>
#data
<html><ruby>a<rtc>b<rp></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rtc>
| "b"
| <rp>
Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014 https://bugs.webkit.org/show_bug.cgi?id=131175 Patch by Koji Ishii <kojishi@gmail.com> on 2014-04-17 Reviewed by Darin Adler. Source/WebCore: Tests: html5lib/resources/ruby.dat html5lib/resources/tests19.dat This patch makes WebKit HTML parser to match to the tag omission rules of HTML5 CR Feb 2014: http://www.w3.org/TR/2014/CR-html5-20140204/syntax.html#syntax-tag-omission with the support for two new elements (rb, rtc) which were also defined in the spec: http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rb-element http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rtc-element to better support use cases presented by W3C I18N WG: http://www.w3.org/TR/ruby-use-cases/ * html/HTMLTagNames.in: rb and rtc added as HTMLElement interfaces. * html/parser/HTMLConstructionSite.cpp: (WebCore::hasImpliedEndTag): the spec says rb and rtc have implied end tags. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): rb and rtc added. rt excludes rtc from its implied end tags. LayoutTests: 25 new test cases in 2 test files imported from pull requests to html5lib-tests, with run- and expected-files generated. All new tests pass with the changes included in this patch. * html5lib/generated/run-ruby-data-expected.txt: Added. * html5lib/generated/run-ruby-data.html: Added (generated by generate-test-wrappers.py) * html5lib/generated/run-ruby-write-expected.txt: Added. * html5lib/generated/run-ruby-write.html: Added (generated by generate-test-wrappers.py) * html5lib/resources/ruby.dat: Added from https://github.com/darobin/html5lib-tests/pull/1 * html5lib/resources/tests19.dat: Updated from https://github.com/html5lib/html5lib-tests/pull/27 Canonical link: https://commits.webkit.org/149867@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-17 17:41:38 +00:00
#data
<html><ruby>a<rtc>b<span></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rtc>
| "b"
| <span>
#data
<html><ruby>a<rp>b<rb></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rp>
| "b"
| <rb>
#data
<html><ruby>a<rp>b<rt></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rp>
| "b"
| <rt>
#data
<html><ruby>a<rp>b<rtc></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rp>
| "b"
| <rtc>
#data
<html><ruby>a<rp>b<rp></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rp>
| "b"
| <rp>
#data
<html><ruby>a<rp>b<span></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| "a"
| <rp>
| "b"
| <span>
#data
<html><ruby><rtc><ruby>a<rb>b<rt></ruby></ruby></html>
#errors
(1,6): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <ruby>
| <rtc>
| <ruby>
| "a"
| <rb>
| "b"
| <rt>