OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 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 SVGStyleElement_h | 21 #ifndef SVGStyleElement_h |
22 #define SVGStyleElement_h | 22 #define SVGStyleElement_h |
23 | 23 |
24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
25 #include "core/dom/StyleElement.h" | 25 #include "core/dom/StyleElement.h" |
| 26 #include "core/events/EventSender.h" |
26 #include "core/svg/SVGElement.h" | 27 #include "core/svg/SVGElement.h" |
27 #include "platform/heap/Handle.h" | 28 #include "platform/heap/Handle.h" |
28 | 29 |
29 namespace blink { | 30 namespace blink { |
30 | 31 |
| 32 typedef EventSender<SVGStyleElement> SVGStyleEventSender; |
| 33 |
31 class SVGStyleElement final : public SVGElement | 34 class SVGStyleElement final : public SVGElement |
32 , public StyleElement { | 35 , public StyleElement { |
33 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
34 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGStyleElement); | 37 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGStyleElement); |
35 public: | 38 public: |
36 static PassRefPtrWillBeRawPtr<SVGStyleElement> create(Document&, bool create
dByParser); | 39 static PassRefPtrWillBeRawPtr<SVGStyleElement> create(Document&, bool create
dByParser); |
37 virtual ~SVGStyleElement(); | 40 virtual ~SVGStyleElement(); |
38 | 41 |
39 using StyleElement::sheet; | 42 using StyleElement::sheet; |
40 | 43 |
41 bool disabled() const; | 44 bool disabled() const; |
42 void setDisabled(bool); | 45 void setDisabled(bool); |
43 | 46 |
44 virtual const AtomicString& type() const override; | 47 virtual const AtomicString& type() const override; |
45 void setType(const AtomicString&); | 48 void setType(const AtomicString&); |
46 | 49 |
47 virtual const AtomicString& media() const override; | 50 virtual const AtomicString& media() const override; |
48 void setMedia(const AtomicString&); | 51 void setMedia(const AtomicString&); |
49 | 52 |
50 virtual String title() const override; | 53 virtual String title() const override; |
51 void setTitle(const AtomicString&); | 54 void setTitle(const AtomicString&); |
52 | 55 |
| 56 void dispatchPendingEvent(SVGStyleEventSender*); |
| 57 |
53 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
54 | 59 |
55 private: | 60 private: |
56 SVGStyleElement(Document&, bool createdByParser); | 61 SVGStyleElement(Document&, bool createdByParser); |
57 | 62 |
58 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
59 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 64 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
60 virtual void didNotifySubtreeInsertionsToDocument() override; | 65 virtual void didNotifySubtreeInsertionsToDocument() override; |
61 virtual void removedFrom(ContainerNode*) override; | 66 virtual void removedFrom(ContainerNode*) override; |
62 virtual void childrenChanged(const ChildrenChange&) override; | 67 virtual void childrenChanged(const ChildrenChange&) override; |
63 | 68 |
64 virtual void finishParsingChildren() override; | 69 virtual void finishParsingChildren() override; |
65 virtual bool layoutObjectIsNeeded(const LayoutStyle&) override { return fals
e; } | 70 virtual bool layoutObjectIsNeeded(const LayoutStyle&) override { return fals
e; } |
66 | 71 |
67 virtual bool sheetLoaded() override { return StyleElement::sheetLoaded(docum
ent()); } | 72 virtual bool sheetLoaded() override { return StyleElement::sheetLoaded(docum
ent()); } |
68 virtual void startLoadingDynamicSheet() override { StyleElement::startLoadin
gDynamicSheet(document()); } | 73 virtual void startLoadingDynamicSheet() override { StyleElement::startLoadin
gDynamicSheet(document()); } |
69 virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadE
ventTimer; } | 74 virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadE
ventTimer; } |
| 75 void sendSVGErrorEventAsynchronously(); |
70 | 76 |
71 Timer<SVGElement> m_svgLoadEventTimer; | 77 Timer<SVGElement> m_svgLoadEventTimer; |
72 }; | 78 }; |
73 | 79 |
74 } // namespace blink | 80 } // namespace blink |
75 | 81 |
76 #endif // SVGStyleElement_h | 82 #endif // SVGStyleElement_h |
OLD | NEW |