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

Unified Diff: Source/core/dom/Document.cpp

Issue 1064543002: Set hovered state of current Hovered node even if it is also common ancestor of oldHovered node and (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 6a4f0e2b59f2e4631bfc56e442dcc7cd3e0cbe94..2968c569bad648eaa7c7d1e2dcef30c697b9d9a6 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5313,17 +5313,12 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
nodesToRemoveFromChain[i]->setHovered(false);
}
- bool sawCommonAncestor = false;
size_t addCount = nodesToAddToChain.size();
for (size_t i = 0; i < addCount; ++i) {
// Elements past the common ancestor do not change hover state, but might change active state.
- if (ancestorNode && nodesToAddToChain[i] == ancestorNode)
- sawCommonAncestor = true;
if (allowActiveChanges)
nodesToAddToChain[i]->setActive(true);
- if (!sawCommonAncestor) {
- nodesToAddToChain[i]->setHovered(true);
- }
+ nodesToAddToChain[i]->setHovered(true);
}
}

Powered by Google App Engine
This is Rietveld 408576698