OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 26 matching lines...) Expand all Loading... |
37 class RuleData; | 37 class RuleData; |
38 class RuleSet; | 38 class RuleSet; |
39 class SelectorFilter; | 39 class SelectorFilter; |
40 class StaticCSSRuleList; | 40 class StaticCSSRuleList; |
41 | 41 |
42 using CascadeOrder = unsigned; | 42 using CascadeOrder = unsigned; |
43 | 43 |
44 const CascadeOrder ignoreCascadeOrder = 0; | 44 const CascadeOrder ignoreCascadeOrder = 0; |
45 | 45 |
46 class MatchedRule { | 46 class MatchedRule { |
47 ALLOW_ONLY_INLINE_ALLOCATION(); | 47 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
48 public: | 48 public: |
49 MatchedRule(const RuleData* ruleData, unsigned specificity, CascadeOrder cas
cadeOrder, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet) | 49 MatchedRule(const RuleData* ruleData, unsigned specificity, CascadeOrder cas
cadeOrder, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet) |
50 : m_ruleData(ruleData) | 50 : m_ruleData(ruleData) |
51 , m_specificity(specificity) | 51 , m_specificity(specificity) |
52 , m_parentStyleSheet(parentStyleSheet) | 52 , m_parentStyleSheet(parentStyleSheet) |
53 { | 53 { |
54 ASSERT(m_ruleData); | 54 ASSERT(m_ruleData); |
55 static const unsigned BitsForPositionInRuleData = 18; | 55 static const unsigned BitsForPositionInRuleData = 18; |
56 static const unsigned BitsForStyleSheetIndex = 32; | 56 static const unsigned BitsForStyleSheetIndex = 32; |
57 m_position = ((uint64_t)cascadeOrder << (BitsForStyleSheetIndex + BitsFo
rPositionInRuleData)) + ((uint64_t)styleSheetIndex << BitsForPositionInRuleData)
+ m_ruleData->position(); | 57 m_position = ((uint64_t)cascadeOrder << (BitsForStyleSheetIndex + BitsFo
rPositionInRuleData)) + ((uint64_t)styleSheetIndex << BitsForPositionInRuleData)
+ m_ruleData->position(); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 // Output. | 162 // Output. |
163 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; | 163 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; |
164 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; | 164 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; |
165 MatchResult m_result; | 165 MatchResult m_result; |
166 }; | 166 }; |
167 | 167 |
168 } // namespace blink | 168 } // namespace blink |
169 | 169 |
170 #endif // ElementRuleCollector_h | 170 #endif // ElementRuleCollector_h |
OLD | NEW |