| 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, 2008, 2012, 2013 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2006, 2008, 2012, 2013 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 DECLARE_TRACE_AFTER_DISPATCH(); | 125 DECLARE_TRACE_AFTER_DISPATCH(); |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 friend class CSSLazyParsingTest; | 128 friend class CSSLazyParsingTest; |
| 129 bool HasParsedProperties() const; | 129 bool HasParsedProperties() const; |
| 130 | 130 |
| 131 StyleRule(CSSSelectorList, StylePropertySet*); | 131 StyleRule(CSSSelectorList, StylePropertySet*); |
| 132 StyleRule(CSSSelectorList, CSSLazyPropertyParser*); | 132 StyleRule(CSSSelectorList, CSSLazyPropertyParser*); |
| 133 StyleRule(const StyleRule&); | 133 StyleRule(const StyleRule&); |
| 134 | 134 |
| 135 CSSSelectorList selector_list_; | |
| 136 mutable Member<StylePropertySet> properties_; | |
| 137 mutable Member<CSSLazyPropertyParser> lazy_property_parser_; | |
| 138 | |
| 139 // Whether or not we should consider this for matching rules. Usually we try | 135 // Whether or not we should consider this for matching rules. Usually we try |
| 140 // to avoid considering empty property sets, as an optimization. This is | 136 // to avoid considering empty property sets, as an optimization. This is |
| 141 // not possible for lazy properties, which always need to be considered. The | 137 // not possible for lazy properties, which always need to be considered. The |
| 142 // lazy parser does its best to avoid lazy parsing for properties that look | 138 // lazy parser does its best to avoid lazy parsing for properties that look |
| 143 // empty due to lack of tokens. | 139 // empty due to lack of tokens. |
| 144 enum ConsiderForMatching { | 140 enum ConsiderForMatching { |
| 145 kAlwaysConsider, | 141 kAlwaysConsider, |
| 146 kConsiderIfNonEmpty, | 142 kConsiderIfNonEmpty, |
| 147 }; | 143 }; |
| 148 mutable ConsiderForMatching should_consider_for_matching_rules_; | 144 mutable ConsiderForMatching should_consider_for_matching_rules_; |
| 145 |
| 146 CSSSelectorList selector_list_; |
| 147 mutable Member<StylePropertySet> properties_; |
| 148 mutable Member<CSSLazyPropertyParser> lazy_property_parser_; |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 class StyleRuleFontFace : public StyleRuleBase { | 151 class StyleRuleFontFace : public StyleRuleBase { |
| 152 public: | 152 public: |
| 153 static StyleRuleFontFace* Create(StylePropertySet* properties) { | 153 static StyleRuleFontFace* Create(StylePropertySet* properties) { |
| 154 return new StyleRuleFontFace(properties); | 154 return new StyleRuleFontFace(properties); |
| 155 } | 155 } |
| 156 | 156 |
| 157 ~StyleRuleFontFace(); | 157 ~StyleRuleFontFace(); |
| 158 | 158 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); | 331 DEFINE_STYLE_RULE_TYPE_CASTS(FontFace); |
| 332 DEFINE_STYLE_RULE_TYPE_CASTS(Page); | 332 DEFINE_STYLE_RULE_TYPE_CASTS(Page); |
| 333 DEFINE_STYLE_RULE_TYPE_CASTS(Media); | 333 DEFINE_STYLE_RULE_TYPE_CASTS(Media); |
| 334 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); | 334 DEFINE_STYLE_RULE_TYPE_CASTS(Supports); |
| 335 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); | 335 DEFINE_STYLE_RULE_TYPE_CASTS(Viewport); |
| 336 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); | 336 DEFINE_STYLE_RULE_TYPE_CASTS(Charset); |
| 337 | 337 |
| 338 } // namespace blink | 338 } // namespace blink |
| 339 | 339 |
| 340 #endif // StyleRule_h | 340 #endif // StyleRule_h |
| OLD | NEW |