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

Side by Side Diff: Source/core/svg/SVGScriptElement.h

Issue 113133002: Rewrite to not store type in m_type and also remove type getter/setter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGScriptElement.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) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 27 matching lines...) Expand all
38 , public ScriptLoaderClient { 38 , public ScriptLoaderClient {
39 public: 39 public:
40 static PassRefPtr<SVGScriptElement> create(Document&, bool wasInsertedByPars er); 40 static PassRefPtr<SVGScriptElement> create(Document&, bool wasInsertedByPars er);
41 41
42 String type() const; 42 String type() const;
43 void setType(const String&); 43 void setType(const String&);
44 44
45 ScriptLoader* loader() const { return m_loader.get(); } 45 ScriptLoader* loader() const { return m_loader.get(); }
46 SVGAnimatedString* href() { return m_href.get(); } 46 SVGAnimatedString* href() { return m_href.get(); }
47 47
48 #ifndef NDEBUG
49 virtual bool isAnimatableAttribute(const QualifiedName&) const OVERRIDE;
50 #endif
51
48 private: 52 private:
49 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted); 53 SVGScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted);
50 54
51 bool isSupportedAttribute(const QualifiedName&); 55 bool isSupportedAttribute(const QualifiedName&);
52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 56 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
53 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 57 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
54 virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE; 58 virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE;
55 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; 59 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
56 60
57 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 61 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
(...skipping 17 matching lines...) Expand all
75 79
76 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() OVERR IDE; 80 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() OVERR IDE;
77 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; } 81 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
78 82
79 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; } 83 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; }
80 84
81 RefPtr<SVGAnimatedString> m_href; 85 RefPtr<SVGAnimatedString> m_href;
82 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement) 86 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement)
83 END_DECLARE_ANIMATED_PROPERTIES 87 END_DECLARE_ANIMATED_PROPERTIES
84 88
85 String m_type;
86 Timer<SVGElement> m_svgLoadEventTimer; 89 Timer<SVGElement> m_svgLoadEventTimer;
87 OwnPtr<ScriptLoader> m_loader; 90 OwnPtr<ScriptLoader> m_loader;
88 }; 91 };
89 92
90 DEFINE_NODE_TYPE_CASTS(SVGScriptElement, hasTagName(SVGNames::scriptTag)); 93 DEFINE_NODE_TYPE_CASTS(SVGScriptElement, hasTagName(SVGNames::scriptTag));
91 94
92 } // namespace WebCore 95 } // namespace WebCore
93 96
94 #endif 97 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElement.h ('k') | Source/core/svg/SVGScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698