| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 } | 670 } |
| 671 | 671 |
| 672 // m_selectionInitiationState is initialized after dispatching mousedown | 672 // m_selectionInitiationState is initialized after dispatching mousedown |
| 673 // event in order not to keep the selection by DOM APIs because we can't | 673 // event in order not to keep the selection by DOM APIs because we can't |
| 674 // give the user the chance to handle the selection by user action like | 674 // give the user the chance to handle the selection by user action like |
| 675 // dragging if we keep the selection in case of mousedown. FireFox also has | 675 // dragging if we keep the selection in case of mousedown. FireFox also has |
| 676 // the same behavior and it's more compatible with other browsers. | 676 // the same behavior and it's more compatible with other browsers. |
| 677 selectionController().initializeSelectionState(); | 677 selectionController().initializeSelectionState(); |
| 678 HitTestResult hitTestResult = EventHandlingUtil::hitTestResultInFrame( | 678 HitTestResult hitTestResult = EventHandlingUtil::hitTestResultInFrame( |
| 679 m_frame, documentPoint, HitTestRequest::ReadOnly); | 679 m_frame, documentPoint, HitTestRequest::ReadOnly); |
| 680 InputDeviceCapabilities* sourceCapabilities = | 680 InputDeviceCapabilitiesValue sourceCapabilities(mouseEvent.fromTouch()); |
| 681 m_frame->document() | |
| 682 ->domWindow() | |
| 683 ->getInputDeviceCapabilities() | |
| 684 ->firesTouchEvents(mouseEvent.fromTouch()); | |
| 685 | 681 |
| 686 if (eventResult == WebInputEventResult::NotHandled) { | 682 if (eventResult == WebInputEventResult::NotHandled) { |
| 687 eventResult = m_mouseEventManager->handleMouseFocus(hitTestResult, | 683 eventResult = m_mouseEventManager->handleMouseFocus(hitTestResult, |
| 688 sourceCapabilities); | 684 sourceCapabilities); |
| 689 } | 685 } |
| 690 m_mouseEventManager->setCapturesDragging( | 686 m_mouseEventManager->setCapturesDragging( |
| 691 eventResult == WebInputEventResult::NotHandled || mev.scrollbar()); | 687 eventResult == WebInputEventResult::NotHandled || mev.scrollbar()); |
| 692 | 688 |
| 693 // If the hit testing originally determined the event was in a scrollbar, | 689 // If the hit testing originally determined the event was in a scrollbar, |
| 694 // refetch the MouseEventWithHitTestResults in case the scrollbar widget was | 690 // refetch the MouseEventWithHitTestResults in case the scrollbar widget was |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 } | 2129 } |
| 2134 | 2130 |
| 2135 FrameHost* EventHandler::frameHost() const { | 2131 FrameHost* EventHandler::frameHost() const { |
| 2136 if (!m_frame->page()) | 2132 if (!m_frame->page()) |
| 2137 return nullptr; | 2133 return nullptr; |
| 2138 | 2134 |
| 2139 return &m_frame->page()->frameHost(); | 2135 return &m_frame->page()->frameHost(); |
| 2140 } | 2136 } |
| 2141 | 2137 |
| 2142 } // namespace blink | 2138 } // namespace blink |
| OLD | NEW |