| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 void setCSSText(const String&) {} | 83 void setCSSText(const String&) {} |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 CSSRule(CSSStyleSheet* parent) | 86 CSSRule(CSSStyleSheet* parent) |
| 87 : has_cached_selector_text_(false), | 87 : has_cached_selector_text_(false), |
| 88 parent_is_rule_(false), | 88 parent_is_rule_(false), |
| 89 parent_style_sheet_(parent) {} | 89 parent_style_sheet_(parent) {} |
| 90 | 90 |
| 91 bool HasCachedSelectorText() const { return has_cached_selector_text_; } | 91 bool HasCachedSelectorText() const { return has_cached_selector_text_; } |
| 92 void SetHasCachedSelectorText(bool has_cached_selector_text) const { | 92 void SetHasCachedSelectorText(bool has_cached_selector_text) const { |
| 93 LOG(ERROR) << "Adding Some logs to text"; |
| 93 has_cached_selector_text_ = has_cached_selector_text; | 94 has_cached_selector_text_ = has_cached_selector_text; |
| 94 } | 95 } |
| 95 | 96 |
| 96 const CSSParserContext* ParserContext() const; | 97 const CSSParserContext* ParserContext() const; |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 mutable unsigned char has_cached_selector_text_ : 1; | 100 mutable unsigned char has_cached_selector_text_ : 1; |
| 100 unsigned char parent_is_rule_ : 1; | 101 unsigned char parent_is_rule_ : 1; |
| 101 | 102 |
| 102 // These should be Members, but no Members in unions. | 103 // These should be Members, but no Members in unions. |
| 103 union { | 104 union { |
| 104 CSSRule* parent_rule_; | 105 CSSRule* parent_rule_; |
| 105 CSSStyleSheet* parent_style_sheet_; | 106 CSSStyleSheet* parent_style_sheet_; |
| 106 }; | 107 }; |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ | 110 #define DEFINE_CSS_RULE_TYPE_CASTS(ToType, TYPE_NAME) \ |
| 110 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, \ | 111 DEFINE_TYPE_CASTS(ToType, CSSRule, rule, rule->type() == CSSRule::TYPE_NAME, \ |
| 111 rule.type() == CSSRule::TYPE_NAME) | 112 rule.type() == CSSRule::TYPE_NAME) |
| 112 | 113 |
| 113 } // namespace blink | 114 } // namespace blink |
| 114 | 115 |
| 115 #endif // CSSRule_h | 116 #endif // CSSRule_h |
| OLD | NEW |