Chromium Code Reviews| 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" |
| 28 #include "platform/Timer.h" | |
|
pdr.
2015/03/31 21:36:38
Nit: is this include needed?
jww
2015/04/01 16:26:57
Removed.
| |
| 27 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 28 | 30 |
| 29 namespace blink { | 31 namespace blink { |
| 30 | 32 |
| 33 typedef EventSender<SVGStyleElement> SVGStyleEventSender; | |
| 34 | |
| 31 class SVGStyleElement final : public SVGElement | 35 class SVGStyleElement final : public SVGElement |
| 32 , public StyleElement { | 36 , public StyleElement { |
| 33 DEFINE_WRAPPERTYPEINFO(); | 37 DEFINE_WRAPPERTYPEINFO(); |
| 34 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGStyleElement); | 38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGStyleElement); |
| 35 public: | 39 public: |
| 36 static PassRefPtrWillBeRawPtr<SVGStyleElement> create(Document&, bool create dByParser); | 40 static PassRefPtrWillBeRawPtr<SVGStyleElement> create(Document&, bool create dByParser); |
| 37 virtual ~SVGStyleElement(); | 41 virtual ~SVGStyleElement(); |
| 38 | 42 |
| 39 using StyleElement::sheet; | 43 using StyleElement::sheet; |
| 40 | 44 |
| 41 bool disabled() const; | 45 bool disabled() const; |
| 42 void setDisabled(bool); | 46 void setDisabled(bool); |
| 43 | 47 |
| 44 virtual const AtomicString& type() const override; | 48 virtual const AtomicString& type() const override; |
| 45 void setType(const AtomicString&); | 49 void setType(const AtomicString&); |
| 46 | 50 |
| 47 virtual const AtomicString& media() const override; | 51 virtual const AtomicString& media() const override; |
| 48 void setMedia(const AtomicString&); | 52 void setMedia(const AtomicString&); |
| 49 | 53 |
| 50 virtual String title() const override; | 54 virtual String title() const override; |
| 51 void setTitle(const AtomicString&); | 55 void setTitle(const AtomicString&); |
| 52 | 56 |
| 57 void dispatchPendingEvent(SVGStyleEventSender*); | |
| 58 | |
| 53 DECLARE_VIRTUAL_TRACE(); | 59 DECLARE_VIRTUAL_TRACE(); |
| 54 | 60 |
| 55 private: | 61 private: |
| 56 SVGStyleElement(Document&, bool createdByParser); | 62 SVGStyleElement(Document&, bool createdByParser); |
| 57 | 63 |
| 58 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; | 64 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; |
| 59 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 65 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 60 virtual void didNotifySubtreeInsertionsToDocument() override; | 66 virtual void didNotifySubtreeInsertionsToDocument() override; |
| 61 virtual void removedFrom(ContainerNode*) override; | 67 virtual void removedFrom(ContainerNode*) override; |
| 62 virtual void childrenChanged(const ChildrenChange&) override; | 68 virtual void childrenChanged(const ChildrenChange&) override; |
| 63 | 69 |
| 64 virtual void finishParsingChildren() override; | 70 virtual void finishParsingChildren() override; |
| 65 virtual bool layoutObjectIsNeeded(const LayoutStyle&) override { return fals e; } | 71 virtual bool layoutObjectIsNeeded(const LayoutStyle&) override { return fals e; } |
| 66 | 72 |
| 67 virtual bool sheetLoaded() override { return StyleElement::sheetLoaded(docum ent()); } | 73 virtual bool sheetLoaded() override { return StyleElement::sheetLoaded(docum ent()); } |
| 68 virtual void startLoadingDynamicSheet() override { StyleElement::startLoadin gDynamicSheet(document()); } | 74 virtual void startLoadingDynamicSheet() override { StyleElement::startLoadin gDynamicSheet(document()); } |
| 69 virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadE ventTimer; } | 75 virtual Timer<SVGElement>* svgLoadEventTimer() override { return &m_svgLoadE ventTimer; } |
| 76 void sendSVGErrorEventAsynchronously(); | |
| 70 | 77 |
| 71 Timer<SVGElement> m_svgLoadEventTimer; | 78 Timer<SVGElement> m_svgLoadEventTimer; |
| 72 }; | 79 }; |
| 73 | 80 |
| 74 } // namespace blink | 81 } // namespace blink |
| 75 | 82 |
| 76 #endif // SVGStyleElement_h | 83 #endif // SVGStyleElement_h |
| OLD | NEW |