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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 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 | 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, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef CSSStyleSheet_h | 21 #ifndef CSSStyleSheet_h |
22 #define CSSStyleSheet_h | 22 #define CSSStyleSheet_h |
23 | 23 |
| 24 #include "bindings/core/v8/Optional.h" |
24 #include "core/css/CSSRule.h" | 25 #include "core/css/CSSRule.h" |
25 #include "core/css/StyleSheet.h" | 26 #include "core/css/StyleSheet.h" |
26 #include "platform/heap/Handle.h" | 27 #include "platform/heap/Handle.h" |
27 #include "wtf/Noncopyable.h" | 28 #include "wtf/Noncopyable.h" |
28 #include "wtf/text/TextPosition.h" | 29 #include "wtf/text/TextPosition.h" |
29 | 30 |
30 namespace blink { | 31 namespace blink { |
31 | 32 |
32 class CSSCharsetRule; | 33 class CSSCharsetRule; |
33 class CSSImportRule; | 34 class CSSImportRule; |
(...skipping 30 matching lines...) Expand all Loading... |
64 virtual bool disabled() const OVERRIDE { return m_isDisabled; } | 65 virtual bool disabled() const OVERRIDE { return m_isDisabled; } |
65 virtual void setDisabled(bool) OVERRIDE; | 66 virtual void setDisabled(bool) OVERRIDE; |
66 | 67 |
67 PassRefPtrWillBeRawPtr<CSSRuleList> cssRules(); | 68 PassRefPtrWillBeRawPtr<CSSRuleList> cssRules(); |
68 unsigned insertRule(const String& rule, unsigned index, ExceptionState&); | 69 unsigned insertRule(const String& rule, unsigned index, ExceptionState&); |
69 unsigned insertRule(const String& rule, ExceptionState&); // Deprecated. | 70 unsigned insertRule(const String& rule, ExceptionState&); // Deprecated. |
70 void deleteRule(unsigned index, ExceptionState&); | 71 void deleteRule(unsigned index, ExceptionState&); |
71 | 72 |
72 // IE Extensions | 73 // IE Extensions |
73 PassRefPtrWillBeRawPtr<CSSRuleList> rules(); | 74 PassRefPtrWillBeRawPtr<CSSRuleList> rules(); |
74 int addRule(const String& selector, const String& style, int index, Exceptio
nState&); | 75 int addRule(const String& selector, const String& style, Optional<int> index
, ExceptionState&); |
75 int addRule(const String& selector, const String& style, ExceptionState&); | |
76 void removeRule(unsigned index, ExceptionState& exceptionState) { deleteRule
(index, exceptionState); } | 76 void removeRule(unsigned index, ExceptionState& exceptionState) { deleteRule
(index, exceptionState); } |
77 | 77 |
78 // For CSSRuleList. | 78 // For CSSRuleList. |
79 unsigned length() const; | 79 unsigned length() const; |
80 CSSRule* item(unsigned index); | 80 CSSRule* item(unsigned index); |
81 | 81 |
82 virtual void clearOwnerNode() OVERRIDE; | 82 virtual void clearOwnerNode() OVERRIDE; |
83 | 83 |
84 virtual CSSRule* ownerRule() const OVERRIDE { return m_ownerRule; } | 84 virtual CSSRule* ownerRule() const OVERRIDE { return m_ownerRule; } |
85 virtual KURL baseURL() const OVERRIDE; | 85 virtual KURL baseURL() const OVERRIDE; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 { | 167 { |
168 if (m_styleSheet) | 168 if (m_styleSheet) |
169 m_styleSheet->didMutateRules(); | 169 m_styleSheet->didMutateRules(); |
170 } | 170 } |
171 | 171 |
172 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); | 172 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); |
173 | 173 |
174 } // namespace | 174 } // namespace |
175 | 175 |
176 #endif | 176 #endif |
OLD | NEW |