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

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: Use == instead of strcmp() Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/mouse-wheel-main-frame-event.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a91217a5b18caa6ea2731fa91ff411478eaf9089..fd6f16e708589071f3fe7782296be36993cb16ab 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1593,6 +1593,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())
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/mouse-wheel-main-frame-event.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698