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

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

Issue 848853004: Support :hover/:active in quirks when leftmost in compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/SelectorChecker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 099a94cd6a4073d6787053d246c48cf3df6305a2..5e6120d9b62cc8ea6a24da162d634a57793cb8f9 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -781,7 +781,7 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, c
case CSSSelector::PseudoHover:
// If we're in quirks mode, then hover should never match anchors with no
// href and *:hover should not match anything. This is important for sites like wsj.com.
kochi 2015/01/15 10:04:11 Could you move this comment and the comment for Ps
rune 2015/01/15 10:29:02 Done. I removed the reference to wsj.com since th
- if (m_strictParsing || context.isSubSelector || element.isLink()) {
+ if (shouldMatchHoverOrActive(context)) {
if (m_mode == ResolvingStyle) {
if (context.elementStyle)
context.elementStyle->setAffectedByHover();
@@ -795,7 +795,7 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, c
case CSSSelector::PseudoActive:
// If we're in quirks mode, then :active should never match anchors with no
// href and *:active should not match anything.
- if (m_strictParsing || context.isSubSelector || element.isLink()) {
+ if (shouldMatchHoverOrActive(context)) {
if (m_mode == ResolvingStyle) {
if (context.elementStyle)
context.elementStyle->setAffectedByActive();
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698