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

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

Issue 1803933002: Use correct cascading order for Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix enum Created 4 years, 9 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: third_party/WebKit/Source/core/css/ElementRuleCollector.h
diff --git a/third_party/WebKit/Source/core/css/ElementRuleCollector.h b/third_party/WebKit/Source/core/css/ElementRuleCollector.h
index bfbb32d1f026730f41f82d854d54b7bded661100..dc92aefd08e77f88dd1b6749ae2dae646ed55e09 100644
--- a/third_party/WebKit/Source/core/css/ElementRuleCollector.h
+++ b/third_party/WebKit/Source/core/css/ElementRuleCollector.h
@@ -39,8 +39,9 @@ class RuleSet;
class SelectorFilter;
class StaticCSSRuleList;
+// TODO(kochi): CascadeOrder is used only for Shadow DOM V0 bug-compatible cascading order.
+// Once Shadow DOM V0 implementation is gone, remove this completely.
using CascadeOrder = unsigned;
-
const CascadeOrder ignoreCascadeOrder = 0;
class MatchedRule {
@@ -54,7 +55,7 @@ public:
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)cascadeOrder << (BitsForStyleSheetIndex + BitsForPositionInRuleData)) + ((uint64_t)styleSheetIndex << BitsForPositionInRuleData) + m_ruleData->position();
}
const RuleData* ruleData() const { return m_ruleData; }
@@ -129,6 +130,7 @@ public:
void finishAddingAuthorRulesForTreeScope() { m_result.finishAddingAuthorRulesForTreeScope(); }
void setIncludeEmptyRules(bool include) { m_includeEmptyRules = include; }
bool includeEmptyRules() const { return m_includeEmptyRules; }
+ bool isCollectingForPseudoElement() const { return m_pseudoStyleRequest.pseudoId != PseudoIdNone; }
private:
template<typename RuleDataListType>

Powered by Google App Engine
This is Rietveld 408576698