1 /* 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 4 * 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. 9 * 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. 14 * 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. 19 */ 20 21 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_STYLE_ELEMENT_H_ 22 #define THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_STYLE_ELEMENT_H_ 23 24 #include "third_party/blink/renderer/core/css/style_element.h" 25 #include "third_party/blink/renderer/core/svg/svg_element.h" 26 #include "third_party/blink/renderer/platform/heap/handle.h" 27 28 namespace blink { 29 30 class SVGStyleElement final : public SVGElement, public StyleElement { 31 DEFINE_WRAPPERTYPEINFO(); 32 33 public: 34 SVGStyleElement(Document&, const CreateElementFlags); 35 ~SVGStyleElement() override; 36 37 using StyleElement::sheet; 38 39 bool disabled() const; 40 void setDisabled(bool); 41 42 const AtomicString& type() const override; 43 void setType(const AtomicString&); 44 45 const AtomicString& media() const override; 46 void setMedia(const AtomicString&); 47 48 String title() const override; 49 void setTitle(const AtomicString&); 50 51 void DispatchPendingEvent(); 52 53 void Trace(Visitor*) const override; 54 55 private: 56 void ParseAttribute(const AttributeModificationParams&) override; 57 InsertionNotificationRequest InsertedInto(ContainerNode&) override; 58 void RemovedFrom(ContainerNode&) override; 59 void ChildrenChanged(const ChildrenChange&) override; 60 61 void FinishParsingChildren() override; LayoutObjectIsNeeded(const ComputedStyle &)62 bool LayoutObjectIsNeeded(const ComputedStyle&) const override { 63 return false; 64 } 65 SheetLoaded()66 bool SheetLoaded() override { 67 return StyleElement::SheetLoaded(GetDocument()); 68 } 69 void NotifyLoadedSheetAndAllCriticalSubresources( 70 LoadedSheetErrorStatus) override; StartLoadingDynamicSheet()71 void StartLoadingDynamicSheet() override { 72 StyleElement::StartLoadingDynamicSheet(GetDocument()); 73 } 74 }; 75 76 } // namespace blink 77 78 #endif // THIRD_PARTY_BLINK_RENDERER_CORE_SVG_SVG_STYLE_ELEMENT_H_ 79