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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void updateTouchEventTargetRectsIfNeeded(); | 111 void updateTouchEventTargetRectsIfNeeded(); |
112 | 112 |
113 // For testing purposes only. This ScrollingCoordinator is reused between la
yout test, and must be reset | 113 // For testing purposes only. This ScrollingCoordinator is reused between la
yout test, and must be reset |
114 // for the results to be valid. | 114 // for the results to be valid. |
115 void reset(); | 115 void reset(); |
116 | 116 |
117 protected: | 117 protected: |
118 explicit ScrollingCoordinator(Page*); | 118 explicit ScrollingCoordinator(Page*); |
119 | 119 |
120 bool isForMainFrame(ScrollableArea*) const; | 120 bool isForMainFrame(ScrollableArea*) const; |
| 121 bool isForViewport(ScrollableArea*) const; |
121 | 122 |
122 Page* m_page; | 123 Page* m_page; |
123 | 124 |
124 // Dirty flags used to idenfity what really needs to be computed after compo
siting is updated. | 125 // Dirty flags used to idenfity what really needs to be computed after compo
siting is updated. |
125 bool m_scrollGestureRegionIsDirty; | 126 bool m_scrollGestureRegionIsDirty; |
126 bool m_touchEventTargetRectsAreDirty; | 127 bool m_touchEventTargetRectsAreDirty; |
127 bool m_shouldScrollOnMainThreadDirty; | 128 bool m_shouldScrollOnMainThreadDirty; |
128 | 129 |
129 private: | 130 private: |
130 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi
onIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsDirty(); } | 131 bool shouldUpdateAfterCompositingChange() const { return m_scrollGestureRegi
onIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsDirty(); } |
(...skipping 18 matching lines...) Expand all Loading... |
149 HashSet<const RenderLayer*> m_layersWithTouchRects; | 150 HashSet<const RenderLayer*> m_layersWithTouchRects; |
150 bool m_wasFrameScrollable; | 151 bool m_wasFrameScrollable; |
151 | 152 |
152 // This is retained for testing. | 153 // This is retained for testing. |
153 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; | 154 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; |
154 }; | 155 }; |
155 | 156 |
156 } // namespace blink | 157 } // namespace blink |
157 | 158 |
158 #endif // ScrollingCoordinator_h | 159 #endif // ScrollingCoordinator_h |
OLD | NEW |