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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 enum MainThreadScrollingReasonFlags { | 89 enum MainThreadScrollingReasonFlags { |
90 HasSlowRepaintObjects = 1 << 0, | 90 HasSlowRepaintObjects = 1 << 0, |
91 HasNonLayerViewportConstrainedObjects = 1 << 1, | 91 HasNonLayerViewportConstrainedObjects = 1 << 1, |
92 ThreadedScrollingDisabled = 1 << 2 | 92 ThreadedScrollingDisabled = 1 << 2 |
93 }; | 93 }; |
94 | 94 |
95 MainThreadScrollingReasons mainThreadScrollingReasons() const; | 95 MainThreadScrollingReasons mainThreadScrollingReasons() const; |
96 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread
ScrollingReasons() != 0; } | 96 bool shouldUpdateScrollLayerPositionOnMainThread() const { return mainThread
ScrollingReasons() != 0; } |
97 | 97 |
98 PassOwnPtr<blink::WebScrollbarLayer> createSolidColorScrollbarLayer(Scrollba
rOrientation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollb
ar); | 98 PassOwnPtr<WebScrollbarLayer> createSolidColorScrollbarLayer(ScrollbarOrient
ation, int thumbThickness, int trackStart, bool isLeftSideVerticalScrollbar); |
99 | 99 |
100 void willDestroyScrollableArea(ScrollableArea*); | 100 void willDestroyScrollableArea(ScrollableArea*); |
101 // Returns true if the coordinator handled this change. | 101 // Returns true if the coordinator handled this change. |
102 bool scrollableAreaScrollLayerDidChange(ScrollableArea*); | 102 bool scrollableAreaScrollLayerDidChange(ScrollableArea*); |
103 void scrollableAreaScrollbarLayerDidChange(ScrollableArea*, ScrollbarOrienta
tion); | 103 void scrollableAreaScrollbarLayerDidChange(ScrollableArea*, ScrollbarOrienta
tion); |
104 void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool); | 104 void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool); |
105 void updateLayerPositionConstraint(DeprecatedPaintLayer*); | 105 void updateLayerPositionConstraint(DeprecatedPaintLayer*); |
106 void touchEventTargetRectsDidChange(); | 106 void touchEventTargetRectsDidChange(); |
107 void willDestroyLayer(DeprecatedPaintLayer*); | 107 void willDestroyLayer(DeprecatedPaintLayer*); |
108 | 108 |
(...skipping 28 matching lines...) Expand all Loading... |
137 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi
onIsDirty || m_touchEventTargetRectsAreDirty || m_shouldScrollOnMainThreadDirty
|| frameViewIsDirty(); } | 137 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi
onIsDirty || m_touchEventTargetRectsAreDirty || m_shouldScrollOnMainThreadDirty
|| frameViewIsDirty(); } |
138 | 138 |
139 void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReaso
ns); | 139 void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReaso
ns); |
140 | 140 |
141 bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const; | 141 bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const; |
142 | 142 |
143 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&); | 143 void setShouldHandleScrollGestureOnMainThreadRegion(const Region&); |
144 void setTouchEventTargetRects(LayerHitTestRects&); | 144 void setTouchEventTargetRects(LayerHitTestRects&); |
145 void computeTouchEventTargetRects(LayerHitTestRects&); | 145 void computeTouchEventTargetRects(LayerHitTestRects&); |
146 | 146 |
147 blink::WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOri
entation, PassOwnPtr<blink::WebScrollbarLayer>); | 147 WebScrollbarLayer* addWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n, PassOwnPtr<WebScrollbarLayer>); |
148 blink::WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOri
entation); | 148 WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientatio
n); |
149 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation); | 149 void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation); |
150 | 150 |
151 bool frameViewIsDirty() const; | 151 bool frameViewIsDirty() const; |
152 | 152 |
153 using ScrollbarMap = HashMap<ScrollableArea*, OwnPtr<blink::WebScrollbarLaye
r>>; | 153 using ScrollbarMap = HashMap<ScrollableArea*, OwnPtr<WebScrollbarLayer>>; |
154 ScrollbarMap m_horizontalScrollbars; | 154 ScrollbarMap m_horizontalScrollbars; |
155 ScrollbarMap m_verticalScrollbars; | 155 ScrollbarMap m_verticalScrollbars; |
156 HashSet<const DeprecatedPaintLayer*> m_layersWithTouchRects; | 156 HashSet<const DeprecatedPaintLayer*> m_layersWithTouchRects; |
157 bool m_wasFrameScrollable; | 157 bool m_wasFrameScrollable; |
158 | 158 |
159 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; | 159 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; |
160 }; | 160 }; |
161 | 161 |
162 } // namespace blink | 162 } // namespace blink |
163 | 163 |
164 #endif // ScrollingCoordinator_h | 164 #endif // ScrollingCoordinator_h |
OLD | NEW |