OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights
reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 enum StyleSheetUpdateType { | 43 enum StyleSheetUpdateType { |
44 PartialRuleUpdate, | 44 PartialRuleUpdate, |
45 EntireStyleSheetUpdate | 45 EntireStyleSheetUpdate |
46 }; | 46 }; |
47 | 47 |
48 class CORE_EXPORT CSSStyleSheet final : public StyleSheet { | 48 class CORE_EXPORT CSSStyleSheet final : public StyleSheet { |
49 DEFINE_WRAPPERTYPEINFO(); | 49 DEFINE_WRAPPERTYPEINFO(); |
50 WTF_MAKE_NONCOPYABLE(CSSStyleSheet); | 50 WTF_MAKE_NONCOPYABLE(CSSStyleSheet); |
51 public: | 51 public: |
52 static CSSStyleSheet* create(StyleSheetContents*, CSSImportRule* ownerRule =
0); | 52 static CSSStyleSheet* create(StyleSheetContents*, CSSImportRule* ownerRule =
nullptr); |
53 static CSSStyleSheet* create(StyleSheetContents*, Node* ownerNode); | 53 static CSSStyleSheet* create(StyleSheetContents*, Node& ownerNode); |
54 static CSSStyleSheet* createInline(Node*, const KURL&, const TextPosition& s
tartPosition = TextPosition::minimumPosition(), const String& encoding = String(
)); | 54 static CSSStyleSheet* createInline(Node&, const KURL&, const TextPosition& s
tartPosition = TextPosition::minimumPosition(), const String& encoding = String(
)); |
55 static CSSStyleSheet* createInline(StyleSheetContents*, Node* ownerNode, con
st TextPosition& startPosition = TextPosition::minimumPosition()); | 55 static CSSStyleSheet* createInline(StyleSheetContents*, Node& ownerNode, con
st TextPosition& startPosition = TextPosition::minimumPosition()); |
56 | 56 |
57 ~CSSStyleSheet() override; | 57 ~CSSStyleSheet() override; |
58 | 58 |
59 CSSStyleSheet* parentStyleSheet() const override; | 59 CSSStyleSheet* parentStyleSheet() const override; |
60 Node* ownerNode() const override { return m_ownerNode; } | 60 Node* ownerNode() const override { return m_ownerNode; } |
61 MediaList* media() const override; | 61 MediaList* media() const override; |
62 String href() const override; | 62 String href() const override; |
63 String title() const override { return m_title; } | 63 String title() const override { return m_title; } |
64 bool disabled() const override { return m_isDisabled; } | 64 bool disabled() const override { return m_isDisabled; } |
65 void setDisabled(bool) override; | 65 void setDisabled(bool) override; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 bool sheetLoaded(); | 117 bool sheetLoaded(); |
118 bool loadCompleted() const { return m_loadCompleted; } | 118 bool loadCompleted() const { return m_loadCompleted; } |
119 void startLoadingDynamicSheet(); | 119 void startLoadingDynamicSheet(); |
120 void setText(const String&); | 120 void setText(const String&); |
121 | 121 |
122 DECLARE_VIRTUAL_TRACE(); | 122 DECLARE_VIRTUAL_TRACE(); |
123 | 123 |
124 private: | 124 private: |
125 CSSStyleSheet(StyleSheetContents*, CSSImportRule* ownerRule); | 125 CSSStyleSheet(StyleSheetContents*, CSSImportRule* ownerRule); |
126 CSSStyleSheet(StyleSheetContents*, Node* ownerNode, bool isInlineStylesheet,
const TextPosition& startPosition); | 126 CSSStyleSheet(StyleSheetContents*, Node& ownerNode, bool isInlineStylesheet,
const TextPosition& startPosition); |
127 | 127 |
128 bool isCSSStyleSheet() const override { return true; } | 128 bool isCSSStyleSheet() const override { return true; } |
129 String type() const override { return "text/css"; } | 129 String type() const override { return "text/css"; } |
130 | 130 |
131 void reattachChildRuleCSSOMWrappers(); | 131 void reattachChildRuleCSSOMWrappers(); |
132 | 132 |
133 bool canAccessRules() const; | 133 bool canAccessRules() const; |
134 | 134 |
135 void setLoadCompleted(bool); | 135 void setLoadCompleted(bool); |
136 | 136 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 { | 170 { |
171 if (m_styleSheet) | 171 if (m_styleSheet) |
172 m_styleSheet->didMutateRules(); | 172 m_styleSheet->didMutateRules(); |
173 } | 173 } |
174 | 174 |
175 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); | 175 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); |
176 | 176 |
177 } // namespace blink | 177 } // namespace blink |
178 | 178 |
179 #endif | 179 #endif |
OLD | NEW |