<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[167437] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/167437">167437</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-04-17 10:41:38 -0700 (Thu, 17 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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 &lt;kojishi@gmail.com&gt; 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</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshtml5libresourcestests19dat">trunk/LayoutTests/html5lib/resources/tests19.dat</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTagNamesin">trunk/Source/WebCore/html/HTMLTagNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLConstructionSitecpp">trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlparserHTMLTreeBuildercpp">trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshtml5libgeneratedrunrubydataexpectedtxt">trunk/LayoutTests/html5lib/generated/run-ruby-data-expected.txt</a></li>
<li><a href="#trunkLayoutTestshtml5libgeneratedrunrubydatahtml">trunk/LayoutTests/html5lib/generated/run-ruby-data.html</a></li>
<li><a href="#trunkLayoutTestshtml5libgeneratedrunrubywriteexpectedtxt">trunk/LayoutTests/html5lib/generated/run-ruby-write-expected.txt</a></li>
<li><a href="#trunkLayoutTestshtml5libgeneratedrunrubywritehtml">trunk/LayoutTests/html5lib/generated/run-ruby-write.html</a></li>
<li><a href="#trunkLayoutTestshtml5libresourcesrubydat">trunk/LayoutTests/html5lib/resources/ruby.dat</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/LayoutTests/ChangeLog        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-04-17  Koji Ishii  &lt;kojishi@gmail.com&gt;
+
+        Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
+        https://bugs.webkit.org/show_bug.cgi?id=131175
+
+        Reviewed by Darin Adler.
+
+        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
+
</ins><span class="cx"> 2014-04-17  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Don't skip inspector/dom/content-flow-list.html and inspector/dom/content-flow-content-removal.html.
</span></span></pre></div>
<a id="trunkLayoutTestshtml5libgeneratedrunrubydataexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/html5lib/generated/run-ruby-data-expected.txt (0 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/generated/run-ruby-data-expected.txt                                (rev 0)
+++ trunk/LayoutTests/html5lib/generated/run-ruby-data-expected.txt        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+../resources/ruby.dat: PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshtml5libgeneratedrunrubydatahtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/html5lib/generated/run-ruby-data.html (0 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/generated/run-ruby-data.html                                (rev 0)
+++ trunk/LayoutTests/html5lib/generated/run-ruby-data.html        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script&gt;
+var test_files = [ '../resources/ruby.dat' ]
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/dump-as-markup.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;window.forceDataURLs = true;&lt;/script&gt;
+&lt;script src=&quot;../resources/runner.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshtml5libgeneratedrunrubywriteexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/html5lib/generated/run-ruby-write-expected.txt (0 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/generated/run-ruby-write-expected.txt                                (rev 0)
+++ trunk/LayoutTests/html5lib/generated/run-ruby-write-expected.txt        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+../resources/ruby.dat: PASS
</ins></span></pre></div>
<a id="trunkLayoutTestshtml5libgeneratedrunrubywritehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/html5lib/generated/run-ruby-write.html (0 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/generated/run-ruby-write.html                                (rev 0)
+++ trunk/LayoutTests/html5lib/generated/run-ruby-write.html        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script&gt;
+var test_files = [ '../resources/ruby.dat' ]
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/dump-as-markup.js&quot;&gt;&lt;/script&gt;
+
+&lt;script src=&quot;../resources/runner.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshtml5libresourcesrubydat"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/html5lib/resources/ruby.dat (0 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/resources/ruby.dat                                (rev 0)
+++ trunk/LayoutTests/html5lib/resources/ruby.dat        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -0,0 +1,298 @@
</span><ins>+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rb&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|       &lt;rb&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rtc&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|       &lt;rtc&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rp&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|       &lt;rp&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;span&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|         &lt;span&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;rb&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|       &lt;rb&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;rtc&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|       &lt;rtc&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;rp&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|       &lt;rp&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;span&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|         &lt;span&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;rb&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|       &lt;rb&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;rt&gt;c&lt;rt&gt;d&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|         &lt;rt&gt;
+|           &quot;c&quot;
+|         &lt;rt&gt;
+|           &quot;d&quot;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;rtc&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|       &lt;rtc&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;rp&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|       &lt;rp&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;span&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|         &lt;span&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;rb&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|       &lt;rb&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;rtc&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|       &lt;rtc&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;rp&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|       &lt;rp&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;span&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|         &lt;span&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;&lt;rtc&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &lt;rtc&gt;
+|         &lt;ruby&gt;
+|           &quot;a&quot;
+|           &lt;rb&gt;
+|             &quot;b&quot;
+|           &lt;rt&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshtml5libresourcestests19dat"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/html5lib/resources/tests19.dat (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/html5lib/resources/tests19.dat        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/LayoutTests/html5lib/resources/tests19.dat        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -250,6 +250,65 @@
</span><span class="cx"> |         &lt;rt&gt;
</span><span class="cx"> 
</span><span class="cx"> #data
</span><ins>+&lt;html&gt;&lt;ruby&gt;a&lt;rb&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rb&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rp&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rp&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rt&gt;b&lt;rt&gt;&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rt&gt;
+|         &quot;b&quot;
+|       &lt;rt&gt;
+
+#data
+&lt;html&gt;&lt;ruby&gt;a&lt;rtc&gt;b&lt;rt&gt;c&lt;rb&gt;d&lt;/ruby&gt;&lt;/html&gt;
+#errors
+(1,6): expected-doctype-but-got-start-tag
+#document
+| &lt;html&gt;
+|   &lt;head&gt;
+|   &lt;body&gt;
+|     &lt;ruby&gt;
+|       &quot;a&quot;
+|       &lt;rtc&gt;
+|         &quot;b&quot;
+|         &lt;rt&gt;
+|           &quot;c&quot;
+|       &lt;rb&gt;
+|         &quot;d&quot;
+
+#data
</ins><span class="cx"> &lt;!doctype html&gt;&lt;math/&gt;&lt;foo&gt;
</span><span class="cx"> #errors
</span><span class="cx"> (1,27): expected-closing-tag-but-got-eof
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/Source/WebCore/ChangeLog        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-04-17  Koji Ishii  &lt;kojishi@gmail.com&gt;
+
+        Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
+        https://bugs.webkit.org/show_bug.cgi?id=131175
+
+        Reviewed by Darin Adler.
+
+        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.
+
</ins><span class="cx"> 2014-04-17  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Try to fix EFL and GTK builds.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTagNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTagNames.in (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTagNames.in        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/Source/WebCore/html/HTMLTagNames.in        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -100,8 +100,10 @@
</span><span class="cx"> pre
</span><span class="cx"> progress interfaceName=HTMLProgressElement, conditional=PROGRESS_ELEMENT, generateTypeHelpers
</span><span class="cx"> q interfaceName=HTMLQuoteElement
</span><ins>+rb interfaceName=HTMLElement
</ins><span class="cx"> rp interfaceName=HTMLElement
</span><span class="cx"> rt interfaceName=HTMLElement
</span><ins>+rtc interfaceName=HTMLElement
</ins><span class="cx"> ruby interfaceName=HTMLElement
</span><span class="cx"> s interfaceName=HTMLElement
</span><span class="cx"> samp interfaceName=HTMLElement
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLConstructionSitecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -64,8 +64,10 @@
</span><span class="cx">         || isHTMLOptionElement(item-&gt;node())
</span><span class="cx">         || isHTMLOptGroupElement(item-&gt;node())
</span><span class="cx">         || item-&gt;hasTagName(pTag)
</span><ins>+        || item-&gt;hasTagName(rbTag)
</ins><span class="cx">         || item-&gt;hasTagName(rpTag)
</span><del>-        || item-&gt;hasTagName(rtTag);
</del><ins>+        || item-&gt;hasTagName(rtTag)
+        || item-&gt;hasTagName(rtcTag);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool shouldUseLengthLimit(const ContainerNode* node)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlparserHTMLTreeBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (167436 => 167437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp        2014-04-17 17:37:40 UTC (rev 167436)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp        2014-04-17 17:41:38 UTC (rev 167437)
</span><span class="lines">@@ -876,7 +876,7 @@
</span><span class="cx">         m_tree.insertHTMLElement(token);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    if (token-&gt;name() == rpTag || token-&gt;name() == rtTag) {
</del><ins>+    if (token-&gt;name() == rbTag || token-&gt;name() == rpTag || token-&gt;name() == rtcTag) {
</ins><span class="cx">         if (m_tree.openElements()-&gt;inScope(rubyTag.localName())) {
</span><span class="cx">             m_tree.generateImpliedEndTags();
</span><span class="cx">             if (!m_tree.currentStackItem()-&gt;hasTagName(rubyTag))
</span><span class="lines">@@ -885,6 +885,15 @@
</span><span class="cx">         m_tree.insertHTMLElement(token);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><ins>+    if (token-&gt;name() == rtTag) {
+        if (m_tree.openElements()-&gt;inScope(rubyTag.localName())) {
+            m_tree.generateImpliedEndTagsWithExclusion(rtcTag.localName());
+            if (!m_tree.currentStackItem()-&gt;hasTagName(rubyTag) &amp;&amp; !m_tree.currentStackItem()-&gt;hasTagName(rtcTag))
+                parseError(token);
+        }
+        m_tree.insertHTMLElement(token);
+        return;
+    }
</ins><span class="cx">     if (token-&gt;name() == MathMLNames::mathTag.localName()) {
</span><span class="cx">         m_tree.reconstructTheActiveFormattingElements();
</span><span class="cx">         adjustMathMLAttributes(*token);
</span></span></pre>
</div>
</div>

</body>
</html>