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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.h

Issue 2487433002: Revert of Remove EventSender from HTMLStyleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698