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