OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 fling_modifier_ = event.GetModifiers(); | 691 fling_modifier_ = event.GetModifiers(); |
692 fling_source_device_ = event.source_device; | 692 fling_source_device_ = event.source_device; |
693 DCHECK_NE(fling_source_device_, kWebGestureDeviceUninitialized); | 693 DCHECK_NE(fling_source_device_, kWebGestureDeviceUninitialized); |
694 std::unique_ptr<WebGestureCurve> fling_curve = | 694 std::unique_ptr<WebGestureCurve> fling_curve = |
695 Platform::Current()->CreateFlingAnimationCurve( | 695 Platform::Current()->CreateFlingAnimationCurve( |
696 event.source_device, | 696 event.source_device, |
697 WebFloatPoint(event.data.fling_start.velocity_x, | 697 WebFloatPoint(event.data.fling_start.velocity_x, |
698 event.data.fling_start.velocity_y), | 698 event.data.fling_start.velocity_y), |
699 WebSize()); | 699 WebSize()); |
700 DCHECK(fling_curve); | 700 DCHECK(fling_curve); |
701 gesture_animation_ = WebActiveGestureAnimation::CreateAtAnimationStart( | 701 gesture_animation_ = WebActiveGestureAnimation::CreateWithTimeOffset( |
702 std::move(fling_curve), this); | 702 std::move(fling_curve), this, event.TimeStampSeconds()); |
703 MainFrameImpl()->FrameWidget()->ScheduleAnimation(); | 703 MainFrameImpl()->FrameWidget()->ScheduleAnimation(); |
704 event_result = WebInputEventResult::kHandledSystem; | 704 event_result = WebInputEventResult::kHandledSystem; |
705 | 705 |
706 WebGestureEvent scaled_event = | 706 WebGestureEvent scaled_event = |
707 TransformWebGestureEvent(MainFrameImpl()->GetFrameView(), event); | 707 TransformWebGestureEvent(MainFrameImpl()->GetFrameView(), event); |
708 // Plugins may need to see GestureFlingStart to balance | 708 // Plugins may need to see GestureFlingStart to balance |
709 // GestureScrollBegin (since the former replaces GestureScrollEnd when | 709 // GestureScrollBegin (since the former replaces GestureScrollEnd when |
710 // transitioning to a fling). | 710 // transitioning to a fling). |
711 // TODO(dtapuska): Why isn't the response used? | 711 // TODO(dtapuska): Why isn't the response used? |
712 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureScrollEvent( | 712 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureScrollEvent( |
(...skipping 3426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4139 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4139 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4140 return nullptr; | 4140 return nullptr; |
4141 return focused_frame; | 4141 return focused_frame; |
4142 } | 4142 } |
4143 | 4143 |
4144 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4144 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4145 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4145 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4146 } | 4146 } |
4147 | 4147 |
4148 } // namespace blink | 4148 } // namespace blink |
OLD | NEW |