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 28 matching lines...) Expand all Loading... |
39 class ExceptionState; | 39 class ExceptionState; |
40 class MediaQuerySet; | 40 class MediaQuerySet; |
41 class SecurityOrigin; | 41 class SecurityOrigin; |
42 class StyleSheetContents; | 42 class StyleSheetContents; |
43 | 43 |
44 enum StyleSheetUpdateType { | 44 enum StyleSheetUpdateType { |
45 PartialRuleUpdate, | 45 PartialRuleUpdate, |
46 EntireStyleSheetUpdate | 46 EntireStyleSheetUpdate |
47 }; | 47 }; |
48 | 48 |
49 class CSSStyleSheet : public StyleSheet { | 49 class CSSStyleSheet FINAL : public StyleSheet { |
50 public: | 50 public: |
51 static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSI
mportRule* ownerRule = 0); | 51 static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSI
mportRule* ownerRule = 0); |
52 static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, Node
* ownerNode); | 52 static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, Node
* ownerNode); |
53 static PassRefPtr<CSSStyleSheet> createInline(Node*, const KURL&, const Text
Position& startPosition = TextPosition::minimumPosition(), const String& encodin
g = String()); | 53 static PassRefPtr<CSSStyleSheet> createInline(Node*, const KURL&, const Text
Position& startPosition = TextPosition::minimumPosition(), const String& encodin
g = String()); |
54 | 54 |
55 virtual ~CSSStyleSheet(); | 55 virtual ~CSSStyleSheet(); |
56 | 56 |
57 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; | 57 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; |
58 virtual Node* ownerNode() const OVERRIDE { return m_ownerNode; } | 58 virtual Node* ownerNode() const OVERRIDE { return m_ownerNode; } |
59 virtual MediaList* media() const OVERRIDE; | 59 virtual MediaList* media() const OVERRIDE; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 StyleSheetContents* contents() const { return m_contents.get(); } | 108 StyleSheetContents* contents() const { return m_contents.get(); } |
109 | 109 |
110 bool isInline() const { return m_isInlineStylesheet; } | 110 bool isInline() const { return m_isInlineStylesheet; } |
111 TextPosition startPositionInSource() const { return m_startPosition; } | 111 TextPosition startPositionInSource() const { return m_startPosition; } |
112 | 112 |
113 private: | 113 private: |
114 CSSStyleSheet(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule); | 114 CSSStyleSheet(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule); |
115 CSSStyleSheet(PassRefPtr<StyleSheetContents>, Node* ownerNode, bool isInline
Stylesheet, const TextPosition& startPosition); | 115 CSSStyleSheet(PassRefPtr<StyleSheetContents>, Node* ownerNode, bool isInline
Stylesheet, const TextPosition& startPosition); |
116 | 116 |
117 virtual bool isCSSStyleSheet() const { return true; } | 117 virtual bool isCSSStyleSheet() const OVERRIDE { return true; } |
118 virtual String type() const { return "text/css"; } | 118 virtual String type() const OVERRIDE { return "text/css"; } |
119 | 119 |
120 void reattachChildRuleCSSOMWrappers(); | 120 void reattachChildRuleCSSOMWrappers(); |
121 | 121 |
122 bool canAccessRules() const; | 122 bool canAccessRules() const; |
123 | 123 |
124 RefPtr<StyleSheetContents> m_contents; | 124 RefPtr<StyleSheetContents> m_contents; |
125 bool m_isInlineStylesheet; | 125 bool m_isInlineStylesheet; |
126 bool m_isDisabled; | 126 bool m_isDisabled; |
127 String m_title; | 127 String m_title; |
128 RefPtr<MediaQuerySet> m_mediaQueries; | 128 RefPtr<MediaQuerySet> m_mediaQueries; |
(...skipping 26 matching lines...) Expand all Loading... |
155 { | 155 { |
156 if (m_styleSheet) | 156 if (m_styleSheet) |
157 m_styleSheet->didMutateRules(); | 157 m_styleSheet->didMutateRules(); |
158 } | 158 } |
159 | 159 |
160 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); | 160 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); |
161 | 161 |
162 } // namespace | 162 } // namespace |
163 | 163 |
164 #endif | 164 #endif |
OLD | NEW |