| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |