Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:41:38 +0000 (17:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Apr 2014 17:41:38 +0000 (17:41 +0000)
commitc2cd590be6cf67f9525678acdefb14d3077c6d6c
tree6180e08196d21ed1cbb4b20d70db80de39894d5f
parentc8a41b89f1b717a0135624b4e93b5cb4cd14c1e3
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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/html5lib/generated/run-ruby-data-expected.txt [new file with mode: 0644]
LayoutTests/html5lib/generated/run-ruby-data.html [new file with mode: 0644]
LayoutTests/html5lib/generated/run-ruby-write-expected.txt [new file with mode: 0644]
LayoutTests/html5lib/generated/run-ruby-write.html [new file with mode: 0644]
LayoutTests/html5lib/resources/ruby.dat [new file with mode: 0644]
LayoutTests/html5lib/resources/tests19.dat
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLTagNames.in
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp