2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
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
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #ifndef HTMLStyleElement_h
24 #define HTMLStyleElement_h
26 #include "core/dom/StyleElement.h"
27 #include "core/html/HTMLElement.h"
31 class HTMLStyleElement
;
33 template<typename T
> class EventSender
;
34 typedef EventSender
<HTMLStyleElement
> StyleEventSender
;
36 class HTMLStyleElement final
: public HTMLElement
, private StyleElement
{
37 DEFINE_WRAPPERTYPEINFO();
38 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLStyleElement
);
40 static PassRefPtrWillBeRawPtr
<HTMLStyleElement
> create(Document
&, bool createdByParser
);
41 ~HTMLStyleElement() override
;
43 ContainerNode
* scopingNode();
45 using StyleElement::sheet
;
47 bool disabled() const;
48 void setDisabled(bool);
50 void dispatchPendingEvent(StyleEventSender
*);
51 static void dispatchPendingLoadEvents();
53 DECLARE_VIRTUAL_TRACE();
56 HTMLStyleElement(Document
&, bool createdByParser
);
58 // overload from HTMLElement
59 void parseAttribute(const QualifiedName
&, const AtomicString
&) override
;
60 InsertionNotificationRequest
insertedInto(ContainerNode
*) override
;
61 void didNotifySubtreeInsertionsToDocument() override
;
62 void removedFrom(ContainerNode
*) override
;
63 void childrenChanged(const ChildrenChange
&) override
;
65 void finishParsingChildren() override
;
67 bool sheetLoaded() override
{ return StyleElement::sheetLoaded(document()); }
68 void notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErrorStatus
) override
;
69 void startLoadingDynamicSheet() override
{ StyleElement::startLoadingDynamicSheet(document()); }
71 const AtomicString
& media() const override
;
72 const AtomicString
& type() const override
;
80 #endif // HTMLStyleElement_h