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

Side by Side Diff: third_party/WebKit/public/platform/WebScrollStateData.h

Issue 1646663002: Refactor Scroll Customization to share cc::ScrollStateData with blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linking. Created 4 years, 10 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 | « third_party/WebKit/public/blink_headers.gypi ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebScrollStateData_h
6 #define WebScrollStateData_h
7
8 #include "WebCommon.h"
9
10 #include <deque>
11
12 namespace blink {
13
14 // WebScrollState data contains the data used by blink::ScrollState. This is
15 // used by the scroll customization API, detailed here (https://goo.gl/1ipTpP).
16 // For the cc equivalent, see cc::ScrollStateData and cc::ScrollState.
17 struct BLINK_EXPORT WebScrollStateData {
18 WebScrollStateData(double deltaX, double deltaY, double deltaGranularity,
19 double velocityX, double velocityY, bool inInertialPhase,
20 bool isBeginning = false, bool isEnding = false,
21 bool fromUserInput = false, bool shouldPropagate = true,
22 bool deltaConsumedForScrollSequence = false)
23 : deltaX(deltaX)
24 , deltaY(deltaY)
25 , deltaGranularity(deltaGranularity)
26 , velocityX(velocityX)
27 , velocityY(velocityY)
28 , inInertialPhase(inInertialPhase)
29 , isBeginning(isBeginning)
30 , isEnding(isEnding)
31 , fromUserInput(fromUserInput)
32 , shouldPropagate(shouldPropagate)
33 , currentNativeScrollingElement(0)
34 , deltaConsumedForScrollSequence(deltaConsumedForScrollSequence)
35 , causedScrollX(false)
36 , causedScrollY(false)
37 {
38 }
39
40 WebScrollStateData()
41 : WebScrollStateData(0, 0, 0, 0, 0, false)
42 {
43 }
44
45 double deltaX;
46 double deltaY;
47 double deltaGranularity;
48 double velocityX;
49 double velocityY;
50 bool inInertialPhase;
51 bool isBeginning;
52 bool isEnding;
53
54 bool fromUserInput;
55 bool shouldPropagate;
56 // The id of the last native element to respond to a scroll, or 0 if none ex ists.
57 int currentNativeScrollingElement;
58 // Whether the scroll sequence has had any delta consumed, in the
59 // current frame, or any child frames.
60 bool deltaConsumedForScrollSequence;
61
62 bool causedScrollX;
63 bool causedScrollY;
64 };
65
66 } // namespace blink
67
68 #endif // WebScrollStateData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/blink_headers.gypi ('k') | ui/events/blink/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698