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

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

Issue 2135203002: A frameset tag inside template should be simply ignored. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/resources/frameset-inside-template.html ('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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 return; 923 return;
924 } 924 }
925 m_tree.reconstructTheActiveFormattingElements(); 925 m_tree.reconstructTheActiveFormattingElements();
926 m_tree.insertHTMLElement(token); 926 m_tree.insertHTMLElement(token);
927 } 927 }
928 928
929 void HTMLTreeBuilder::processTemplateStartTag(AtomicHTMLToken* token) 929 void HTMLTreeBuilder::processTemplateStartTag(AtomicHTMLToken* token)
930 { 930 {
931 m_tree.activeFormattingElements()->appendMarker(); 931 m_tree.activeFormattingElements()->appendMarker();
932 m_tree.insertHTMLElement(token); 932 m_tree.insertHTMLElement(token);
933 m_framesetOk = false;
933 m_templateInsertionModes.append(TemplateContentsMode); 934 m_templateInsertionModes.append(TemplateContentsMode);
934 setInsertionMode(TemplateContentsMode); 935 setInsertionMode(TemplateContentsMode);
935 } 936 }
936 937
937 bool HTMLTreeBuilder::processTemplateEndTag(AtomicHTMLToken* token) 938 bool HTMLTreeBuilder::processTemplateEndTag(AtomicHTMLToken* token)
938 { 939 {
939 ASSERT(token->name() == templateTag.localName()); 940 ASSERT(token->name() == templateTag.localName());
940 if (!m_tree.openElements()->hasTemplateInHTMLScope()) { 941 if (!m_tree.openElements()->hasTemplateInHTMLScope()) {
941 ASSERT(m_templateInsertionModes.isEmpty() || (m_templateInsertionModes.s ize() == 1 && isHTMLTemplateElement(m_fragmentContext.contextElement()))); 942 ASSERT(m_templateInsertionModes.isEmpty() || (m_templateInsertionModes.s ize() == 1 && isHTMLTemplateElement(m_fragmentContext.contextElement())));
942 parseError(token); 943 parseError(token);
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
2820 ASSERT(m_isAttached); 2821 ASSERT(m_isAttached);
2821 // Warning, this may detach the parser. Do not do anything else after this. 2822 // Warning, this may detach the parser. Do not do anything else after this.
2822 m_tree.finishedParsing(); 2823 m_tree.finishedParsing();
2823 } 2824 }
2824 2825
2825 void HTMLTreeBuilder::parseError(AtomicHTMLToken*) 2826 void HTMLTreeBuilder::parseError(AtomicHTMLToken*)
2826 { 2827 {
2827 } 2828 }
2828 2829
2829 } // namespace blink 2830 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/parser/resources/frameset-inside-template.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698