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

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

Issue 2269043002: Reland of Remove EventSender from HTMLStyleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove t.step() 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"
26 #include "core/dom/StyleElement.h" 27 #include "core/dom/StyleElement.h"
27 #include "core/html/HTMLElement.h" 28 #include "core/html/HTMLElement.h"
29 #include <memory>
28 30
29 namespace blink { 31 namespace blink {
30 32
31 class HTMLStyleElement;
32
33 template <typename T>
34 class EventSender;
35 using StyleEventSender = EventSender<HTMLStyleElement>;
36
37 class CORE_EXPORT HTMLStyleElement final : public HTMLElement, 33 class CORE_EXPORT HTMLStyleElement final : public HTMLElement,
38 private StyleElement { 34 private StyleElement {
39 DEFINE_WRAPPERTYPEINFO(); 35 DEFINE_WRAPPERTYPEINFO();
40 USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement); 36 USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement);
41 37
42 public: 38 public:
43 static HTMLStyleElement* create(Document&, bool createdByParser); 39 static HTMLStyleElement* create(Document&, bool createdByParser);
44 ~HTMLStyleElement() override; 40 ~HTMLStyleElement() override;
45 41
46 using StyleElement::sheet; 42 using StyleElement::sheet;
47 43
48 bool disabled() const; 44 bool disabled() const;
49 void setDisabled(bool); 45 void setDisabled(bool);
50 46
51 void dispatchPendingEvent(StyleEventSender*); 47 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
52 static void dispatchPendingLoadEvents();
53 48
54 DECLARE_VIRTUAL_TRACE(); 49 DECLARE_VIRTUAL_TRACE();
55 50
56 private: 51 private:
57 HTMLStyleElement(Document&, bool createdByParser); 52 HTMLStyleElement(Document&, bool createdByParser);
58 53
59 // overload from HTMLElement 54 // overload from HTMLElement
60 void parseAttribute(const QualifiedName&, 55 void parseAttribute(const QualifiedName&,
61 const AtomicString&, 56 const AtomicString&,
62 const AtomicString&) override; 57 const AtomicString&) override;
(...skipping 14 matching lines...) Expand all
77 const AtomicString& media() const override; 72 const AtomicString& media() const override;
78 const AtomicString& type() const override; 73 const AtomicString& type() const override;
79 74
80 bool m_firedLoad; 75 bool m_firedLoad;
81 bool m_loadedSheet; 76 bool m_loadedSheet;
82 }; 77 };
83 78
84 } // namespace blink 79 } // namespace blink
85 80
86 #endif // HTMLStyleElement_h 81 #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