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

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

Issue 1562493002: Cousins may not share style when ascendant affected bits set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/css/children-affected-by-style-sharing-expected.txt ('k') | no next file » | 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 059d75bd91d9fbce37afaef90ba93f758c1e3973..3b72243fdd7c400765bf48753e575aeafbe5e52d 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -834,26 +834,32 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return element.isLink() && context.visitedMatchType == VisitedMatchEnabled;
case CSSSelector::PseudoDrag:
if (m_mode == ResolvingStyle) {
- if (context.inRightmostCompound)
+ if (context.inRightmostCompound) {
context.elementStyle->setAffectedByDrag();
- else
+ } else {
+ context.elementStyle->setUnique();
element.setChildrenOrSiblingsAffectedByDrag();
+ }
}
return element.layoutObject() && element.layoutObject()->isDragging();
case CSSSelector::PseudoFocus:
if (m_mode == ResolvingStyle) {
- if (context.inRightmostCompound)
+ if (context.inRightmostCompound) {
context.elementStyle->setAffectedByFocus();
- else
+ } else {
+ context.elementStyle->setUnique();
element.setChildrenOrSiblingsAffectedByFocus();
+ }
}
return matchesFocusPseudoClass(element);
case CSSSelector::PseudoHover:
if (m_mode == ResolvingStyle) {
- if (context.inRightmostCompound)
+ if (context.inRightmostCompound) {
context.elementStyle->setAffectedByHover();
- else
+ } else {
+ context.elementStyle->setUnique();
element.setChildrenOrSiblingsAffectedByHover();
+ }
}
if (!shouldMatchHoverOrActive(context))
return false;
@@ -862,10 +868,12 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, M
return element.hovered();
case CSSSelector::PseudoActive:
if (m_mode == ResolvingStyle) {
- if (context.inRightmostCompound)
+ if (context.inRightmostCompound) {
context.elementStyle->setAffectedByActive();
- else
+ } else {
+ context.elementStyle->setUnique();
element.setChildrenOrSiblingsAffectedByActive();
+ }
}
if (!shouldMatchHoverOrActive(context))
return false;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/children-affected-by-style-sharing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698