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

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

Issue 18676002: Refactoring: Decouple ScriptElement from HTMLScriptElement and SVGScriptElement. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed points 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/dom/ScriptElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLScriptElement.h
diff --git a/Source/core/html/HTMLScriptElement.h b/Source/core/html/HTMLScriptElement.h
index 153f271dd9a9598590f0e95e4f88bb0a4035a869..1633c0dac8739403356dbd7949f2dc4497442d5b 100644
--- a/Source/core/html/HTMLScriptElement.h
+++ b/Source/core/html/HTMLScriptElement.h
@@ -29,11 +29,11 @@
namespace WebCore {
-class HTMLScriptElement FINAL : public HTMLElement, public ScriptElement {
+class HTMLScriptElement FINAL : public HTMLElement, public ScriptElementClient {
public:
static PassRefPtr<HTMLScriptElement> create(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted = false);
- String text() const { return scriptContent(); }
+ String text() { return textFromChildren(); }
void setText(const String&);
KURL src() const;
@@ -41,6 +41,8 @@ public:
void setAsync(bool);
bool async() const;
+ ScriptElement* scriptElement() const { return m_scriptElement.get(); }
+
private:
HTMLScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted);
@@ -65,6 +67,8 @@ private:
virtual void dispatchLoadEvent();
virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
+
+ OwnPtr<ScriptElement> m_scriptElement;
};
inline HTMLScriptElement* toHTMLScriptElement(Node* node)
« no previous file with comments | « Source/core/dom/ScriptElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698