OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2006, 2007, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2007, 2012 Apple Inc. All rights reserved. |
5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) | 5 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 CSSRule(CSSStyleSheet* parent) | 86 CSSRule(CSSStyleSheet* parent) |
87 : m_hasCachedSelectorText(false), | 87 : m_hasCachedSelectorText(false), |
88 m_parentIsRule(false), | 88 m_parentIsRule(false), |
89 m_parentStyleSheet(parent) {} | 89 m_parentStyleSheet(parent) {} |
90 | 90 |
91 bool hasCachedSelectorText() const { return m_hasCachedSelectorText; } | 91 bool hasCachedSelectorText() const { return m_hasCachedSelectorText; } |
92 void setHasCachedSelectorText(bool hasCachedSelectorText) const { | 92 void setHasCachedSelectorText(bool hasCachedSelectorText) const { |
93 m_hasCachedSelectorText = hasCachedSelectorText; | 93 m_hasCachedSelectorText = hasCachedSelectorText; |
94 } | 94 } |
95 | 95 |
96 const CSSParserContext& parserContext() const; | 96 const CSSParserContext* parserContext() const; |
97 | 97 |
98 private: | 98 private: |
99 mutable unsigned char m_hasCachedSelectorText : 1; | 99 mutable unsigned char m_hasCachedSelectorText : 1; |
100 unsigned char m_parentIsRule : 1; | 100 unsigned char m_parentIsRule : 1; |
101 | 101 |
102 // These should be Members, but no Members in unions. | 102 // These should be Members, but no Members in unions. |
103 union { | 103 union { |
104 CSSRule* m_parentRule; | 104 CSSRule* m_parentRule; |
105 CSSStyleSheet* m_parentStyleSheet; | 105 CSSStyleSheet* m_parentStyleSheet; |
106 }; | 106 }; |
107 }; | 107 }; |
108 | 108 |
109 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ | 109 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ |
110 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, \ | 110 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, \ |
111 rule.type() == CSSRule::TYPE_NAME) | 111 rule.type() == CSSRule::TYPE_NAME) |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
114 | 114 |
115 #endif // CSSRule_h | 115 #endif // CSSRule_h |
OLD | NEW |