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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/parser/HTMLConstructionSite.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 860 }
861 if (token->name() == optgroupTag || token->name() == optionTag) { 861 if (token->name() == optgroupTag || token->name() == optionTag) {
862 if (m_tree.currentStackItem()->hasTagName(optionTag)) { 862 if (m_tree.currentStackItem()->hasTagName(optionTag)) {
863 AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag.localName()); 863 AtomicHTMLToken endOption(HTMLToken::EndTag, optionTag.localName());
864 processEndTag(&endOption); 864 processEndTag(&endOption);
865 } 865 }
866 m_tree.reconstructTheActiveFormattingElements(); 866 m_tree.reconstructTheActiveFormattingElements();
867 m_tree.insertHTMLElement(token); 867 m_tree.insertHTMLElement(token);
868 return; 868 return;
869 } 869 }
870 if (token->name() == rpTag || token->name() == rtTag) { 870 if (token->name() == rbTag || token->name() == rtcTag) {
871 if (m_tree.openElements()->inScope(rubyTag.localName())) { 871 if (m_tree.openElements()->inScope(rubyTag.localName())) {
872 m_tree.generateImpliedEndTags(); 872 m_tree.generateImpliedEndTags();
873 if (!m_tree.currentStackItem()->hasTagName(rubyTag)) 873 if (!m_tree.currentStackItem()->hasTagName(rubyTag))
874 parseError(token); 874 parseError(token);
875 } 875 }
876 m_tree.insertHTMLElement(token); 876 m_tree.insertHTMLElement(token);
877 return; 877 return;
878 } 878 }
879 if (token->name() == rtTag || token->name() == rpTag) {
880 if (m_tree.openElements()->inScope(rubyTag.localName())) {
881 m_tree.generateImpliedEndTagsWithExclusion(rtcTag.localName());
882 if (!m_tree.currentStackItem()->hasTagName(rubyTag) && !m_tree.curre ntStackItem()->hasTagName(rtcTag))
883 parseError(token);
884 }
885 m_tree.insertHTMLElement(token);
886 return;
887 }
879 if (token->name() == MathMLNames::mathTag.localName()) { 888 if (token->name() == MathMLNames::mathTag.localName()) {
880 m_tree.reconstructTheActiveFormattingElements(); 889 m_tree.reconstructTheActiveFormattingElements();
881 adjustMathMLAttributes(token); 890 adjustMathMLAttributes(token);
882 adjustForeignAttributes(token); 891 adjustForeignAttributes(token);
883 m_tree.insertForeignElement(token, MathMLNames::mathmlNamespaceURI); 892 m_tree.insertForeignElement(token, MathMLNames::mathmlNamespaceURI);
884 return; 893 return;
885 } 894 }
886 if (token->name() == SVGNames::svgTag.localName()) { 895 if (token->name() == SVGNames::svgTag.localName()) {
887 m_tree.reconstructTheActiveFormattingElements(); 896 m_tree.reconstructTheActiveFormattingElements();
888 adjustSVGAttributes(token); 897 adjustSVGAttributes(token);
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
2796 ASSERT(m_isAttached); 2805 ASSERT(m_isAttached);
2797 // Warning, this may detach the parser. Do not do anything else after this. 2806 // Warning, this may detach the parser. Do not do anything else after this.
2798 m_tree.finishedParsing(); 2807 m_tree.finishedParsing();
2799 } 2808 }
2800 2809
2801 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2810 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2802 { 2811 {
2803 } 2812 }
2804 2813
2805 } // namespace blink 2814 } // namespace blink
OLDNEW
« 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