| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (C) 2006, 2007 Rob Buis | |
| 3 * | |
| 4 * This library is free software; you can redistribute it and/or | |
| 5 * modify it under the terms of the GNU Library General Public | |
| 6 * License as published by the Free Software Foundation; either | |
| 7 * version 2 of the License, or (at your option) any later version. | |
| 8 * | |
| 9 * This library is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 12 * Library General Public License for more details. | |
| 13 * | |
| 14 * You should have received a copy of the GNU Library General Public License | |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
| 17 * Boston, MA 02110-1301, USA. | |
| 18 * | |
| 19 */ | |
| 20 | |
| 21 #ifndef SKY_ENGINE_CORE_DOM_STYLEELEMENT_H_ | |
| 22 #define SKY_ENGINE_CORE_DOM_STYLEELEMENT_H_ | |
| 23 | |
| 24 #include "sky/engine/core/css/CSSStyleSheet.h" | |
| 25 #include "sky/engine/wtf/text/TextPosition.h" | |
| 26 | |
| 27 namespace blink { | |
| 28 | |
| 29 class ContainerNode; | |
| 30 class Document; | |
| 31 class Element; | |
| 32 class TreeScope; | |
| 33 | |
| 34 class StyleElement { | |
| 35 public: | |
| 36 StyleElement(Document*, bool createdByParser); | |
| 37 virtual ~StyleElement(); | |
| 38 | |
| 39 protected: | |
| 40 virtual const AtomicString& type() const = 0; | |
| 41 virtual const AtomicString& media() const = 0; | |
| 42 | |
| 43 CSSStyleSheet* sheet() const { return m_sheet.get(); } | |
| 44 | |
| 45 void processStyleSheet(Document&, Element*); | |
| 46 void removedFromDocument(Document&, Element*); | |
| 47 void removedFromDocument(Document&, Element*, ContainerNode* scopingNode, Tr
eeScope&); | |
| 48 void clearDocumentData(Document&, Element*); | |
| 49 void childrenChanged(Element*); | |
| 50 void finishParsingChildren(Element*); | |
| 51 | |
| 52 RefPtr<CSSStyleSheet> m_sheet; | |
| 53 | |
| 54 private: | |
| 55 void createSheet(Element*, const String& text = String()); | |
| 56 void process(Element*); | |
| 57 void clearSheet(Element* ownerElement = 0); | |
| 58 | |
| 59 bool m_createdByParser : 1; | |
| 60 bool m_loading : 1; | |
| 61 bool m_registeredAsCandidate : 1; | |
| 62 TextPosition m_startPosition; | |
| 63 }; | |
| 64 | |
| 65 } | |
| 66 | |
| 67 #endif // SKY_ENGINE_CORE_DOM_STYLEELEMENT_H_ | |
| OLD | NEW |