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

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

Issue 1291723004: Remove all support for <applet> handling in Chrome. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 3 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/HTMLStackItem.h ('k') | Source/core/html/parser/XSSAuditor.h » ('j') | 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 if (token->name() == nobrTag) { 745 if (token->name() == nobrTag) {
746 m_tree.reconstructTheActiveFormattingElements(); 746 m_tree.reconstructTheActiveFormattingElements();
747 if (m_tree.openElements()->inScope(nobrTag)) { 747 if (m_tree.openElements()->inScope(nobrTag)) {
748 parseError(token); 748 parseError(token);
749 processFakeEndTag(nobrTag); 749 processFakeEndTag(nobrTag);
750 m_tree.reconstructTheActiveFormattingElements(); 750 m_tree.reconstructTheActiveFormattingElements();
751 } 751 }
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() == embedTag
756 || token->name() == embedTag
757 || token->name() == objectTag) { 756 || token->name() == objectTag) {
758 if (!pluginContentIsAllowed(m_tree.parserContentPolicy())) 757 if (!pluginContentIsAllowed(m_tree.parserContentPolicy()))
759 return; 758 return;
760 } 759 }
761 if (token->name() == appletTag 760 if (token->name() == marqueeTag
762 || token->name() == marqueeTag
763 || token->name() == objectTag) { 761 || token->name() == objectTag) {
764 m_tree.reconstructTheActiveFormattingElements(); 762 m_tree.reconstructTheActiveFormattingElements();
765 m_tree.insertHTMLElement(token); 763 m_tree.insertHTMLElement(token);
766 m_tree.activeFormattingElements()->appendMarker(); 764 m_tree.activeFormattingElements()->appendMarker();
767 m_framesetOk = false; 765 m_framesetOk = false;
768 return; 766 return;
769 } 767 }
770 if (token->name() == tableTag) { 768 if (token->name() == tableTag) {
771 if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag) ) 769 if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag) )
772 processFakeEndTag(pTag); 770 processFakeEndTag(pTag);
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 m_tree.generateImpliedEndTags(); 1851 m_tree.generateImpliedEndTags();
1854 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) 1852 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name()))
1855 parseError(token); 1853 parseError(token);
1856 m_tree.openElements()->popUntilNumberedHeaderElementPopped(); 1854 m_tree.openElements()->popUntilNumberedHeaderElementPopped();
1857 return; 1855 return;
1858 } 1856 }
1859 if (isFormattingTag(token->name())) { 1857 if (isFormattingTag(token->name())) {
1860 callTheAdoptionAgency(token); 1858 callTheAdoptionAgency(token);
1861 return; 1859 return;
1862 } 1860 }
1863 if (token->name() == appletTag 1861 if (token->name() == marqueeTag
1864 || token->name() == marqueeTag
1865 || token->name() == objectTag) { 1862 || token->name() == objectTag) {
1866 if (!m_tree.openElements()->inScope(token->name())) { 1863 if (!m_tree.openElements()->inScope(token->name())) {
1867 parseError(token); 1864 parseError(token);
1868 return; 1865 return;
1869 } 1866 }
1870 m_tree.generateImpliedEndTags(); 1867 m_tree.generateImpliedEndTags();
1871 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name())) 1868 if (!m_tree.currentStackItem()->matchesHTMLTag(token->name()))
1872 parseError(token); 1869 parseError(token);
1873 m_tree.openElements()->popUntilPopped(token->name()); 1870 m_tree.openElements()->popUntilPopped(token->name());
1874 m_tree.activeFormattingElements()->clearToLastMarker(); 1871 m_tree.activeFormattingElements()->clearToLastMarker();
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 ASSERT(m_isAttached); 2801 ASSERT(m_isAttached);
2805 // Warning, this may detach the parser. Do not do anything else after this. 2802 // Warning, this may detach the parser. Do not do anything else after this.
2806 m_tree.finishedParsing(); 2803 m_tree.finishedParsing();
2807 } 2804 }
2808 2805
2809 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2806 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2810 { 2807 {
2811 } 2808 }
2812 2809
2813 } // namespace blink 2810 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLStackItem.h ('k') | Source/core/html/parser/XSSAuditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698