Chromium Code Reviews| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 | 128 |
| 128 void updateTouchEventTargetRectsIfNeeded(); | 129 void updateTouchEventTargetRectsIfNeeded(); |
| 129 | 130 |
| 130 CompositorAnimationHost* compositorAnimationHost() { | 131 CompositorAnimationHost* compositorAnimationHost() { |
| 131 return m_animationHost.get(); | 132 return m_animationHost.get(); |
| 132 } | 133 } |
| 133 CompositorAnimationTimeline* compositorAnimationTimeline() { | 134 CompositorAnimationTimeline* compositorAnimationTimeline() { |
| 134 return m_programmaticScrollAnimatorTimeline.get(); | 135 return m_programmaticScrollAnimatorTimeline.get(); |
| 135 } | 136 } |
| 136 | 137 |
| 138 ProgrammaticScrollCoordinator* programmaticScrollCoordinator(); | |
| 139 | |
| 137 // For testing purposes only. This ScrollingCoordinator is reused between | 140 // For testing purposes only. This ScrollingCoordinator is reused between |
| 138 // layout test, and must be reset for the results to be valid. | 141 // layout test, and must be reset for the results to be valid. |
| 139 void reset(); | 142 void reset(); |
| 140 | 143 |
| 141 protected: | 144 protected: |
| 142 explicit ScrollingCoordinator(Page*); | 145 explicit ScrollingCoordinator(Page*); |
| 143 | 146 |
| 144 bool isForRootLayer(ScrollableArea*) const; | 147 bool isForRootLayer(ScrollableArea*) const; |
| 145 bool isForMainFrame(ScrollableArea*) const; | 148 bool isForMainFrame(ScrollableArea*) const; |
| 146 | 149 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 m_programmaticScrollAnimatorTimeline; | 182 m_programmaticScrollAnimatorTimeline; |
| 180 | 183 |
| 181 using ScrollbarMap = | 184 using ScrollbarMap = |
| 182 HeapHashMap<Member<ScrollableArea>, std::unique_ptr<WebScrollbarLayer>>; | 185 HeapHashMap<Member<ScrollableArea>, std::unique_ptr<WebScrollbarLayer>>; |
| 183 ScrollbarMap m_horizontalScrollbars; | 186 ScrollbarMap m_horizontalScrollbars; |
| 184 ScrollbarMap m_verticalScrollbars; | 187 ScrollbarMap m_verticalScrollbars; |
| 185 HashSet<const PaintLayer*> m_layersWithTouchRects; | 188 HashSet<const PaintLayer*> m_layersWithTouchRects; |
| 186 bool m_wasFrameScrollable; | 189 bool m_wasFrameScrollable; |
| 187 | 190 |
| 188 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; | 191 MainThreadScrollingReasons m_lastMainThreadScrollingReasons; |
| 192 | |
| 193 Member<ProgrammaticScrollCoordinator> m_programmaticScrollCoordinator; | |
|
bokan
2017/02/21 21:33:01
What should happen if two separate scrollable DIVs
sunyunjia
2017/02/24 19:11:48
Well, on a second thought, there might be conflict
| |
| 189 }; | 194 }; |
| 190 | 195 |
| 191 } // namespace blink | 196 } // namespace blink |
| 192 | 197 |
| 193 #endif // ScrollingCoordinator_h | 198 #endif // ScrollingCoordinator_h |
| OLD | NEW |