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

Unified Diff: third_party/WebKit/Source/core/css/SelectorChecker.cpp

Issue 1958073002: Introduce :-internal-shadow-host-has-appearance pseudo class, and apply it to METER element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove null host check Created 4 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 | « third_party/WebKit/Source/core/css/RuleSet.cpp ('k') | third_party/WebKit/Source/core/css/html.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/SelectorChecker.cpp
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index ab2b95474d06523bf92f83d22d0aabdedafd3c45..3b684aa53b727847acf930e91ebf0b331209ec5b 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -917,6 +917,16 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return m_isUARule && matchesSpatialNavigationFocusPseudoClass(element);
case CSSSelector::PseudoListBox:
return m_isUARule && matchesListBoxPseudoClass(element);
+ case CSSSelector::PseudoHostHasAppearance:
+ if (!m_isUARule)
+ return false;
+ if (ShadowRoot* root = element.containingShadowRoot()) {
+ if (root->type() != ShadowRootType::UserAgent)
+ return false;
+ const ComputedStyle* style = root->host()->computedStyle();
+ return style && style->hasAppearance();
+ }
+ return false;
case CSSSelector::PseudoWindowInactive:
if (!context.hasSelectionPseudo)
return false;
@@ -965,6 +975,12 @@ bool SelectorChecker::checkPseudoElement(const SelectorCheckingContext& context,
return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value();
return false;
}
+ case CSSSelector::PseudoBlinkInternalElement:
+ if (!m_isUARule)
+ return false;
+ if (ShadowRoot* root = element.containingShadowRoot())
+ return root->type() == ShadowRootType::UserAgent && element.shadowPseudoId() == selector.value();
+ return false;
case CSSSelector::PseudoSlotted:
{
SelectorCheckingContext subContext(context);
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleSet.cpp ('k') | third_party/WebKit/Source/core/css/html.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698