2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
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
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef SVGStyleElement_h
22 #define SVGStyleElement_h
24 #include "core/SVGNames.h"
25 #include "core/dom/StyleElement.h"
26 #include "core/events/EventSender.h"
27 #include "core/svg/SVGElement.h"
28 #include "platform/heap/Handle.h"
32 typedef EventSender
<SVGStyleElement
> SVGStyleEventSender
;
34 class SVGStyleElement final
: public SVGElement
35 , public StyleElement
{
36 DEFINE_WRAPPERTYPEINFO();
37 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGStyleElement
);
39 static PassRefPtrWillBeRawPtr
<SVGStyleElement
> create(Document
&, bool createdByParser
);
40 ~SVGStyleElement() override
;
42 using StyleElement::sheet
;
44 bool disabled() const;
45 void setDisabled(bool);
47 const AtomicString
& type() const override
;
48 void setType(const AtomicString
&);
50 const AtomicString
& media() const override
;
51 void setMedia(const AtomicString
&);
53 String
title() const override
;
54 void setTitle(const AtomicString
&);
56 void dispatchPendingEvent(SVGStyleEventSender
*);
58 DECLARE_VIRTUAL_TRACE();
61 SVGStyleElement(Document
&, bool createdByParser
);
63 void parseAttribute(const QualifiedName
&, const AtomicString
&) override
;
64 InsertionNotificationRequest
insertedInto(ContainerNode
*) override
;
65 void didNotifySubtreeInsertionsToDocument() override
;
66 void removedFrom(ContainerNode
*) override
;
67 void childrenChanged(const ChildrenChange
&) override
;
69 void finishParsingChildren() override
;
70 bool layoutObjectIsNeeded(const ComputedStyle
&) override
{ return false; }
72 bool sheetLoaded() override
{ return StyleElement::sheetLoaded(document()); }
73 void notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetErrorStatus
) override
;
74 void startLoadingDynamicSheet() override
{ StyleElement::startLoadingDynamicSheet(document()); }
79 #endif // SVGStyleElement_h