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

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

Issue 16285002: Do not invoke or clear hover effects on node deletion when cursor is invisible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for review Created 7 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index a068fbaa7edf738b5c1e7cb87a95bda7d0d02e44..490203d6bada44b15b8e0d6ddb68243e799447a9 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3126,6 +3126,13 @@ void Document::hoveredNodeDetached(Node* node)
m_hoverNode = node->parentNode();
while (m_hoverNode && !m_hoverNode->renderer())
m_hoverNode = m_hoverNode->parentNode();
+
+ // If the mouse cursor is not visible, do not clear existing
+ // hover effects on the ancestors of |node| and do not invoke
+ // new hover effects on any other element.
+ if (!page()->isCursorVisible())
+ return;
+
if (frame())
frame()->eventHandler()->scheduleHoverStateUpdate();
}

Powered by Google App Engine
This is Rietveld 408576698