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 | 42 |
43 typedef unsigned MainThreadScrollingReasons; | 43 typedef unsigned MainThreadScrollingReasons; |
44 | 44 |
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 Region; | 49 class Region; |
50 class ScrollableArea; | 50 class ScrollableArea; |
51 class WebCompositorAnimationTimeline; | 51 class WebCompositorAnimationTimeline; |
| 52 class WebLayerTreeView; |
52 | 53 |
53 class CORE_EXPORT ScrollingCoordinator final : public NoBaseWillBeGarbageCollect
edFinalized<ScrollingCoordinator> { | 54 class CORE_EXPORT ScrollingCoordinator final : public NoBaseWillBeGarbageCollect
edFinalized<ScrollingCoordinator> { |
54 WTF_MAKE_NONCOPYABLE(ScrollingCoordinator); | 55 WTF_MAKE_NONCOPYABLE(ScrollingCoordinator); |
55 USING_FAST_MALLOC_WILL_BE_REMOVED(ScrollingCoordinator); | 56 USING_FAST_MALLOC_WILL_BE_REMOVED(ScrollingCoordinator); |
56 public: | 57 public: |
57 static PassOwnPtrWillBeRawPtr<ScrollingCoordinator> create(Page*); | 58 static PassOwnPtrWillBeRawPtr<ScrollingCoordinator> create(Page*); |
58 | 59 |
59 ~ScrollingCoordinator(); | 60 ~ScrollingCoordinator(); |
60 DECLARE_TRACE(); | 61 DECLARE_TRACE(); |
61 | 62 |
62 void willCloseLayerTreeView(); | 63 void layerTreeViewInitialized(WebLayerTreeView&); |
| 64 void willCloseLayerTreeView(WebLayerTreeView&); |
| 65 |
63 void willBeDestroyed(); | 66 void willBeDestroyed(); |
64 | 67 |
65 // Return whether this scrolling coordinator handles scrolling for the given
frame view. | 68 // Return whether this scrolling coordinator handles scrolling for the given
frame view. |
66 bool coordinatesScrollingForFrameView(FrameView*) const; | 69 bool coordinatesScrollingForFrameView(FrameView*) const; |
67 | 70 |
68 // Called when any frame has done its layout. | 71 // Called when any frame has done its layout. |
69 void notifyLayoutUpdated(); | 72 void notifyLayoutUpdated(); |
70 // Called when any frame recalculates its overflows after style change. | 73 // Called when any frame recalculates its overflows after style change. |
71 void notifyOverflowUpdated(); | 74 void notifyOverflowUpdated(); |
72 | 75 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&); | 152 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&); |
150 void setTouchEventTargetRects(LayerHitTestRects&); | 153 void setTouchEventTargetRects(LayerHitTestRects&); |
151 void computeTouchEventTargetRects(LayerHitTestRects&); | 154 void computeTouchEventTargetRects(LayerHitTestRects&); |
152 | 155 |
153 WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n, PassOwnPtr<WebScrollbarLayer>); | 156 WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n, PassOwnPtr<WebScrollbarLayer>); |
154 WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n); | 157 WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n); |
155 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation); | 158 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation); |
156 | 159 |
157 bool frameViewIsDirty() const; | 160 bool frameViewIsDirty() const; |
158 | 161 |
159 void createProgrammaticScrollAnimatorTimeline(); | |
160 void destroyProgrammaticScrollAnimatorTimeline(); | |
161 | |
162 OwnPtr<WebCompositorAnimationTimeline> m_programmaticScrollAnimatorTimeline; | 162 OwnPtr<WebCompositorAnimationTimeline> m_programmaticScrollAnimatorTimeline; |
163 | 163 |
164 using ScrollbarMap = WillBeHeapHashMap<RawPtrWillBeMember<ScrollableArea>, O
wnPtr<WebScrollbarLayer>>; | 164 using ScrollbarMap = WillBeHeapHashMap<RawPtrWillBeMember<ScrollableArea>, O
wnPtr<WebScrollbarLayer>>; |
165 ScrollbarMap m_horizontalScrollbars; | 165 ScrollbarMap m_horizontalScrollbars; |
166 ScrollbarMap m_verticalScrollbars; | 166 ScrollbarMap m_verticalScrollbars; |
167 HashSet<const PaintLayer*> m_layersWithTouchRects; | 167 HashSet<const PaintLayer*> m_layersWithTouchRects; |
168 bool m_wasFrameScrollable; | 168 bool m_wasFrameScrollable; |
169 | 169 |
170 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; | 170 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; |
171 }; | 171 }; |
172 | 172 |
173 } // namespace blink | 173 } // namespace blink |
174 | 174 |
175 #endif // ScrollingCoordinator_h | 175 #endif // ScrollingCoordinator_h |
OLD | NEW |