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

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: add hover flag 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()) {
Navid Zolghadr 2017/07/05 17:37:33 If we are dragging a draggable object on the page
lanwei 2017/07/06 03:04:34 I tested that when we are starting the drag mode,
+ 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)

Powered by Google App Engine
This is Rietveld 408576698