| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 CSSRule* item(unsigned index); | 79 CSSRule* item(unsigned index); |
| 80 | 80 |
| 81 void clearOwnerNode() override; | 81 void clearOwnerNode() override; |
| 82 | 82 |
| 83 CSSRule* ownerRule() const override { return m_ownerRule; } | 83 CSSRule* ownerRule() const override { return m_ownerRule; } |
| 84 KURL baseURL() const override; | 84 KURL baseURL() const override; |
| 85 bool isLoading() const override; | 85 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; | 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 // Set by LinkStyle iff CORS-enabled fetch of stylesheet succeeded from this
origin. | 92 // Set by LinkStyle iff CORS-enabled fetch of stylesheet succeeded from this
origin. |
| 93 void setAllowRuleAccessFromOrigin(PassRefPtr<SecurityOrigin> allowedOrigin); | 93 void setAllowRuleAccessFromOrigin(PassRefPtr<SecurityOrigin> allowedOrigin); |
| 94 | 94 |
| 95 class RuleMutationScope { | 95 class RuleMutationScope { |
| 96 WTF_MAKE_NONCOPYABLE(RuleMutationScope); | 96 WTF_MAKE_NONCOPYABLE(RuleMutationScope); |
| 97 STACK_ALLOCATED(); | 97 STACK_ALLOCATED(); |
| 98 public: | 98 public: |
| 99 explicit RuleMutationScope(CSSStyleSheet*); | 99 explicit RuleMutationScope(CSSStyleSheet*); |
| 100 explicit RuleMutationScope(CSSRule*); | 100 explicit RuleMutationScope(CSSRule*); |
| 101 ~RuleMutationScope(); | 101 ~RuleMutationScope(); |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 RawPtrWillBeMember<CSSStyleSheet> m_styleSheet; | 104 RawPtrWillBeMember<CSSStyleSheet> m_styleSheet; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 void willMutateRules(); | 107 void willMutateRules(); |
| 108 void didMutateRules(); | 108 void didMutateRules(); |
| 109 void didMutate(StyleSheetUpdateType = PartialRuleUpdate); | 109 void didMutate(StyleSheetUpdateType = PartialRuleUpdate); |
| 110 | 110 |
| 111 void clearChildRuleCSSOMWrappers(); | 111 void clearChildRuleCSSOMWrappers(); |
| 112 | 112 |
| 113 StyleSheetContents* contents() const; | 113 StyleSheetContents* contents() const { return m_contents.get(); } |
| 114 | 114 |
| 115 bool isInline() const { return m_isInlineStylesheet; } | 115 bool isInline() const { return m_isInlineStylesheet; } |
| 116 TextPosition startPositionInSource() const { return m_startPosition; } | 116 TextPosition startPositionInSource() const { return m_startPosition; } |
| 117 | 117 |
| 118 bool sheetLoaded(); | 118 bool sheetLoaded(); |
| 119 bool loadCompleted() const { return m_loadCompleted; } | 119 bool loadCompleted() const { return m_loadCompleted; } |
| 120 void startLoadingDynamicSheet(); | 120 void startLoadingDynamicSheet(); |
| 121 | 121 |
| 122 DECLARE_VIRTUAL_TRACE(); | 122 DECLARE_VIRTUAL_TRACE(); |
| 123 | 123 |
| (...skipping 46 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 |