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. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All rights reserved. | 4 * 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 public: | 54 public: |
55 MatchedRule(const RuleData* ruleData, | 55 MatchedRule(const RuleData* ruleData, |
56 unsigned specificity, | 56 unsigned specificity, |
57 CascadeOrder cascadeOrder, | 57 CascadeOrder cascadeOrder, |
58 unsigned styleSheetIndex, | 58 unsigned styleSheetIndex, |
59 const CSSStyleSheet* parentStyleSheet) | 59 const CSSStyleSheet* parentStyleSheet) |
60 : m_ruleData(ruleData), | 60 : m_ruleData(ruleData), |
61 m_specificity(specificity), | 61 m_specificity(specificity), |
62 m_parentStyleSheet(parentStyleSheet) { | 62 m_parentStyleSheet(parentStyleSheet) { |
63 ASSERT(m_ruleData); | 63 DCHECK(m_ruleData); |
64 static const unsigned BitsForPositionInRuleData = 18; | 64 static const unsigned BitsForPositionInRuleData = 18; |
65 static const unsigned BitsForStyleSheetIndex = 32; | 65 static const unsigned BitsForStyleSheetIndex = 32; |
66 m_position = ((uint64_t)cascadeOrder | 66 m_position = ((uint64_t)cascadeOrder |
67 << (BitsForStyleSheetIndex + BitsForPositionInRuleData)) + | 67 << (BitsForStyleSheetIndex + BitsForPositionInRuleData)) + |
68 ((uint64_t)styleSheetIndex << BitsForPositionInRuleData) + | 68 ((uint64_t)styleSheetIndex << BitsForPositionInRuleData) + |
69 m_ruleData->position(); | 69 m_ruleData->position(); |
70 } | 70 } |
71 | 71 |
72 const RuleData* ruleData() const { return m_ruleData; } | 72 const RuleData* ruleData() const { return m_ruleData; } |
73 uint64_t position() const { return m_position; } | 73 uint64_t position() const { return m_position; } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // Output. | 183 // Output. |
184 Member<StaticCSSRuleList> m_cssRuleList; | 184 Member<StaticCSSRuleList> m_cssRuleList; |
185 Member<StyleRuleList> m_styleRuleList; | 185 Member<StyleRuleList> m_styleRuleList; |
186 MatchResult m_result; | 186 MatchResult m_result; |
187 }; | 187 }; |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #endif // ElementRuleCollector_h | 191 #endif // ElementRuleCollector_h |
OLD | NEW |