OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 Loading... | |
42 class CompositorAnimationHost; | 42 class CompositorAnimationHost; |
43 class CompositorAnimationTimeline; | 43 class CompositorAnimationTimeline; |
44 class LayoutBox; | 44 class LayoutBox; |
45 class LocalFrame; | 45 class LocalFrame; |
46 class FrameView; | 46 class FrameView; |
47 class GraphicsLayer; | 47 class GraphicsLayer; |
48 class Page; | 48 class Page; |
49 class PaintLayer; | 49 class PaintLayer; |
50 class Region; | 50 class Region; |
51 class ScrollableArea; | 51 class ScrollableArea; |
52 class ProgrammaticScrollCoordinator; | |
52 class WebLayerTreeView; | 53 class WebLayerTreeView; |
53 class WebScrollbarLayer; | 54 class WebScrollbarLayer; |
54 | 55 |
55 class CORE_EXPORT ScrollingCoordinator final | 56 class CORE_EXPORT ScrollingCoordinator final |
56 : public GarbageCollectedFinalized<ScrollingCoordinator> { | 57 : public GarbageCollectedFinalized<ScrollingCoordinator> { |
57 WTF_MAKE_NONCOPYABLE(ScrollingCoordinator); | 58 WTF_MAKE_NONCOPYABLE(ScrollingCoordinator); |
58 | 59 |
59 public: | 60 public: |
60 static ScrollingCoordinator* create(Page*); | 61 static ScrollingCoordinator* create(Page*); |
61 | 62 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 | 127 |
127 void updateTouchEventTargetRectsIfNeeded(); | 128 void updateTouchEventTargetRectsIfNeeded(); |
128 | 129 |
129 CompositorAnimationHost* compositorAnimationHost() { | 130 CompositorAnimationHost* compositorAnimationHost() { |
130 return m_animationHost.get(); | 131 return m_animationHost.get(); |
131 } | 132 } |
132 CompositorAnimationTimeline* compositorAnimationTimeline() { | 133 CompositorAnimationTimeline* compositorAnimationTimeline() { |
133 return m_programmaticScrollAnimatorTimeline.get(); | 134 return m_programmaticScrollAnimatorTimeline.get(); |
134 } | 135 } |
135 | 136 |
137 ProgrammaticScrollCoordinator* programmaticScrollCoordinator(); | |
138 | |
136 // For testing purposes only. This ScrollingCoordinator is reused between | 139 // For testing purposes only. This ScrollingCoordinator is reused between |
137 // layout test, and must be reset for the results to be valid. | 140 // layout test, and must be reset for the results to be valid. |
138 void reset(); | 141 void reset(); |
139 | 142 |
140 protected: | 143 protected: |
141 explicit ScrollingCoordinator(Page*); | 144 explicit ScrollingCoordinator(Page*); |
142 | 145 |
143 bool isForRootLayer(ScrollableArea*) const; | 146 bool isForRootLayer(ScrollableArea*) const; |
144 bool isForMainFrame(ScrollableArea*) const; | 147 bool isForMainFrame(ScrollableArea*) const; |
145 | 148 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 m_programmaticScrollAnimatorTimeline; | 181 m_programmaticScrollAnimatorTimeline; |
179 | 182 |
180 using ScrollbarMap = | 183 using ScrollbarMap = |
181 HeapHashMap<Member<ScrollableArea>, std::unique_ptr<WebScrollbarLayer>>; | 184 HeapHashMap<Member<ScrollableArea>, std::unique_ptr<WebScrollbarLayer>>; |
182 ScrollbarMap m_horizontalScrollbars; | 185 ScrollbarMap m_horizontalScrollbars; |
183 ScrollbarMap m_verticalScrollbars; | 186 ScrollbarMap m_verticalScrollbars; |
184 HashSet<const PaintLayer*> m_layersWithTouchRects; | 187 HashSet<const PaintLayer*> m_layersWithTouchRects; |
185 bool m_wasFrameScrollable; | 188 bool m_wasFrameScrollable; |
186 | 189 |
187 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; | 190 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; |
191 | |
192 Member<ProgrammaticScrollCoordinator> m_programmaticScrollCoordinator; | |
bokan
2017/03/28 16:29:53
We want ScrollingCoordinator to eventually go away
sunyunjia
2017/04/07 13:53:21
Done.
| |
188 }; | 193 }; |
189 | 194 |
190 } // namespace blink | 195 } // namespace blink |
191 | 196 |
192 #endif // ScrollingCoordinator_h | 197 #endif // ScrollingCoordinator_h |
OLD | NEW |