Index: third_party/WebKit/Source/core/frame/LocalFrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp |
index f0a5ea25c309b9158561feab00cf5ea3fa2063c5..64e34aef7523db8c34c39b7a1495f0559a2556c1 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrameView.cpp |
@@ -2597,7 +2597,15 @@ void LocalFrameView::PerformPostLayoutTasks() { |
// if there are no RemoteFrame ancestors in the frame tree. Use of |
// localFrameRoot() is discouraged but will change when cursor update |
// scheduling is moved from EventHandler to PageEventHandler. |
- GetFrame().LocalFrameRoot().GetEventHandler().ScheduleCursorUpdate(); |
+ |
+ // Fire a fake a mouse move event to update hover state and mouse cursor, and |
+ // send the right mouse out/over events. |
+ if (RuntimeEnabledFeatures::UpdateHoverPostLayoutEnabled()) { |
+ frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon( |
+ MouseEventManager::FakeMouseMoveReason::kPerFrame); |
+ } else { |
+ GetFrame().LocalFrameRoot().GetEventHandler().ScheduleCursorUpdate(); |
+ } |
UpdateGeometries(); |
@@ -4168,7 +4176,8 @@ void LocalFrameView::UpdateScrollOffset(const ScrollOffset& offset, |
Document* document = frame_->GetDocument(); |
document->EnqueueScrollEventForNode(document); |
- frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon(); |
+ frame_->GetEventHandler().DispatchFakeMouseMoveEventSoon( |
+ MouseEventManager::FakeMouseMoveReason::kDuringScroll); |
if (scroll_type == kUserScroll || scroll_type == kCompositorScroll) { |
Page* page = GetFrame().GetPage(); |
if (page) |