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

Side by Side Diff: Source/platform/scroll/ScrollTypes.h

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ScrollInlineDirectionForward 42 ScrollInlineDirectionForward
43 }; 43 };
44 44
45 enum ScrollDirectionPhysical { 45 enum ScrollDirectionPhysical {
46 ScrollUp, 46 ScrollUp,
47 ScrollDown, 47 ScrollDown,
48 ScrollLeft, 48 ScrollLeft,
49 ScrollRight 49 ScrollRight
50 }; 50 };
51 51
52 enum ScrollType {
53 UserScroll,
54 ProgrammaticScroll,
55 CompositorScroll
56 };
57
52 // Convert logical scroll direction to physical. Physical scroll directions are unaffected. 58 // Convert logical scroll direction to physical. Physical scroll directions are unaffected.
53 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, bo ol isVertical, bool isFlipped) 59 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, bo ol isVertical, bool isFlipped)
54 { 60 {
55 switch (direction) { 61 switch (direction) {
56 case ScrollBlockDirectionBackward: { 62 case ScrollBlockDirectionBackward: {
57 if (isVertical) { 63 if (isVertical) {
58 if (!isFlipped) 64 if (!isFlipped)
59 return ScrollUp; 65 return ScrollUp;
60 return ScrollDown; 66 return ScrollDown;
61 } 67 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 bool didScroll; 211 bool didScroll;
206 float unusedScrollDeltaX; 212 float unusedScrollDeltaX;
207 float unusedScrollDeltaY; 213 float unusedScrollDeltaY;
208 }; 214 };
209 215
210 typedef unsigned ScrollbarControlPartMask; 216 typedef unsigned ScrollbarControlPartMask;
211 217
212 } 218 }
213 219
214 #endif 220 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698