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, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv
ed. |
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 String item(unsigned index) const; | 85 String item(unsigned index) const; |
86 void deleteMedium(const String& oldMedium, ExceptionState&); | 86 void deleteMedium(const String& oldMedium, ExceptionState&); |
87 void appendMedium(const String& newMedium, ExceptionState&); | 87 void appendMedium(const String& newMedium, ExceptionState&); |
88 | 88 |
89 String mediaText() const { return m_mediaQueries->mediaText(); } | 89 String mediaText() const { return m_mediaQueries->mediaText(); } |
90 void setMediaText(const String&); | 90 void setMediaText(const String&); |
91 | 91 |
92 // Not part of CSSOM. | 92 // Not part of CSSOM. |
93 CSSRule* parentRule() const { return m_parentRule; } | 93 CSSRule* parentRule() const { return m_parentRule; } |
94 CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } | 94 CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } |
95 void clearParentStyleSheet() { ASSERT(m_parentStyleSheet); m_parentStyleShee
t = 0; } | 95 |
| 96 #if !ENABLE(OILPAN) |
| 97 void clearParentStyleSheet() { ASSERT(m_parentStyleSheet); m_parentStyleShee
t = nullptr; } |
96 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; } | 98 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; } |
| 99 #endif |
| 100 |
97 const MediaQuerySet* queries() const { return m_mediaQueries.get(); } | 101 const MediaQuerySet* queries() const { return m_mediaQueries.get(); } |
98 | 102 |
99 void reattach(MediaQuerySet*); | 103 void reattach(MediaQuerySet*); |
100 | 104 |
101 void trace(Visitor*); | 105 void trace(Visitor*); |
102 | 106 |
103 private: | 107 private: |
104 MediaList(); | 108 MediaList(); |
105 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet); | 109 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet); |
106 MediaList(MediaQuerySet*, CSSRule* parentRule); | 110 MediaList(MediaQuerySet*, CSSRule* parentRule); |
107 | 111 |
108 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; | 112 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; |
109 // Cleared in ~CSSStyleSheet destructor. | 113 // Cleared in ~CSSStyleSheet destructor when oilpan is not enabled. |
110 CSSStyleSheet* m_parentStyleSheet; | 114 RawPtrWillBeMember<CSSStyleSheet> m_parentStyleSheet; |
111 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i
s not enabled. | 115 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i
s not enabled. |
112 RawPtrWillBeMember<CSSRule> m_parentRule; | 116 RawPtrWillBeMember<CSSRule> m_parentRule; |
113 }; | 117 }; |
114 | 118 |
115 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. | 119 // Adds message to inspector console whenever dpi or dpcm values are used for "s
creen" media. |
116 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); | 120 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); |
117 | 121 |
118 } // namespace | 122 } // namespace |
119 | 123 |
120 #endif | 124 #endif |
OLD | NEW |