| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual ~CSSStyleSheet(); | 57 virtual ~CSSStyleSheet(); |
| 58 | 58 |
| 59 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; | 59 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; |
| 60 virtual Node* ownerNode() const OVERRIDE { return m_ownerNode; } | 60 virtual Node* ownerNode() const OVERRIDE { return m_ownerNode; } |
| 61 virtual MediaList* media() const OVERRIDE; | 61 virtual MediaList* media() const OVERRIDE; |
| 62 virtual String href() const OVERRIDE; | 62 virtual String href() const OVERRIDE; |
| 63 virtual String title() const OVERRIDE { return m_title; } | 63 virtual String title() const OVERRIDE { return m_title; } |
| 64 virtual bool disabled() const OVERRIDE { return m_isDisabled; } | 64 virtual bool disabled() const OVERRIDE { return m_isDisabled; } |
| 65 virtual void setDisabled(bool) OVERRIDE; | 65 virtual void setDisabled(bool) OVERRIDE; |
| 66 | 66 |
| 67 PassRefPtr<CSSRuleList> cssRules(); | 67 PassRefPtrWillBeRawPtr<CSSRuleList> cssRules(); |
| 68 unsigned insertRule(const String& rule, unsigned index, ExceptionState&); | 68 unsigned insertRule(const String& rule, unsigned index, ExceptionState&); |
| 69 unsigned insertRule(const String& rule, ExceptionState&); // Deprecated. | 69 unsigned insertRule(const String& rule, ExceptionState&); // Deprecated. |
| 70 void deleteRule(unsigned index, ExceptionState&); | 70 void deleteRule(unsigned index, ExceptionState&); |
| 71 | 71 |
| 72 // IE Extensions | 72 // IE Extensions |
| 73 PassRefPtr<CSSRuleList> rules(); | 73 PassRefPtrWillBeRawPtr<CSSRuleList> rules(); |
| 74 int addRule(const String& selector, const String& style, int index, Exceptio
nState&); | 74 int addRule(const String& selector, const String& style, int index, Exceptio
nState&); |
| 75 int addRule(const String& selector, const String& style, 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 { didMutate(EntireStyleSheetUpdate);
m_ownerNode = 0; } | 82 virtual void clearOwnerNode() OVERRIDE { didMutate(EntireStyleSheetUpdate);
m_ownerNode = 0; } |
| 83 virtual CSSRule* ownerRule() const OVERRIDE { return m_ownerRule; } | 83 virtual CSSRule* ownerRule() const OVERRIDE { return m_ownerRule; } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 bool m_isInlineStylesheet; | 133 bool m_isInlineStylesheet; |
| 134 bool m_isDisabled; | 134 bool m_isDisabled; |
| 135 String m_title; | 135 String m_title; |
| 136 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; | 136 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; |
| 137 | 137 |
| 138 Node* m_ownerNode; | 138 Node* m_ownerNode; |
| 139 RawPtrWillBeMember<CSSRule> m_ownerRule; | 139 RawPtrWillBeMember<CSSRule> m_ownerRule; |
| 140 | 140 |
| 141 TextPosition m_startPosition; | 141 TextPosition m_startPosition; |
| 142 bool m_loadCompleted; | 142 bool m_loadCompleted; |
| 143 | |
| 144 mutable RefPtrWillBeMember<MediaList> m_mediaCSSOMWrapper; | 143 mutable RefPtrWillBeMember<MediaList> m_mediaCSSOMWrapper; |
| 145 mutable WillBeHeapVector<RefPtrWillBeMember<CSSRule> > m_childRuleCSSOMWrapp
ers; | 144 mutable WillBeHeapVector<RefPtrWillBeMember<CSSRule> > m_childRuleCSSOMWrapp
ers; |
| 146 mutable OwnPtr<CSSRuleList> m_ruleListCSSOMWrapper; | 145 mutable OwnPtrWillBeMember<CSSRuleList> m_ruleListCSSOMWrapper; |
| 147 }; | 146 }; |
| 148 | 147 |
| 149 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet) | 148 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet) |
| 150 : m_styleSheet(sheet) | 149 : m_styleSheet(sheet) |
| 151 { | 150 { |
| 152 if (m_styleSheet) | 151 if (m_styleSheet) |
| 153 m_styleSheet->willMutateRules(); | 152 m_styleSheet->willMutateRules(); |
| 154 } | 153 } |
| 155 | 154 |
| 156 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule) | 155 inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule) |
| 157 : m_styleSheet(rule ? rule->parentStyleSheet() : 0) | 156 : m_styleSheet(rule ? rule->parentStyleSheet() : 0) |
| 158 { | 157 { |
| 159 if (m_styleSheet) | 158 if (m_styleSheet) |
| 160 m_styleSheet->willMutateRules(); | 159 m_styleSheet->willMutateRules(); |
| 161 } | 160 } |
| 162 | 161 |
| 163 inline CSSStyleSheet::RuleMutationScope::~RuleMutationScope() | 162 inline CSSStyleSheet::RuleMutationScope::~RuleMutationScope() |
| 164 { | 163 { |
| 165 if (m_styleSheet) | 164 if (m_styleSheet) |
| 166 m_styleSheet->didMutateRules(); | 165 m_styleSheet->didMutateRules(); |
| 167 } | 166 } |
| 168 | 167 |
| 169 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); | 168 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); |
| 170 | 169 |
| 171 } // namespace | 170 } // namespace |
| 172 | 171 |
| 173 #endif | 172 #endif |
| OLD | NEW |