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

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: Build fix 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
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.h » ('j') | 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) 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 bool didScrollY; 216 bool didScrollY;
211 float unusedScrollDeltaX; 217 float unusedScrollDeltaX;
212 float unusedScrollDeltaY; 218 float unusedScrollDeltaY;
213 }; 219 };
214 220
215 typedef unsigned ScrollbarControlPartMask; 221 typedef unsigned ScrollbarControlPartMask;
216 222
217 } 223 }
218 224
219 #endif 225 #endif
OLDNEW
« no previous file with comments | « Source/platform/scroll/ScrollAnimatorNone.cpp ('k') | Source/platform/scroll/ScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698