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

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 861553003: Invalidate CustomScrollbars on having window-inactive selector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 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
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index 52e2eae7f086d1b556ac455572617c2e04aa94b0..ddb401d66e241015bab7c91e6cc0f973396da7e7 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -480,6 +480,8 @@ void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& selector, Ru
for (const CSSSelector* current = &selector; current; current = current->tagHistory()) {
if (current->pseudoType() == CSSSelector::PseudoFirstLine)
metadata.usesFirstLineRules = true;
+ if (current->pseudoType() == CSSSelector::PseudoWindowInactive)
+ metadata.usesWindowInactiveSelector = true;
if (current->isDirectAdjacentSelector()) {
maxDirectAdjacentSelectors++;
} else if (maxDirectAdjacentSelectors) {
@@ -504,12 +506,14 @@ void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector& selector, Ru
void RuleFeatureSet::FeatureMetadata::add(const FeatureMetadata& other)
{
usesFirstLineRules = usesFirstLineRules || other.usesFirstLineRules;
+ usesWindowInactiveSelector = usesWindowInactiveSelector || other.usesWindowInactiveSelector;
maxDirectAdjacentSelectors = std::max(maxDirectAdjacentSelectors, other.maxDirectAdjacentSelectors);
}
void RuleFeatureSet::FeatureMetadata::clear()
{
usesFirstLineRules = false;
+ usesWindowInactiveSelector = false;
foundSiblingSelector = false;
maxDirectAdjacentSelectors = 0;
}
« no previous file with comments | « Source/core/css/RuleFeature.h ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698