Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: Source/core/css/ElementRuleCollector.h

Issue 102953007: Selectors in styles in shadowRoots should match in all of the host's shadowRoots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/css/ElementRuleCollector.h
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h
index 494b77e994bcc24a15a9dd12757fa61347f0c2cb..df0b8c6fcb12e18100de3f1ecd6717b5a07aeced 100644
--- a/Source/core/css/ElementRuleCollector.h
+++ b/Source/core/css/ElementRuleCollector.h
@@ -54,28 +54,26 @@ public:
: m_ruleData(ruleData)
, m_specificity(specificity)
, m_cascadeScope(cascadeScope)
- , m_styleSheetIndex(styleSheetIndex)
, m_parentStyleSheet(parentStyleSheet)
{
ASSERT(m_ruleData);
static const unsigned BitsForPositionInRuleData = 18;
- m_position = (cascadeOrder << BitsForPositionInRuleData) + m_ruleData->position();
+ static const unsigned BitsForStyleSheetIndexInRuleData = 32;
+ m_position = ((uint64_t)cascadeOrder << (BitsForStyleSheetIndexInRuleData + BitsForPositionInRuleData)) + ((uint64_t)styleSheetIndex << BitsForPositionInRuleData) + m_ruleData->position();
}
const RuleData* ruleData() const { return m_ruleData; }
uint32_t cascadeScope() const { return m_cascadeScope; }
uint32_t position() const { return m_position; }
unsigned specificity() const { return ruleData()->specificity() + m_specificity; }
- uint32_t styleSheetIndex() const { return m_styleSheetIndex; }
const CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
private:
const RuleData* m_ruleData;
unsigned m_specificity;
CascadeScope m_cascadeScope;
- uint32_t m_position;
- uint32_t m_styleSheetIndex;
const CSSStyleSheet* m_parentStyleSheet;
+ uint64_t m_position;
};
class StyleRuleList : public RefCounted<StyleRuleList> {

Powered by Google App Engine
This is Rietveld 408576698