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

Side by Side Diff: Source/core/html/parser/HTMLTreeBuilder.cpp

Issue 419213002: [Not for review] Implement a <blink> tag in Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 m_tree.insertFormattingElement(token); 752 m_tree.insertFormattingElement(token);
753 return; 753 return;
754 } 754 }
755 if (token->name() == appletTag 755 if (token->name() == appletTag
756 || token->name() == embedTag 756 || token->name() == embedTag
757 || token->name() == objectTag) { 757 || token->name() == objectTag) {
758 if (!pluginContentIsAllowed(m_tree.parserContentPolicy())) 758 if (!pluginContentIsAllowed(m_tree.parserContentPolicy()))
759 return; 759 return;
760 } 760 }
761 if (token->name() == appletTag 761 if (token->name() == appletTag
762 || token->name() == blinkTag
762 || token->name() == marqueeTag 763 || token->name() == marqueeTag
763 || token->name() == objectTag) { 764 || token->name() == objectTag) {
764 m_tree.reconstructTheActiveFormattingElements(); 765 m_tree.reconstructTheActiveFormattingElements();
765 m_tree.insertHTMLElement(token); 766 m_tree.insertHTMLElement(token);
766 m_tree.activeFormattingElements()->appendMarker(); 767 m_tree.activeFormattingElements()->appendMarker();
767 m_framesetOk = false; 768 m_framesetOk = false;
768 return; 769 return;
769 } 770 }
770 if (token->name() == tableTag) { 771 if (token->name() == tableTag) {
771 if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag) ) 772 if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag) )
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) 1845 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name()))
1845 parseError(token); 1846 parseError(token);
1846 m_tree.openElements()->popUntilNumberedHeaderElementPopped(); 1847 m_tree.openElements()->popUntilNumberedHeaderElementPopped();
1847 return; 1848 return;
1848 } 1849 }
1849 if (isFormattingTag(token->name())) { 1850 if (isFormattingTag(token->name())) {
1850 callTheAdoptionAgency(token); 1851 callTheAdoptionAgency(token);
1851 return; 1852 return;
1852 } 1853 }
1853 if (token->name() == appletTag 1854 if (token->name() == appletTag
1855 || token->name() == blinkTag
1854 || token->name() == marqueeTag 1856 || token->name() == marqueeTag
1855 || token->name() == objectTag) { 1857 || token->name() == objectTag) {
1856 if (!m_tree.openElements()->inScope(token->name())) { 1858 if (!m_tree.openElements()->inScope(token->name())) {
1857 parseError(token); 1859 parseError(token);
1858 return; 1860 return;
1859 } 1861 }
1860 m_tree.generateImpliedEndTags(); 1862 m_tree.generateImpliedEndTags();
1861 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) 1863 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name()))
1862 parseError(token); 1864 parseError(token);
1863 m_tree.openElements()->popUntilPopped(token->name()); 1865 m_tree.openElements()->popUntilPopped(token->name());
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 ASSERT(m_isAttached); 2797 ASSERT(m_isAttached);
2796 // Warning, this may detach the parser. Do not do anything else after this. 2798 // Warning, this may detach the parser. Do not do anything else after this.
2797 m_tree.finishedParsing(); 2799 m_tree.finishedParsing();
2798 } 2800 }
2799 2801
2800 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2802 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2801 { 2803 {
2802 } 2804 }
2803 2805
2804 } // namespace blink 2806 } // namespace blink
OLDNEW
« Source/core/html/HTMLBlinkElement.js ('K') | « Source/core/html/parser/HTMLStackItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698