| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved. | 4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef HTMLStyleElement_h | 23 #ifndef HTMLStyleElement_h |
| 24 #define HTMLStyleElement_h | 24 #define HTMLStyleElement_h |
| 25 | 25 |
| 26 #include "core/dom/IncrementLoadEventDelayCount.h" | |
| 27 #include "core/dom/StyleElement.h" | 26 #include "core/dom/StyleElement.h" |
| 28 #include "core/html/HTMLElement.h" | 27 #include "core/html/HTMLElement.h" |
| 29 #include <memory> | |
| 30 | 28 |
| 31 namespace blink { | 29 namespace blink { |
| 32 | 30 |
| 31 class HTMLStyleElement; |
| 32 |
| 33 template <typename T> |
| 34 class EventSender; |
| 35 using StyleEventSender = EventSender<HTMLStyleElement>; |
| 36 |
| 33 class CORE_EXPORT HTMLStyleElement final : public HTMLElement, | 37 class CORE_EXPORT HTMLStyleElement final : public HTMLElement, |
| 34 private StyleElement { | 38 private StyleElement { |
| 35 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 36 USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement); | 40 USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement); |
| 37 | 41 |
| 38 public: | 42 public: |
| 39 static HTMLStyleElement* create(Document&, bool createdByParser); | 43 static HTMLStyleElement* create(Document&, bool createdByParser); |
| 40 ~HTMLStyleElement() override; | 44 ~HTMLStyleElement() override; |
| 41 | 45 |
| 42 using StyleElement::sheet; | 46 using StyleElement::sheet; |
| 43 | 47 |
| 44 bool disabled() const; | 48 bool disabled() const; |
| 45 void setDisabled(bool); | 49 void setDisabled(bool); |
| 46 | 50 |
| 47 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>); | 51 void dispatchPendingEvent(StyleEventSender*); |
| 52 static void dispatchPendingLoadEvents(); |
| 48 | 53 |
| 49 DECLARE_VIRTUAL_TRACE(); | 54 DECLARE_VIRTUAL_TRACE(); |
| 50 | 55 |
| 51 private: | 56 private: |
| 52 HTMLStyleElement(Document&, bool createdByParser); | 57 HTMLStyleElement(Document&, bool createdByParser); |
| 53 | 58 |
| 54 // overload from HTMLElement | 59 // overload from HTMLElement |
| 55 void parseAttribute(const QualifiedName&, | 60 void parseAttribute(const QualifiedName&, |
| 56 const AtomicString&, | 61 const AtomicString&, |
| 57 const AtomicString&) override; | 62 const AtomicString&) override; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 72 const AtomicString& media() const override; | 77 const AtomicString& media() const override; |
| 73 const AtomicString& type() const override; | 78 const AtomicString& type() const override; |
| 74 | 79 |
| 75 bool m_firedLoad; | 80 bool m_firedLoad; |
| 76 bool m_loadedSheet; | 81 bool m_loadedSheet; |
| 77 }; | 82 }; |
| 78 | 83 |
| 79 } // namespace blink | 84 } // namespace blink |
| 80 | 85 |
| 81 #endif // HTMLStyleElement_h | 86 #endif // HTMLStyleElement_h |
| OLD | NEW |