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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrameView.cpp

Issue 2956023004: Add a flag to update hover effect when a layout is changed (Closed)
Patch Set: Remove pause in test Created 3 years, 5 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: 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)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698