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

Unified Diff: Source/core/svg/SVGScriptElement.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/html/HTMLScriptElement.cpp ('k') | Source/core/svg/SVGScriptElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGScriptElement.h
diff --git a/Source/core/svg/SVGScriptElement.h b/Source/core/svg/SVGScriptElement.h
index 820d5b24dc1a756f3214037edfd458619f56bae3..b006555b8e7813627bb1e223fed3f656e573337a 100644
--- a/Source/core/svg/SVGScriptElement.h
+++ b/Source/core/svg/SVGScriptElement.h
@@ -31,16 +31,19 @@
namespace WebCore {
-class SVGScriptElement FINAL : public SVGElement
- , public SVGURIReference
- , public SVGExternalResourcesRequired
- , public ScriptElement {
+class SVGScriptElement FINAL
+ : public SVGElement
+ , public SVGURIReference
+ , public SVGExternalResourcesRequired
+ , public ScriptElementClient {
public:
static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document*, bool wasInsertedByParser);
String type() const;
void setType(const String&);
+ ScriptElement* scriptElement() const { return m_scriptElement.get(); }
+
private:
SVGScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted);
@@ -72,10 +75,10 @@ private:
virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
// SVGExternalResourcesRequired
- virtual void setHaveFiredLoadEvent(bool haveFiredLoadEvent) { ScriptElement::setHaveFiredLoadEvent(haveFiredLoadEvent); }
- virtual bool isParserInserted() const { return ScriptElement::isParserInserted(); }
- virtual bool haveFiredLoadEvent() const { return ScriptElement::haveFiredLoadEvent(); }
- virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadEventTimer; }
+ virtual void setHaveFiredLoadEvent(bool) OVERRIDE;
+ virtual bool isParserInserted() const OVERRIDE;
+ virtual bool haveFiredLoadEvent() const OVERRIDE;
+ virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement)
DECLARE_ANIMATED_STRING(Href, href)
@@ -84,6 +87,7 @@ private:
String m_type;
Timer<SVGElement> m_svgLoadEventTimer;
+ OwnPtr<ScriptElement> m_scriptElement;
};
inline SVGScriptElement* toSVGScriptElement(Node* node)
« no previous file with comments | « Source/core/html/HTMLScriptElement.cpp ('k') | Source/core/svg/SVGScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698