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

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

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: add DCHECK Created 4 years, 1 month 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ScrollBlockDirectionForward, 52 ScrollBlockDirectionForward,
53 ScrollInlineDirectionBackward, 53 ScrollInlineDirectionBackward,
54 ScrollInlineDirectionForward 54 ScrollInlineDirectionForward
55 }; 55 };
56 56
57 enum ScrollDirectionPhysical { ScrollUp, ScrollDown, ScrollLeft, ScrollRight }; 57 enum ScrollDirectionPhysical { ScrollUp, ScrollDown, ScrollLeft, ScrollRight };
58 58
59 enum ScrollType { 59 enum ScrollType {
60 UserScroll, 60 UserScroll,
61 ProgrammaticScroll, 61 ProgrammaticScroll,
62 ClampingScroll,
62 CompositorScroll, 63 CompositorScroll,
63 AnchoringScroll 64 AnchoringScroll
64 }; 65 };
65 66
66 // Convert logical scroll direction to physical. Physical scroll directions are 67 // Convert logical scroll direction to physical. Physical scroll directions are
67 // unaffected. 68 // unaffected.
68 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, 69 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction,
69 bool isVertical, 70 bool isVertical,
70 bool isFlipped) { 71 bool isFlipped) {
71 switch (direction) { 72 switch (direction) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 238
238 return (dir == ScrollLeft || dir == ScrollRight) ? ScrollOffset(delta, 0) 239 return (dir == ScrollLeft || dir == ScrollRight) ? ScrollOffset(delta, 0)
239 : ScrollOffset(0, delta); 240 : ScrollOffset(0, delta);
240 } 241 }
241 242
242 typedef unsigned ScrollbarControlPartMask; 243 typedef unsigned ScrollbarControlPartMask;
243 244
244 } // namespace blink 245 } // namespace blink
245 246
246 #endif 247 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698