| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "core/editing/Editor.h" | 44 #include "core/editing/Editor.h" |
| 45 #include "core/editing/FrameSelection.h" | 45 #include "core/editing/FrameSelection.h" |
| 46 #include "core/editing/SelectionController.h" | 46 #include "core/editing/SelectionController.h" |
| 47 #include "core/events/EventPath.h" | 47 #include "core/events/EventPath.h" |
| 48 #include "core/events/GestureEvent.h" | 48 #include "core/events/GestureEvent.h" |
| 49 #include "core/events/KeyboardEvent.h" | 49 #include "core/events/KeyboardEvent.h" |
| 50 #include "core/events/MouseEvent.h" | 50 #include "core/events/MouseEvent.h" |
| 51 #include "core/events/PointerEvent.h" | 51 #include "core/events/PointerEvent.h" |
| 52 #include "core/events/TextEvent.h" | 52 #include "core/events/TextEvent.h" |
| 53 #include "core/events/TouchEvent.h" | 53 #include "core/events/TouchEvent.h" |
| 54 #include "core/events/WheelEvent.h" | |
| 55 #include "core/frame/Deprecation.h" | 54 #include "core/frame/Deprecation.h" |
| 56 #include "core/frame/EventHandlerRegistry.h" | 55 #include "core/frame/EventHandlerRegistry.h" |
| 57 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
| 58 #include "core/frame/LocalFrameClient.h" | 57 #include "core/frame/LocalFrameClient.h" |
| 59 #include "core/frame/LocalFrameView.h" | 58 #include "core/frame/LocalFrameView.h" |
| 60 #include "core/frame/Settings.h" | 59 #include "core/frame/Settings.h" |
| 61 #include "core/frame/UseCounter.h" | 60 #include "core/frame/UseCounter.h" |
| 62 #include "core/frame/VisualViewport.h" | 61 #include "core/frame/VisualViewport.h" |
| 63 #include "core/html/HTMLDialogElement.h" | 62 #include "core/html/HTMLDialogElement.h" |
| 64 #include "core/html/HTMLFrameElementBase.h" | 63 #include "core/html/HTMLFrameElementBase.h" |
| 65 #include "core/html/HTMLFrameSetElement.h" | 64 #include "core/html/HTMLFrameSetElement.h" |
| 66 #include "core/html/HTMLInputElement.h" | 65 #include "core/html/HTMLInputElement.h" |
| 67 #include "core/input/EventHandlingUtil.h" | 66 #include "core/input/EventHandlingUtil.h" |
| 68 #include "core/input/InputDeviceCapabilities.h" | 67 #include "core/input/InputDeviceCapabilities.h" |
| 69 #include "core/input/TouchActionUtil.h" | 68 #include "core/input/TouchActionUtil.h" |
| 70 #include "core/layout/HitTestRequest.h" | 69 #include "core/layout/HitTestRequest.h" |
| 71 #include "core/layout/HitTestResult.h" | 70 #include "core/layout/HitTestResult.h" |
| 72 #include "core/layout/LayoutEmbeddedContent.h" | |
| 73 #include "core/layout/LayoutView.h" | 71 #include "core/layout/LayoutView.h" |
| 74 #include "core/layout/api/LayoutViewItem.h" | 72 #include "core/layout/api/LayoutViewItem.h" |
| 75 #include "core/loader/DocumentLoader.h" | 73 #include "core/loader/DocumentLoader.h" |
| 76 #include "core/loader/FrameLoader.h" | 74 #include "core/loader/FrameLoader.h" |
| 77 #include "core/loader/resource/ImageResourceContent.h" | 75 #include "core/loader/resource/ImageResourceContent.h" |
| 78 #include "core/page/AutoscrollController.h" | 76 #include "core/page/AutoscrollController.h" |
| 79 #include "core/page/ChromeClient.h" | 77 #include "core/page/ChromeClient.h" |
| 80 #include "core/page/DragState.h" | 78 #include "core/page/DragState.h" |
| 81 #include "core/page/FocusController.h" | 79 #include "core/page/FocusController.h" |
| 82 #include "core/page/FrameTree.h" | 80 #include "core/page/FrameTree.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 this, | 183 this, |
| 186 &EventHandler::HoverTimerFired), | 184 &EventHandler::HoverTimerFired), |
| 187 cursor_update_timer_( | 185 cursor_update_timer_( |
| 188 TaskRunnerHelper::Get(TaskType::kUnspecedTimer, &frame), | 186 TaskRunnerHelper::Get(TaskType::kUnspecedTimer, &frame), |
| 189 this, | 187 this, |
| 190 &EventHandler::CursorUpdateTimerFired), | 188 &EventHandler::CursorUpdateTimerFired), |
| 191 event_handler_will_reset_capturing_mouse_events_node_(0), | 189 event_handler_will_reset_capturing_mouse_events_node_(0), |
| 192 should_only_fire_drag_over_event_(false), | 190 should_only_fire_drag_over_event_(false), |
| 193 scroll_manager_(new ScrollManager(frame)), | 191 scroll_manager_(new ScrollManager(frame)), |
| 194 mouse_event_manager_(new MouseEventManager(frame, *scroll_manager_)), | 192 mouse_event_manager_(new MouseEventManager(frame, *scroll_manager_)), |
| 193 mouse_wheel_event_manager_( |
| 194 new MouseWheelEventManager(frame, *scroll_manager_)), |
| 195 keyboard_event_manager_( | 195 keyboard_event_manager_( |
| 196 new KeyboardEventManager(frame, *scroll_manager_)), | 196 new KeyboardEventManager(frame, *scroll_manager_)), |
| 197 pointer_event_manager_( | 197 pointer_event_manager_( |
| 198 new PointerEventManager(frame, *mouse_event_manager_)), | 198 new PointerEventManager(frame, *mouse_event_manager_)), |
| 199 gesture_manager_(new GestureManager(frame, | 199 gesture_manager_(new GestureManager(frame, |
| 200 *scroll_manager_, | 200 *scroll_manager_, |
| 201 *mouse_event_manager_, | 201 *mouse_event_manager_, |
| 202 *pointer_event_manager_, | 202 *pointer_event_manager_, |
| 203 *selection_controller_)), | 203 *selection_controller_)), |
| 204 active_interval_timer_( | 204 active_interval_timer_( |
| 205 TaskRunnerHelper::Get(TaskType::kUserInteraction, &frame), | 205 TaskRunnerHelper::Get(TaskType::kUserInteraction, &frame), |
| 206 this, | 206 this, |
| 207 &EventHandler::ActiveIntervalTimerFired) {} | 207 &EventHandler::ActiveIntervalTimerFired) {} |
| 208 | 208 |
| 209 DEFINE_TRACE(EventHandler) { | 209 DEFINE_TRACE(EventHandler) { |
| 210 visitor->Trace(frame_); | 210 visitor->Trace(frame_); |
| 211 visitor->Trace(selection_controller_); | 211 visitor->Trace(selection_controller_); |
| 212 visitor->Trace(capturing_mouse_events_node_); | 212 visitor->Trace(capturing_mouse_events_node_); |
| 213 visitor->Trace(last_mouse_move_event_subframe_); | 213 visitor->Trace(last_mouse_move_event_subframe_); |
| 214 visitor->Trace(last_scrollbar_under_mouse_); | 214 visitor->Trace(last_scrollbar_under_mouse_); |
| 215 visitor->Trace(drag_target_); | 215 visitor->Trace(drag_target_); |
| 216 visitor->Trace(frame_set_being_resized_); | 216 visitor->Trace(frame_set_being_resized_); |
| 217 visitor->Trace(scroll_manager_); | 217 visitor->Trace(scroll_manager_); |
| 218 visitor->Trace(mouse_event_manager_); | 218 visitor->Trace(mouse_event_manager_); |
| 219 visitor->Trace(mouse_wheel_event_manager_); |
| 219 visitor->Trace(keyboard_event_manager_); | 220 visitor->Trace(keyboard_event_manager_); |
| 220 visitor->Trace(pointer_event_manager_); | 221 visitor->Trace(pointer_event_manager_); |
| 221 visitor->Trace(gesture_manager_); | 222 visitor->Trace(gesture_manager_); |
| 222 visitor->Trace(last_deferred_tap_element_); | 223 visitor->Trace(last_deferred_tap_element_); |
| 223 } | 224 } |
| 224 | 225 |
| 225 void EventHandler::Clear() { | 226 void EventHandler::Clear() { |
| 226 hover_timer_.Stop(); | 227 hover_timer_.Stop(); |
| 227 cursor_update_timer_.Stop(); | 228 cursor_update_timer_.Stop(); |
| 228 active_interval_timer_.Stop(); | 229 active_interval_timer_.Stop(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 328 } |
| 328 | 329 |
| 329 IntPoint EventHandler::DragDataTransferLocationForTesting() { | 330 IntPoint EventHandler::DragDataTransferLocationForTesting() { |
| 330 if (mouse_event_manager_->GetDragState().drag_data_transfer_) | 331 if (mouse_event_manager_->GetDragState().drag_data_transfer_) |
| 331 return mouse_event_manager_->GetDragState() | 332 return mouse_event_manager_->GetDragState() |
| 332 .drag_data_transfer_->DragLocation(); | 333 .drag_data_transfer_->DragLocation(); |
| 333 | 334 |
| 334 return IntPoint(); | 335 return IntPoint(); |
| 335 } | 336 } |
| 336 | 337 |
| 337 static LocalFrame* SubframeForTargetNode(Node* node) { | |
| 338 if (!node) | |
| 339 return nullptr; | |
| 340 | |
| 341 LayoutObject* layout_object = node->GetLayoutObject(); | |
| 342 if (!layout_object || !layout_object->IsLayoutEmbeddedContent()) | |
| 343 return nullptr; | |
| 344 | |
| 345 LocalFrameView* frame_view = | |
| 346 ToLayoutEmbeddedContent(layout_object)->ChildFrameView(); | |
| 347 if (!frame_view) | |
| 348 return nullptr; | |
| 349 | |
| 350 return &frame_view->GetFrame(); | |
| 351 } | |
| 352 | |
| 353 static LocalFrame* SubframeForHitTestResult( | |
| 354 const MouseEventWithHitTestResults& hit_test_result) { | |
| 355 if (!hit_test_result.IsOverEmbeddedContentView()) | |
| 356 return nullptr; | |
| 357 return SubframeForTargetNode(hit_test_result.InnerNode()); | |
| 358 } | |
| 359 | |
| 360 static bool IsSubmitImage(Node* node) { | 338 static bool IsSubmitImage(Node* node) { |
| 361 return isHTMLInputElement(node) && | 339 return isHTMLInputElement(node) && |
| 362 toHTMLInputElement(node)->type() == InputTypeNames::image; | 340 toHTMLInputElement(node)->type() == InputTypeNames::image; |
| 363 } | 341 } |
| 364 | 342 |
| 365 bool EventHandler::UseHandCursor(Node* node, bool is_over_link) { | 343 bool EventHandler::UseHandCursor(Node* node, bool is_over_link) { |
| 366 if (!node) | 344 if (!node) |
| 367 return false; | 345 return false; |
| 368 | 346 |
| 369 return ((is_over_link || IsSubmitImage(node)) && !HasEditableStyle(*node)); | 347 return ((is_over_link || IsSubmitImage(node)) && !HasEditableStyle(*node)); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 | 589 |
| 612 if (!mev.InnerNode()) { | 590 if (!mev.InnerNode()) { |
| 613 mouse_event_manager_->InvalidateClick(); | 591 mouse_event_manager_->InvalidateClick(); |
| 614 return WebInputEventResult::kNotHandled; | 592 return WebInputEventResult::kNotHandled; |
| 615 } | 593 } |
| 616 | 594 |
| 617 mouse_event_manager_->SetMousePressNode(mev.InnerNode()); | 595 mouse_event_manager_->SetMousePressNode(mev.InnerNode()); |
| 618 frame_->GetDocument()->SetSequentialFocusNavigationStartingPoint( | 596 frame_->GetDocument()->SetSequentialFocusNavigationStartingPoint( |
| 619 mev.InnerNode()); | 597 mev.InnerNode()); |
| 620 | 598 |
| 621 LocalFrame* subframe = SubframeForHitTestResult(mev); | 599 LocalFrame* subframe = EventHandlingUtil::SubframeForHitTestResult(mev); |
| 622 if (subframe) { | 600 if (subframe) { |
| 623 WebInputEventResult result = PassMousePressEventToSubframe(mev, subframe); | 601 WebInputEventResult result = PassMousePressEventToSubframe(mev, subframe); |
| 624 // Start capturing future events for this frame. We only do this if we | 602 // Start capturing future events for this frame. We only do this if we |
| 625 // didn't clear the m_mousePressed flag, which may happen if an AppKit | 603 // didn't clear the m_mousePressed flag, which may happen if an AppKit |
| 626 // EmbeddedContentView entered a modal event loop. The capturing should be | 604 // EmbeddedContentView entered a modal event loop. The capturing should be |
| 627 // done only when the result indicates it has been handled. See | 605 // done only when the result indicates it has been handled. See |
| 628 // crbug.com/269917 | 606 // crbug.com/269917 |
| 629 mouse_event_manager_->SetCapturesDragging( | 607 mouse_event_manager_->SetCapturesDragging( |
| 630 subframe->GetEventHandler().mouse_event_manager_->CapturesDragging()); | 608 subframe->GetEventHandler().mouse_event_manager_->CapturesDragging()); |
| 631 if (mouse_event_manager_->MousePressed() && | 609 if (mouse_event_manager_->MousePressed() && |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 if (!scrollbar) | 839 if (!scrollbar) |
| 862 scrollbar = mev.GetScrollbar(); | 840 scrollbar = mev.GetScrollbar(); |
| 863 | 841 |
| 864 UpdateLastScrollbarUnderMouse(scrollbar, | 842 UpdateLastScrollbarUnderMouse(scrollbar, |
| 865 !mouse_event_manager_->MousePressed()); | 843 !mouse_event_manager_->MousePressed()); |
| 866 if (only_update_scrollbars) | 844 if (only_update_scrollbars) |
| 867 return WebInputEventResult::kHandledSuppressed; | 845 return WebInputEventResult::kHandledSuppressed; |
| 868 } | 846 } |
| 869 | 847 |
| 870 WebInputEventResult event_result = WebInputEventResult::kNotHandled; | 848 WebInputEventResult event_result = WebInputEventResult::kNotHandled; |
| 871 LocalFrame* new_subframe = | 849 LocalFrame* new_subframe = capturing_mouse_events_node_.Get() |
| 872 capturing_mouse_events_node_.Get() | 850 ? EventHandlingUtil::SubframeForTargetNode( |
| 873 ? SubframeForTargetNode(capturing_mouse_events_node_.Get()) | 851 capturing_mouse_events_node_.Get()) |
| 874 : SubframeForHitTestResult(mev); | 852 : EventHandlingUtil::SubframeForHitTestResult(m
ev); |
| 875 | 853 |
| 876 // We want mouseouts to happen first, from the inside out. First send a move | 854 // We want mouseouts to happen first, from the inside out. First send a move |
| 877 // event to the last subframe so that it will fire mouseouts. | 855 // event to the last subframe so that it will fire mouseouts. |
| 878 if (last_mouse_move_event_subframe_ && | 856 if (last_mouse_move_event_subframe_ && |
| 879 last_mouse_move_event_subframe_->Tree().IsDescendantOf(frame_) && | 857 last_mouse_move_event_subframe_->Tree().IsDescendantOf(frame_) && |
| 880 last_mouse_move_event_subframe_ != new_subframe) | 858 last_mouse_move_event_subframe_ != new_subframe) |
| 881 last_mouse_move_event_subframe_->GetEventHandler().HandleMouseLeaveEvent( | 859 last_mouse_move_event_subframe_->GetEventHandler().HandleMouseLeaveEvent( |
| 882 mev.Event()); | 860 mev.Event()); |
| 883 | 861 |
| 884 if (new_subframe) { | 862 if (new_subframe) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 } | 938 } |
| 961 | 939 |
| 962 // Mouse events simulated from touch should not hit-test again. | 940 // Mouse events simulated from touch should not hit-test again. |
| 963 DCHECK(!mouse_event.FromTouch()); | 941 DCHECK(!mouse_event.FromTouch()); |
| 964 | 942 |
| 965 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease; | 943 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease; |
| 966 HitTestRequest request(hit_type); | 944 HitTestRequest request(hit_type); |
| 967 MouseEventWithHitTestResults mev = | 945 MouseEventWithHitTestResults mev = |
| 968 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event); | 946 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event); |
| 969 Element* mouse_release_target = mev.InnerElement(); | 947 Element* mouse_release_target = mev.InnerElement(); |
| 970 LocalFrame* subframe = | 948 LocalFrame* subframe = capturing_mouse_events_node_.Get() |
| 971 capturing_mouse_events_node_.Get() | 949 ? EventHandlingUtil::SubframeForTargetNode( |
| 972 ? SubframeForTargetNode(capturing_mouse_events_node_.Get()) | 950 capturing_mouse_events_node_.Get()) |
| 973 : SubframeForHitTestResult(mev); | 951 : EventHandlingUtil::SubframeForHitTestResult(mev); |
| 974 if (event_handler_will_reset_capturing_mouse_events_node_) | 952 if (event_handler_will_reset_capturing_mouse_events_node_) |
| 975 capturing_mouse_events_node_ = nullptr; | 953 capturing_mouse_events_node_ = nullptr; |
| 976 if (subframe) | 954 if (subframe) |
| 977 return PassMouseReleaseEventToSubframe(mev, subframe); | 955 return PassMouseReleaseEventToSubframe(mev, subframe); |
| 978 | 956 |
| 979 // Mouse events will be associated with the Document where mousedown | 957 // Mouse events will be associated with the Document where mousedown |
| 980 // occurred. If, e.g., there is a mousedown, then a drag to a different | 958 // occurred. If, e.g., there is a mousedown, then a drag to a different |
| 981 // Document and mouseup there, the mouseup's gesture will be associated with | 959 // Document and mouseup there, the mouseup's gesture will be associated with |
| 982 // the mousedown's Document. It's not absolutely certain that this is the | 960 // the mousedown's Document. It's not absolutely certain that this is the |
| 983 // correct behavior. | 961 // correct behavior. |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 mouse_event_type == EventTypeNames::mouseup); | 1236 mouse_event_type == EventTypeNames::mouseup); |
| 1259 | 1237 |
| 1260 const auto& event_result = pointer_event_manager_->SendMousePointerEvent( | 1238 const auto& event_result = pointer_event_manager_->SendMousePointerEvent( |
| 1261 UpdateMouseEventTargetNode(target_node), canvas_region_id, | 1239 UpdateMouseEventTargetNode(target_node), canvas_region_id, |
| 1262 mouse_event_type, mouse_event, coalesced_events); | 1240 mouse_event_type, mouse_event, coalesced_events); |
| 1263 return event_result; | 1241 return event_result; |
| 1264 } | 1242 } |
| 1265 | 1243 |
| 1266 WebInputEventResult EventHandler::HandleWheelEvent( | 1244 WebInputEventResult EventHandler::HandleWheelEvent( |
| 1267 const WebMouseWheelEvent& event) { | 1245 const WebMouseWheelEvent& event) { |
| 1268 #if OS(MACOSX) | 1246 return mouse_wheel_event_manager_->HandleWheelEvent(event); |
| 1269 // Filter Mac OS specific phases, usually with a zero-delta. | |
| 1270 // https://crbug.com/553732 | |
| 1271 // TODO(chongz): EventSender sends events with | |
| 1272 // |WebMouseWheelEvent::PhaseNone|, | |
| 1273 // but it shouldn't. | |
| 1274 const int kWheelEventPhaseNoEventMask = WebMouseWheelEvent::kPhaseEnded | | |
| 1275 WebMouseWheelEvent::kPhaseCancelled | | |
| 1276 WebMouseWheelEvent::kPhaseMayBegin; | |
| 1277 if ((event.phase & kWheelEventPhaseNoEventMask) || | |
| 1278 (event.momentum_phase & kWheelEventPhaseNoEventMask)) | |
| 1279 return WebInputEventResult::kNotHandled; | |
| 1280 #endif | |
| 1281 Document* doc = frame_->GetDocument(); | |
| 1282 | |
| 1283 if (doc->GetLayoutViewItem().IsNull()) | |
| 1284 return WebInputEventResult::kNotHandled; | |
| 1285 | |
| 1286 LocalFrameView* view = frame_->View(); | |
| 1287 if (!view) | |
| 1288 return WebInputEventResult::kNotHandled; | |
| 1289 | |
| 1290 LayoutPoint v_point = | |
| 1291 view->RootFrameToContents(FlooredIntPoint(event.PositionInRootFrame())); | |
| 1292 | |
| 1293 HitTestRequest request(HitTestRequest::kReadOnly); | |
| 1294 HitTestResult result(request, v_point); | |
| 1295 doc->GetLayoutViewItem().HitTest(result); | |
| 1296 | |
| 1297 Node* node = result.InnerNode(); | |
| 1298 // Wheel events should not dispatch to text nodes. | |
| 1299 if (node && node->IsTextNode()) | |
| 1300 node = FlatTreeTraversal::Parent(*node); | |
| 1301 | |
| 1302 // If we're over the frame scrollbar, scroll the document. | |
| 1303 if (!node && result.GetScrollbar()) | |
| 1304 node = doc->documentElement(); | |
| 1305 | |
| 1306 LocalFrame* subframe = SubframeForTargetNode(node); | |
| 1307 if (subframe) { | |
| 1308 WebInputEventResult result = | |
| 1309 subframe->GetEventHandler().HandleWheelEvent(event); | |
| 1310 if (result != WebInputEventResult::kNotHandled) | |
| 1311 scroll_manager_->SetFrameWasScrolledByUser(); | |
| 1312 return result; | |
| 1313 } | |
| 1314 | |
| 1315 if (node) { | |
| 1316 WheelEvent* dom_event = | |
| 1317 WheelEvent::Create(event, node->GetDocument().domWindow()); | |
| 1318 DispatchEventResult dom_event_result = node->DispatchEvent(dom_event); | |
| 1319 if (dom_event_result != DispatchEventResult::kNotCanceled) | |
| 1320 return EventHandlingUtil::ToWebInputEventResult(dom_event_result); | |
| 1321 } | |
| 1322 | |
| 1323 return WebInputEventResult::kNotHandled; | |
| 1324 } | 1247 } |
| 1325 | 1248 |
| 1326 WebInputEventResult EventHandler::HandleGestureEvent( | 1249 WebInputEventResult EventHandler::HandleGestureEvent( |
| 1327 const WebGestureEvent& gesture_event) { | 1250 const WebGestureEvent& gesture_event) { |
| 1328 // Propagation to inner frames is handled below this function. | 1251 // Propagation to inner frames is handled below this function. |
| 1329 DCHECK_EQ(frame_, &frame_->LocalFrameRoot()); | 1252 DCHECK_EQ(frame_, &frame_->LocalFrameRoot()); |
| 1330 DCHECK_NE(0, gesture_event.FrameScale()); | 1253 DCHECK_NE(0, gesture_event.FrameScale()); |
| 1331 | 1254 |
| 1332 // Scrolling-related gesture events invoke EventHandler recursively for each | 1255 // Scrolling-related gesture events invoke EventHandler recursively for each |
| 1333 // frame down the chain, doing a single-frame hit-test per frame. This matches | 1256 // frame down the chain, doing a single-frame hit-test per frame. This matches |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 MouseEventWithHitTestResults& mev, | 2071 MouseEventWithHitTestResults& mev, |
| 2149 LocalFrame* subframe) { | 2072 LocalFrame* subframe) { |
| 2150 WebInputEventResult result = | 2073 WebInputEventResult result = |
| 2151 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2074 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
| 2152 if (result != WebInputEventResult::kNotHandled) | 2075 if (result != WebInputEventResult::kNotHandled) |
| 2153 return result; | 2076 return result; |
| 2154 return WebInputEventResult::kHandledSystem; | 2077 return WebInputEventResult::kHandledSystem; |
| 2155 } | 2078 } |
| 2156 | 2079 |
| 2157 } // namespace blink | 2080 } // namespace blink |
| OLD | NEW |