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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp

Issue 2723793002: De-Element ScriptLoader (Closed)
Patch Set: ScriptLoaderClient->ScriptElementBase, pure virtual interface, add fixme Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
index c10bbc9f3bed550259edfc807254f8dcab7fea2c..15a678f43fd1a4a620d95845a39f5df3315df52d 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
@@ -37,7 +37,6 @@
#include "core/dom/Element.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/IgnoreDestructiveWriteCountIncrementer.h"
-#include "core/dom/ScriptLoader.h"
#include "core/dom/TemplateContentDocumentFragment.h"
#include "core/dom/Text.h"
#include "core/dom/ThrowOnDynamicMarkupInsertionCountIncrementer.h"
@@ -287,8 +286,7 @@ void HTMLConstructionSite::attachLater(ContainerNode* parent,
Node* child,
bool selfClosing) {
ASSERT(scriptingContentIsAllowed(m_parserContentPolicy) ||
- !child->isElementNode() ||
- !toScriptLoaderIfPossible(toElement(child)));
+ !child->isElementNode() || !toElement(child)->isScriptElement());
ASSERT(pluginContentIsAllowed(m_parserContentPolicy) ||
!isHTMLPlugInElement(child));
@@ -758,8 +756,9 @@ void HTMLConstructionSite::insertForeignElement(
Element* element = createElement(token, namespaceURI);
if (scriptingContentIsAllowed(m_parserContentPolicy) ||
- !toScriptLoaderIfPossible(element))
+ !element->isScriptElement()) {
attachLater(currentNode(), element, token->selfClosing());
+ }
if (!token->selfClosing())
m_openElements.push(HTMLStackItem::create(element, token, namespaceURI));
}

Powered by Google App Engine
This is Rietveld 408576698