| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 virtual bool isLoading() const OVERRIDE; | 85 virtual bool isLoading() const OVERRIDE; |
| 86 | 86 |
| 87 void clearOwnerRule() { m_ownerRule = nullptr; } | 87 void clearOwnerRule() { m_ownerRule = nullptr; } |
| 88 Document* ownerDocument() const; | 88 Document* ownerDocument() const; |
| 89 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } | 89 MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); } |
| 90 void setMediaQueries(PassRefPtrWillBeRawPtr<MediaQuerySet>); | 90 void setMediaQueries(PassRefPtrWillBeRawPtr<MediaQuerySet>); |
| 91 void setTitle(const String& title) { m_title = title; } | 91 void setTitle(const String& title) { m_title = title; } |
| 92 | 92 |
| 93 class RuleMutationScope { | 93 class RuleMutationScope { |
| 94 WTF_MAKE_NONCOPYABLE(RuleMutationScope); | 94 WTF_MAKE_NONCOPYABLE(RuleMutationScope); |
| 95 STACK_ALLOCATED(); |
| 95 public: | 96 public: |
| 96 RuleMutationScope(CSSStyleSheet*); | 97 explicit RuleMutationScope(CSSStyleSheet*); |
| 97 RuleMutationScope(CSSRule*); | 98 explicit RuleMutationScope(CSSRule*); |
| 98 ~RuleMutationScope(); | 99 ~RuleMutationScope(); |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 CSSStyleSheet* m_styleSheet; | 102 RawPtrWillBeMember<CSSStyleSheet> m_styleSheet; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 void willMutateRules(); | 105 void willMutateRules(); |
| 105 void didMutateRules(); | 106 void didMutateRules(); |
| 106 void didMutate(StyleSheetUpdateType = PartialRuleUpdate); | 107 void didMutate(StyleSheetUpdateType = PartialRuleUpdate); |
| 107 | 108 |
| 108 void clearChildRuleCSSOMWrappers(); | 109 void clearChildRuleCSSOMWrappers(); |
| 109 | 110 |
| 110 StyleSheetContents* contents() const { return m_contents.get(); } | 111 StyleSheetContents* contents() const { return m_contents.get(); } |
| 111 | 112 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 { | 166 { |
| 166 if (m_styleSheet) | 167 if (m_styleSheet) |
| 167 m_styleSheet->didMutateRules(); | 168 m_styleSheet->didMutateRules(); |
| 168 } | 169 } |
| 169 | 170 |
| 170 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); | 171 DEFINE_TYPE_CASTS(CSSStyleSheet, StyleSheet, sheet, sheet->isCSSStyleSheet(), sh
eet.isCSSStyleSheet()); |
| 171 | 172 |
| 172 } // namespace | 173 } // namespace |
| 173 | 174 |
| 174 #endif | 175 #endif |
| OLD | NEW |