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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided. 1597 // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided.
1598 found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTy peForward, nullptr)); 1598 found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTy peForward, nullptr));
1599 return true; 1599 return true;
1600 } 1600 }
1601 } 1601 }
1602 return false; 1602 return false;
1603 } 1603 }
1604 1604
1605 WebInputEventResult EventHandler::handleWheelEvent(const PlatformWheelEvent& eve nt) 1605 WebInputEventResult EventHandler::handleWheelEvent(const PlatformWheelEvent& eve nt)
1606 { 1606 {
1607 #if OS(MACOSX)
1608 // Filter Mac OS specific phases, usually with a zero-delta.
1609 // https://crbug.com/553732
1610 // TODO(chongz): EventSender sends events with |PlatformWheelEventPhaseNone| , but it shouldn't.
1611 const int kPlatformWheelEventPhaseNoEventMask = PlatformWheelEventPhaseEnded | PlatformWheelEventPhaseCancelled | PlatformWheelEventPhaseMayBegin;
1612 if ((event.phase() & kPlatformWheelEventPhaseNoEventMask) || (event.momentum Phase() & kPlatformWheelEventPhaseNoEventMask))
1613 return WebInputEventResult::NotHandled;
1614 #endif
1607 Document* doc = m_frame->document(); 1615 Document* doc = m_frame->document();
1608 1616
1609 if (doc->layoutViewItem().isNull()) 1617 if (doc->layoutViewItem().isNull())
1610 return WebInputEventResult::NotHandled; 1618 return WebInputEventResult::NotHandled;
1611 1619
1612 FrameView* view = m_frame->view(); 1620 FrameView* view = m_frame->view();
1613 if (!view) 1621 if (!view)
1614 return WebInputEventResult::NotHandled; 1622 return WebInputEventResult::NotHandled;
1615 1623
1616 LayoutPoint vPoint = view->rootFrameToContents(event.position()); 1624 LayoutPoint vPoint = view->rootFrameToContents(event.position());
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 2858
2851 FrameHost* EventHandler::frameHost() const 2859 FrameHost* EventHandler::frameHost() const
2852 { 2860 {
2853 if (!m_frame->page()) 2861 if (!m_frame->page())
2854 return nullptr; 2862 return nullptr;
2855 2863
2856 return &m_frame->page()->frameHost(); 2864 return &m_frame->page()->frameHost();
2857 } 2865 }
2858 2866
2859 } // namespace blink 2867 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698