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

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

Issue 62083002: Remove support for the externalResourcesRequired attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef SVGScriptElement_h 21 #ifndef SVGScriptElement_h
22 #define SVGScriptElement_h 22 #define SVGScriptElement_h
23 23
24 #include "SVGNames.h" 24 #include "SVGNames.h"
25 #include "core/dom/ScriptLoaderClient.h" 25 #include "core/dom/ScriptLoaderClient.h"
26 #include "core/svg/SVGAnimatedBoolean.h" 26 #include "core/svg/SVGAnimatedBoolean.h"
27 #include "core/svg/SVGAnimatedString.h" 27 #include "core/svg/SVGAnimatedString.h"
28 #include "core/svg/SVGElement.h" 28 #include "core/svg/SVGElement.h"
29 #include "core/svg/SVGExternalResourcesRequired.h"
30 #include "core/svg/SVGURIReference.h" 29 #include "core/svg/SVGURIReference.h"
31 30
32 namespace WebCore { 31 namespace WebCore {
33 32
34 class ScriptLoader; 33 class ScriptLoader;
35 34
36 class SVGScriptElement FINAL 35 class SVGScriptElement FINAL
37 : public SVGElement 36 : public SVGElement
38 , public SVGURIReference 37 , public SVGURIReference
39 , public SVGExternalResourcesRequired
40 , public ScriptLoaderClient { 38 , public ScriptLoaderClient {
41 public: 39 public:
42 static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser); 40 static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
43 41
44 String type() const; 42 String type() const;
45 void setType(const String&); 43 void setType(const String&);
46 44
47 ScriptLoader* loader() const { return m_loader.get(); } 45 ScriptLoader* loader() const { return m_loader.get(); }
48 46
49 private: 47 private:
50 SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted); 48 SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
51 49
52 bool isSupportedAttribute(const QualifiedName&); 50 bool isSupportedAttribute(const QualifiedName&);
53 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 51 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
54 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 52 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
55 virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE; 53 virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE;
56 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0); 54 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0);
57 55
58 virtual void svgAttributeChanged(const QualifiedName&); 56 virtual void svgAttributeChanged(const QualifiedName&);
59 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 57 virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
60 virtual void finishParsingChildren(); 58 virtual void finishParsingChildren();
61 59
62 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 60 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
63 61
64 virtual bool haveLoadedRequiredResources() { return SVGExternalResourcesRequ ired::haveLoadedRequiredResources(); } 62 virtual bool haveLoadedRequiredResources();
65 63
66 virtual String sourceAttributeValue() const; 64 virtual String sourceAttributeValue() const;
67 virtual String charsetAttributeValue() const; 65 virtual String charsetAttributeValue() const;
68 virtual String typeAttributeValue() const; 66 virtual String typeAttributeValue() const;
69 virtual String languageAttributeValue() const; 67 virtual String languageAttributeValue() const;
70 virtual String forAttributeValue() const; 68 virtual String forAttributeValue() const;
71 virtual String eventAttributeValue() const; 69 virtual String eventAttributeValue() const;
72 virtual bool asyncAttributeValue() const; 70 virtual bool asyncAttributeValue() const;
73 virtual bool deferAttributeValue() const; 71 virtual bool deferAttributeValue() const;
74 virtual bool hasSourceAttribute() const; 72 virtual bool hasSourceAttribute() const;
75 73
76 virtual void dispatchLoadEvent() { SVGExternalResourcesRequired::dispatchLoa dEvent(this); } 74 virtual void dispatchLoadEvent();
77 75
78 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); 76 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
79 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; } 77 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
80 78
81 // SVGExternalResourcesRequired 79 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE { return &m_svgLoadE ventTimer; }
82 virtual void setHaveFiredLoadEvent(bool) OVERRIDE;
83 virtual bool isParserInserted() const OVERRIDE;
84 virtual bool haveFiredLoadEvent() const OVERRIDE;
85 virtual Timer<SVGElement>* svgLoadEventTimer() OVERRIDE;
86 80
87 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement) 81 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGScriptElement)
88 DECLARE_ANIMATED_STRING(Href, href) 82 DECLARE_ANIMATED_STRING(Href, href)
89 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq uired)
90 END_DECLARE_ANIMATED_PROPERTIES 83 END_DECLARE_ANIMATED_PROPERTIES
91 84
92 String m_type; 85 String m_type;
93 Timer<SVGElement> m_svgLoadEventTimer; 86 Timer<SVGElement> m_svgLoadEventTimer;
94 OwnPtr<ScriptLoader> m_loader; 87 OwnPtr<ScriptLoader> m_loader;
95 }; 88 };
96 89
97 DEFINE_NODE_TYPE_CASTS(SVGScriptElement, hasTagName(SVGNames::scriptTag)); 90 DEFINE_NODE_TYPE_CASTS(SVGScriptElement, hasTagName(SVGNames::scriptTag));
98 91
99 } // namespace WebCore 92 } // namespace WebCore
100 93
101 #endif 94 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698