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

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 landing Created 7 years, 6 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 | « LayoutTests/fast/dom/hover-after-dom-delete-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 933e39f58659d1bf940fcef5f4baaaca39a57c26..7d6e736cb59209b64da43fe1468295815357e35c 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3114,6 +3114,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();
}
« no previous file with comments | « LayoutTests/fast/dom/hover-after-dom-delete-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698