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

Unified Diff: Source/core/html/HTMLScriptElement.cpp

Issue 18261015: Rename ScriptElement to ScriptLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLScriptElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLScriptElement.cpp
diff --git a/Source/core/html/HTMLScriptElement.cpp b/Source/core/html/HTMLScriptElement.cpp
index 5410907b7a191e69d1243bfe6e560c2e348373f3..b1a0bb3426c9432f944114c13c3d604e5372ce6a 100644
--- a/Source/core/html/HTMLScriptElement.cpp
+++ b/Source/core/html/HTMLScriptElement.cpp
@@ -29,6 +29,7 @@
#include "core/dom/Document.h"
#include "core/dom/Event.h"
#include "core/dom/EventNames.h"
+#include "core/dom/ScriptLoader.h"
#include "core/dom/Text.h"
namespace WebCore {
@@ -37,7 +38,7 @@ using namespace HTMLNames;
inline HTMLScriptElement::HTMLScriptElement(const QualifiedName& tagName, Document* document, bool wasInsertedByParser, bool alreadyStarted)
: HTMLElement(tagName, document)
- , m_scriptElement(ScriptElement::create(this, wasInsertedByParser, alreadyStarted))
+ , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted))
{
ASSERT(hasTagName(scriptTag));
ScriptWrappable::init(this);
@@ -56,15 +57,15 @@ bool HTMLScriptElement::isURLAttribute(const Attribute& attribute) const
void HTMLScriptElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
- m_scriptElement->childrenChanged();
+ m_loader->childrenChanged();
}
void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == srcAttr)
- m_scriptElement->handleSourceAttribute(value);
+ m_loader->handleSourceAttribute(value);
else if (name == asyncAttr)
- m_scriptElement->handleAsyncAttribute();
+ m_loader->handleAsyncAttribute();
else if (name == onbeforeloadAttr)
setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value));
else
@@ -74,7 +75,7 @@ void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicSt
Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLElement::insertedInto(insertionPoint);
- m_scriptElement->insertedInto(insertionPoint);
+ m_loader->insertedInto(insertionPoint);
return InsertionDone;
}
@@ -98,12 +99,12 @@ void HTMLScriptElement::setText(const String &value)
void HTMLScriptElement::setAsync(bool async)
{
setBooleanAttribute(asyncAttr, async);
- m_scriptElement->handleAsyncAttribute();
+ m_loader->handleAsyncAttribute();
}
bool HTMLScriptElement::async() const
{
- return fastHasAttribute(asyncAttr) || (m_scriptElement->forceAsync());
+ return fastHasAttribute(asyncAttr) || (m_loader->forceAsync());
}
KURL HTMLScriptElement::src() const
@@ -170,7 +171,7 @@ void HTMLScriptElement::dispatchLoadEvent()
PassRefPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren()
{
- return adoptRef(new HTMLScriptElement(tagQName(), document(), false, m_scriptElement->alreadyStarted()));
+ return adoptRef(new HTMLScriptElement(tagQName(), document(), false, m_loader->alreadyStarted()));
}
}
« no previous file with comments | « Source/core/html/HTMLScriptElement.h ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698