Changeset 109386 in webkit
- Timestamp:
- Mar 1, 2012 12:04:09 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109383 r109386 1 2012-03-01 Anders Carlsson <andersca@apple.com> 2 3 Glitchy scrolling on pages where the scroll layer needs to be updated on the main thread 4 https://bugs.webkit.org/show_bug.cgi?id=80038 5 <rdar://problem/10933831> 6 7 Reviewed by Simon Fraser. 8 9 When we need to update the scroll layer position on the main thread, we need to cache the 10 scroll position we sent to the main thread and assume that that's the correct scroll position. 11 12 * page/scrolling/mac/ScrollingTreeNodeMac.h: 13 (ScrollingTreeNodeMac): 14 * page/scrolling/mac/ScrollingTreeNodeMac.mm: 15 (WebCore::ScrollingTreeNodeMac::update): 16 (WebCore::ScrollingTreeNodeMac::setScrollPosition): 17 (WebCore::ScrollingTreeNodeMac::scrollPosition): 18 1 19 2012-03-01 Julien Chaffraix <jchaffraix@webkit.org> 2 20 -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h
r108636 r109386 77 77 78 78 RetainPtr<CALayer> m_scrollLayer; 79 IntPoint m_probableMainThreadScrollPosition; 79 80 }; 80 81 -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
r109237 r109386 61 61 if (state->changedProperties() & (ScrollingTreeState::ScrollLayer | ScrollingTreeState::ContentsSize | ScrollingTreeState::ViewportRect)) 62 62 updateMainFramePinState(scrollPosition()); 63 64 if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) && shouldUpdateScrollLayerPositionOnMainThread()) { 65 // We're transitioning to the slow "update scroll layer position on the main thread" mode. 66 // Initialize the probable main thread scroll position with the current scroll layer position. 67 CGPoint scrollLayerPosition = m_scrollLayer.get().position; 68 m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y); 69 } 63 70 } 64 71 … … 74 81 75 82 if (shouldUpdateScrollLayerPositionOnMainThread()) { 83 m_probableMainThreadScrollPosition = scrollPosition; 76 84 scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition); 77 85 return; … … 216 224 IntPoint ScrollingTreeNodeMac::scrollPosition() const 217 225 { 226 if (shouldUpdateScrollLayerPositionOnMainThread()) 227 return m_probableMainThreadScrollPosition; 228 218 229 CGPoint scrollLayerPosition = m_scrollLayer.get().position; 219 230 return IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
Note: See TracChangeset
for help on using the changeset viewer.