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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2829553002: Remove the dup function (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandlingUtil.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 if (is_middle_click_autoscroll_in_progress) { 644 if (is_middle_click_autoscroll_in_progress) {
645 // We invalidate the click when exiting middle click auto scroll so that 645 // We invalidate the click when exiting middle click auto scroll so that
646 // we don't inadvertently navigate away from the current page (e.g. the 646 // we don't inadvertently navigate away from the current page (e.g. the
647 // click was on a hyperlink). See <rdar://problem/6095023>. 647 // click was on a hyperlink). See <rdar://problem/6095023>.
648 mouse_event_manager_->InvalidateClick(); 648 mouse_event_manager_->InvalidateClick();
649 return WebInputEventResult::kHandledSuppressed; 649 return WebInputEventResult::kHandledSuppressed;
650 } 650 }
651 } 651 }
652 652
653 mouse_event_manager_->SetClickCount(mouse_event.click_count); 653 mouse_event_manager_->SetClickCount(mouse_event.click_count);
654 mouse_event_manager_->SetClickElement( 654 mouse_event_manager_->SetClickElement(mev.InnerElement());
655 EventHandlingUtil::ParentElementIfNeeded(mev.InnerNode()));
656 655
657 if (!mouse_event.FromTouch()) 656 if (!mouse_event.FromTouch())
658 frame_->Selection().SetCaretBlinkingSuspended(true); 657 frame_->Selection().SetCaretBlinkingSuspended(true);
659 658
660 WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents( 659 WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents(
661 EventTypeNames::mousedown, mev.InnerNode(), mev.CanvasRegionId(), 660 EventTypeNames::mousedown, mev.InnerNode(), mev.CanvasRegionId(),
662 mev.Event(), Vector<WebMouseEvent>()); 661 mev.Event(), Vector<WebMouseEvent>());
663 662
664 if (event_result == WebInputEventResult::kNotHandled && frame_->View()) { 663 if (event_result == WebInputEventResult::kNotHandled && frame_->View()) {
665 FrameView* view = frame_->View(); 664 FrameView* view = frame_->View();
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 String(), mouse_event, Vector<WebMouseEvent>()); 949 String(), mouse_event, Vector<WebMouseEvent>());
951 } 950 }
952 951
953 // Mouse events simulated from touch should not hit-test again. 952 // Mouse events simulated from touch should not hit-test again.
954 ASSERT(!mouse_event.FromTouch()); 953 ASSERT(!mouse_event.FromTouch());
955 954
956 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease; 955 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kRelease;
957 HitTestRequest request(hit_type); 956 HitTestRequest request(hit_type);
958 MouseEventWithHitTestResults mev = 957 MouseEventWithHitTestResults mev =
959 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event); 958 EventHandlingUtil::PerformMouseEventHitTest(frame_, request, mouse_event);
960 Element* mouse_release_target = 959 Element* mouse_release_target = mev.InnerElement();
961 EventHandlingUtil::ParentElementIfNeeded(mev.InnerNode());
962 LocalFrame* subframe = 960 LocalFrame* subframe =
963 capturing_mouse_events_node_.Get() 961 capturing_mouse_events_node_.Get()
964 ? SubframeForTargetNode(capturing_mouse_events_node_.Get()) 962 ? SubframeForTargetNode(capturing_mouse_events_node_.Get())
965 : SubframeForHitTestResult(mev); 963 : SubframeForHitTestResult(mev);
966 if (event_handler_will_reset_capturing_mouse_events_node_) 964 if (event_handler_will_reset_capturing_mouse_events_node_)
967 capturing_mouse_events_node_ = nullptr; 965 capturing_mouse_events_node_ = nullptr;
968 if (subframe) 966 if (subframe)
969 return PassMouseReleaseEventToSubframe(mev, subframe); 967 return PassMouseReleaseEventToSubframe(mev, subframe);
970 968
971 // Mouse events will be associated with the Document where mousedown 969 // Mouse events will be associated with the Document where mousedown
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 MouseEventWithHitTestResults& mev, 2109 MouseEventWithHitTestResults& mev,
2112 LocalFrame* subframe) { 2110 LocalFrame* subframe) {
2113 WebInputEventResult result = 2111 WebInputEventResult result =
2114 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); 2112 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event());
2115 if (result != WebInputEventResult::kNotHandled) 2113 if (result != WebInputEventResult::kNotHandled)
2116 return result; 2114 return result;
2117 return WebInputEventResult::kHandledSystem; 2115 return WebInputEventResult::kHandledSystem;
2118 } 2116 }
2119 2117
2120 } // namespace blink 2118 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandlingUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698