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

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

Issue 202153005: Add isHTMLPlugInElement() helpers for consistency with other HTML elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep virtual function Created 6 years, 9 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/HTMLPlugInElement.h ('k') | Source/core/page/DragController.cpp » ('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 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 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 20 matching lines...) Expand all
31 #include "HTMLNames.h" 31 #include "HTMLNames.h"
32 #include "core/dom/Comment.h" 32 #include "core/dom/Comment.h"
33 #include "core/dom/DocumentFragment.h" 33 #include "core/dom/DocumentFragment.h"
34 #include "core/dom/DocumentType.h" 34 #include "core/dom/DocumentType.h"
35 #include "core/dom/Element.h" 35 #include "core/dom/Element.h"
36 #include "core/dom/ScriptLoader.h" 36 #include "core/dom/ScriptLoader.h"
37 #include "core/dom/Text.h" 37 #include "core/dom/Text.h"
38 #include "core/frame/LocalFrame.h" 38 #include "core/frame/LocalFrame.h"
39 #include "core/html/HTMLFormElement.h" 39 #include "core/html/HTMLFormElement.h"
40 #include "core/html/HTMLHtmlElement.h" 40 #include "core/html/HTMLHtmlElement.h"
41 #include "core/html/HTMLPlugInElement.h"
41 #include "core/html/HTMLScriptElement.h" 42 #include "core/html/HTMLScriptElement.h"
42 #include "core/html/HTMLTemplateElement.h" 43 #include "core/html/HTMLTemplateElement.h"
43 #include "core/html/parser/AtomicHTMLToken.h" 44 #include "core/html/parser/AtomicHTMLToken.h"
44 #include "core/html/parser/HTMLParserIdioms.h" 45 #include "core/html/parser/HTMLParserIdioms.h"
45 #include "core/html/parser/HTMLStackItem.h" 46 #include "core/html/parser/HTMLStackItem.h"
46 #include "core/html/parser/HTMLToken.h" 47 #include "core/html/parser/HTMLToken.h"
47 #include "core/loader/FrameLoader.h" 48 #include "core/loader/FrameLoader.h"
48 #include "core/loader/FrameLoaderClient.h" 49 #include "core/loader/FrameLoaderClient.h"
49 #include "core/svg/SVGScriptElement.h" 50 #include "core/svg/SVGScriptElement.h"
50 #include "platform/NotImplemented.h" 51 #include "platform/NotImplemented.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 void HTMLConstructionSite::queueTask(const HTMLConstructionSiteTask& task) 268 void HTMLConstructionSite::queueTask(const HTMLConstructionSiteTask& task)
268 { 269 {
269 flushPendingText(); 270 flushPendingText();
270 ASSERT(m_pendingText.isEmpty()); 271 ASSERT(m_pendingText.isEmpty());
271 m_taskQueue.append(task); 272 m_taskQueue.append(task);
272 } 273 }
273 274
274 void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> p rpChild, bool selfClosing) 275 void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> p rpChild, bool selfClosing)
275 { 276 {
276 ASSERT(scriptingContentIsAllowed(m_parserContentPolicy) || !prpChild.get()-> isElementNode() || !toScriptLoaderIfPossible(toElement(prpChild.get()))); 277 ASSERT(scriptingContentIsAllowed(m_parserContentPolicy) || !prpChild.get()-> isElementNode() || !toScriptLoaderIfPossible(toElement(prpChild.get())));
277 ASSERT(pluginContentIsAllowed(m_parserContentPolicy) || !prpChild->isPluginE lement()); 278 ASSERT(pluginContentIsAllowed(m_parserContentPolicy) || !isHTMLPlugInElement (prpChild));
278 279
279 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 280 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
280 task.parent = parent; 281 task.parent = parent;
281 task.child = prpChild; 282 task.child = prpChild;
282 task.selfClosing = selfClosing; 283 task.selfClosing = selfClosing;
283 284
284 if (shouldFosterParent()) { 285 if (shouldFosterParent()) {
285 fosterParent(task.child); 286 fosterParent(task.child);
286 return; 287 return;
287 } 288 }
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node) 853 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node)
853 { 854 {
854 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 855 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
855 findFosterSite(task); 856 findFosterSite(task);
856 task.child = node; 857 task.child = node;
857 ASSERT(task.parent); 858 ASSERT(task.parent);
858 queueTask(task); 859 queueTask(task);
859 } 860 }
860 861
861 } 862 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | Source/core/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698