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(); |
} |