| 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 // Mouse events will be associated with the Document where mousedown | 976 // Mouse events will be associated with the Document where mousedown |
| 977 // occurred. If, e.g., there is a mousedown, then a drag to a different | 977 // occurred. If, e.g., there is a mousedown, then a drag to a different |
| 978 // Document and mouseup there, the mouseup's gesture will be associated with | 978 // Document and mouseup there, the mouseup's gesture will be associated with |
| 979 // the mousedown's Document. It's not absolutely certain that this is the | 979 // the mousedown's Document. It's not absolutely certain that this is the |
| 980 // correct behavior. | 980 // correct behavior. |
| 981 std::unique_ptr<UserGestureIndicator> gesture_indicator; | 981 std::unique_ptr<UserGestureIndicator> gesture_indicator; |
| 982 if (frame_->LocalFrameRoot() | 982 if (frame_->LocalFrameRoot() |
| 983 .GetEventHandler() | 983 .GetEventHandler() |
| 984 .last_mouse_down_user_gesture_token_) { | 984 .last_mouse_down_user_gesture_token_) { |
| 985 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator( | 985 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator( |
| 986 frame_->LocalFrameRoot() | 986 std::move(frame_->LocalFrameRoot() |
| 987 .GetEventHandler() | 987 .GetEventHandler() |
| 988 .last_mouse_down_user_gesture_token_.Release())); | 988 .last_mouse_down_user_gesture_token_))); |
| 989 } else { | 989 } else { |
| 990 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator( | 990 gesture_indicator = WTF::WrapUnique(new UserGestureIndicator( |
| 991 DocumentUserGestureToken::Create(frame_->GetDocument()))); | 991 DocumentUserGestureToken::Create(frame_->GetDocument()))); |
| 992 } | 992 } |
| 993 | 993 |
| 994 WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents( | 994 WebInputEventResult event_result = UpdatePointerTargetAndDispatchEvents( |
| 995 EventTypeNames::mouseup, mev.InnerNode(), mev.CanvasRegionId(), | 995 EventTypeNames::mouseup, mev.InnerNode(), mev.CanvasRegionId(), |
| 996 mev.Event(), Vector<WebMouseEvent>()); | 996 mev.Event(), Vector<WebMouseEvent>()); |
| 997 | 997 |
| 998 WebInputEventResult click_event_result = | 998 WebInputEventResult click_event_result = |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 MouseEventWithHitTestResults& mev, | 2122 MouseEventWithHitTestResults& mev, |
| 2123 LocalFrame* subframe) { | 2123 LocalFrame* subframe) { |
| 2124 WebInputEventResult result = | 2124 WebInputEventResult result = |
| 2125 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2125 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
| 2126 if (result != WebInputEventResult::kNotHandled) | 2126 if (result != WebInputEventResult::kNotHandled) |
| 2127 return result; | 2127 return result; |
| 2128 return WebInputEventResult::kHandledSystem; | 2128 return WebInputEventResult::kHandledSystem; |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 } // namespace blink | 2131 } // namespace blink |
| OLD | NEW |