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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2556793002: Fix fling endscroll timestamp issue (Closed)
Patch Set: Created 4 years 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 | no next file » | 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) 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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 if (m_gestureAnimation) { 1942 if (m_gestureAnimation) {
1943 if (m_gestureAnimation->animate(lastFrameTimeMonotonic)) 1943 if (m_gestureAnimation->animate(lastFrameTimeMonotonic))
1944 mainFrameImpl()->frameWidget()->scheduleAnimation(); 1944 mainFrameImpl()->frameWidget()->scheduleAnimation();
1945 else { 1945 else {
1946 DCHECK_NE(m_flingSourceDevice, WebGestureDeviceUninitialized); 1946 DCHECK_NE(m_flingSourceDevice, WebGestureDeviceUninitialized);
1947 WebGestureDevice lastFlingSourceDevice = m_flingSourceDevice; 1947 WebGestureDevice lastFlingSourceDevice = m_flingSourceDevice;
1948 endActiveFlingAnimation(); 1948 endActiveFlingAnimation();
1949 1949
1950 PlatformGestureEvent endScrollEvent( 1950 PlatformGestureEvent endScrollEvent(
1951 PlatformEvent::GestureScrollEnd, m_positionOnFlingStart, 1951 PlatformEvent::GestureScrollEnd, m_positionOnFlingStart,
1952 m_globalPositionOnFlingStart, IntSize(), TimeTicks(), 1952 m_globalPositionOnFlingStart, IntSize(), TimeTicks::Now(),
1953 PlatformEvent::NoModifiers, 1953 PlatformEvent::NoModifiers,
1954 lastFlingSourceDevice == WebGestureDeviceTouchpad 1954 lastFlingSourceDevice == WebGestureDeviceTouchpad
1955 ? PlatformGestureSourceTouchpad 1955 ? PlatformGestureSourceTouchpad
1956 : PlatformGestureSourceTouchscreen); 1956 : PlatformGestureSourceTouchscreen);
1957 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0, 1957 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0,
1958 ScrollInertialPhaseMomentum, false, 1958 ScrollInertialPhaseMomentum, false,
1959 -1 /* null plugin id */); 1959 -1 /* null plugin id */);
1960 1960
1961 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd( 1961 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(
1962 endScrollEvent); 1962 endScrollEvent);
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4204 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4204 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4205 return nullptr; 4205 return nullptr;
4206 return focusedFrame; 4206 return focusedFrame;
4207 } 4207 }
4208 4208
4209 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4209 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4210 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4210 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4211 } 4211 }
4212 4212
4213 } // namespace blink 4213 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698