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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2049323002: [Mac] Don't dispatch wheel events for PhaseMayBegin|Cancelled|Ended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add filter and LayoutTests Created 4 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
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 04b488f2cf5755fc2d017c11b7f5758beeeb7fc9..a9556eb777c47805253d8305a795d53b6b5aa7cb 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1604,6 +1604,14 @@ bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element)
WebInputEventResult EventHandler::handleWheelEvent(const PlatformWheelEvent& event)
{
+#if OS(MACOSX)
+ // Filter Mac OS specific phases, usually with a zero-delta.
+ // https://crbug.com/553732
+ // TODO(chongz): EventSender sends events with |PlatformWheelEventPhaseNone|, but it shouldn't.
+ const int kPlatformWheelEventPhaseNoEventMask = PlatformWheelEventPhaseEnded | PlatformWheelEventPhaseCancelled | PlatformWheelEventPhaseMayBegin;
+ if ((event.phase() & kPlatformWheelEventPhaseNoEventMask) || (event.momentumPhase() & kPlatformWheelEventPhaseNoEventMask))
+ return WebInputEventResult::NotHandled;
+#endif
Document* doc = m_frame->document();
if (doc->layoutViewItem().isNull())

Powered by Google App Engine
This is Rietveld 408576698