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

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

Issue 1134173002: Get rid of TreeBoundaryCrossingRules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing important UA rules. Created 5 years, 7 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/ElementRuleCollector.h
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h
index eaccf112e48387bd22682894da4b8dee3065ec6e..06d07fa0709600e4ded11584acefc35e0b3aa86f 100644
--- a/Source/core/css/ElementRuleCollector.h
+++ b/Source/core/css/ElementRuleCollector.h
@@ -39,22 +39,17 @@ class RuleSet;
class SelectorFilter;
class StaticCSSRuleList;
-typedef unsigned CascadeOrder;
-
-const CascadeOrder ignoreCascadeOrder = 0;
-
class MatchedRule {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
- MatchedRule(const RuleData* ruleData, unsigned specificity, CascadeOrder cascadeOrder, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet)
+ MatchedRule(const RuleData* ruleData, unsigned specificity, unsigned styleSheetIndex, const CSSStyleSheet* parentStyleSheet)
: m_ruleData(ruleData)
, m_specificity(specificity)
, m_parentStyleSheet(parentStyleSheet)
{
ASSERT(m_ruleData);
static const unsigned BitsForPositionInRuleData = 18;
- static const unsigned BitsForStyleSheetIndex = 32;
- m_position = ((uint64_t)cascadeOrder << (BitsForStyleSheetIndex + BitsForPositionInRuleData)) + ((uint64_t)styleSheetIndex << BitsForPositionInRuleData)+ m_ruleData->position();
+ m_position = ((uint64_t)styleSheetIndex << BitsForPositionInRuleData) + m_ruleData->position();
}
const RuleData* ruleData() const { return m_ruleData; }
@@ -122,17 +117,18 @@ public:
PassRefPtrWillBeRawPtr<StyleRuleList> matchedStyleRuleList();
PassRefPtrWillBeRawPtr<CSSRuleList> matchedCSSRuleList();
- void collectMatchingRules(const MatchRequest&, CascadeOrder = ignoreCascadeOrder, bool matchingTreeBoundaryRules = false);
- void collectMatchingShadowHostRules(const MatchRequest&, CascadeOrder = ignoreCascadeOrder, bool matchingTreeBoundaryRules = false);
+ void collectMatchingRules(const MatchRequest&, bool matchingTreeBoundaryRules = false);
+ void collectMatchingShadowHostRules(const MatchRequest&, bool matchingTreeBoundaryRules = false);
void sortAndTransferMatchedRules();
void clearMatchedRules();
void addElementStyleProperties(const StylePropertySet*, bool isCacheable = true);
+ void finishAddInlineStyle() { m_result.closeOriginOrScope(); }
private:
template<typename RuleDataListType>
- void collectMatchingRulesForList(const RuleDataListType*, CascadeOrder, const MatchRequest&);
+ void collectMatchingRulesForList(const RuleDataListType*, const MatchRequest&);
- void didMatchRule(const RuleData&, const SelectorChecker::MatchResult&, CascadeOrder, const MatchRequest&);
+ void didMatchRule(const RuleData&, const SelectorChecker::MatchResult&, const MatchRequest&);
template<class CSSRuleCollection>
CSSRule* findStyleRule(CSSRuleCollection*, StyleRule*);
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/ElementRuleCollector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698