OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SnapCoordinator_h | 5 #ifndef SnapCoordinator_h |
6 #define SnapCoordinator_h | 6 #define SnapCoordinator_h |
7 | 7 |
8 #include "core/layout/LayoutBox.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/CSSPrimitiveValueMappings.h" |
9 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
10 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 class ComputedStyle; | 15 class ComputedStyle; |
| 16 class ContainerNode; |
15 class Element; | 17 class Element; |
| 18 class LayoutBox; |
16 struct LengthPoint; | 19 struct LengthPoint; |
17 | 20 |
18 // Snap Coordinator keeps track of snap containers and all of their associated | 21 // Snap Coordinator keeps track of snap containers and all of their associated |
19 // snap areas. It also contains the logic to generate the list of valid snap | 22 // snap areas. It also contains the logic to generate the list of valid snap |
20 // positions for a given snap container. | 23 // positions for a given snap container. |
21 // | 24 // |
22 // Snap container: | 25 // Snap container: |
23 // An scroll container that has 'scroll-snap-type' value other | 26 // An scroll container that has 'scroll-snap-type' value other |
24 // than 'none'. | 27 // than 'none'. |
25 // Snap area: | 28 // Snap area: |
(...skipping 23 matching lines...) Expand all Loading... |
49 explicit SnapCoordinator(); | 52 explicit SnapCoordinator(); |
50 | 53 |
51 Vector<double> snapOffsets(const ContainerNode&, ScrollbarOrientation); | 54 Vector<double> snapOffsets(const ContainerNode&, ScrollbarOrientation); |
52 | 55 |
53 HashSet<const LayoutBox*> m_snapContainers; | 56 HashSet<const LayoutBox*> m_snapContainers; |
54 }; | 57 }; |
55 | 58 |
56 } // namespace blink | 59 } // namespace blink |
57 | 60 |
58 #endif // SnapCoordinator_h | 61 #endif // SnapCoordinator_h |
OLD | NEW |