Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 482373002: Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed TODO. Used HTMLUnknownElement. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLTreeBuilder.cpp
diff --git a/Source/core/html/parser/HTMLTreeBuilder.cpp b/Source/core/html/parser/HTMLTreeBuilder.cpp
index a79d14de285309ccdc727ae894e169da10b32c47..2c2bf920db72442114442757b0bc0a83ed71a16c 100644
--- a/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -867,7 +867,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken* token)
m_tree.insertHTMLElement(token);
return;
}
- if (token->name() == rpTag || token->name() == rtTag) {
+ if (token->name() == rbTag || token->name() == rtcTag) {
if (m_tree.openElements()->inScope(rubyTag.localName())) {
m_tree.generateImpliedEndTags();
if (!m_tree.currentStackItem()->hasTagName(rubyTag))
@@ -876,6 +876,15 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken* token)
m_tree.insertHTMLElement(token);
return;
}
+ if (token->name() == rtTag || token->name() == rpTag) {
+ if (m_tree.openElements()->inScope(rubyTag.localName())) {
+ m_tree.generateImpliedEndTagsWithExclusion(rtcTag.localName());
+ if (!m_tree.currentStackItem()->hasTagName(rubyTag) && !m_tree.currentStackItem()->hasTagName(rtcTag))
+ parseError(token);
+ }
+ m_tree.insertHTMLElement(token);
+ return;
+ }
if (token->name() == MathMLNames::mathTag.localName()) {
m_tree.reconstructTheActiveFormattingElements();
adjustMathMLAttributes(token);
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698