Changeset 106750 in webkit
- Timestamp:
- Feb 4, 2012 4:43:39 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106746 r106750 1 2012-02-04 Anders Carlsson <andersca@apple.com> 2 3 The scrolling tree should inform the main scrolling coordinator when the scroll position changes 4 https://bugs.webkit.org/show_bug.cgi?id=77818 5 6 Reviewed by Sam Weinig. 7 8 * page/scrolling/ScrollingCoordinator.cpp: 9 (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): 10 Set the main frame scroll position. 11 12 * page/scrolling/ScrollingTree.cpp: 13 (WebCore::ScrollingTree::updateMainFrameScrollPosition): 14 Call ScrollingCoordinator::updateMainFrameScrollPosition on the main thread. 15 16 * page/scrolling/mac/ScrollingTreeNodeMac.mm: 17 (WebCore::ScrollingTreeNodeMac::scrollBy): 18 Call ScrollingTree::updateMainFrameScrollPosition. 19 1 20 2012-02-04 Andreas Kling <awesomekling@apple.com> 2 21 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
r106723 r106750 105 105 } 106 106 107 void ScrollingCoordinator::updateMainFrameScrollPosition(const IntPoint& scrollPosition) 108 { 109 ASSERT(isMainThread()); 110 111 if (!m_page) 112 return; 113 114 FrameView* frameView = m_page->mainFrame()->view(); 115 if (!frameView) 116 return; 117 118 frameView->setConstrainsScrollingToContentEdge(false); 119 frameView->scrollToOffsetWithoutAnimation(scrollPosition); 120 frameView->setConstrainsScrollingToContentEdge(true); 121 } 122 107 123 void ScrollingCoordinator::syncFrameViewGeometry(FrameView* frameView) 108 124 { -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r106723 r106750 77 77 void frameViewVerticalScrollbarLayerDidChange(FrameView*, GraphicsLayer* verticalScrollbarLayer); 78 78 79 // Dispatched by the scrolling tree whenever the main frame scroll position changes. 80 void updateMainFrameScrollPosition(const IntPoint&); 81 79 82 // Should be called whenever the geometry of the given frame view changes, 80 83 // including the visible content rect and the content size. -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r106720 r106750 34 34 #include "ScrollingTreeNode.h" 35 35 #include "ScrollingTreeState.h" 36 #include <wtf/MainThread.h> 36 37 37 38 namespace WebCore { … … 85 86 } 86 87 88 void ScrollingTree::updateMainFrameScrollPosition(const IntPoint& scrollPosition) 89 { 90 if (!m_scrollingCoordinator) 91 return; 92 93 callOnMainThread(bind(&ScrollingCoordinator::updateMainFrameScrollPosition, m_scrollingCoordinator.get(), scrollPosition)); 94 } 95 87 96 } // namespace WebCore 88 97 -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r106720 r106750 37 37 namespace WebCore { 38 38 39 class IntPoint; 39 40 class PlatformWheelEvent; 40 41 class ScrollingCoordinator; … … 62 63 void commitNewTreeState(PassOwnPtr<ScrollingTreeState>); 63 64 65 void updateMainFrameScrollPosition(const IntPoint& scrollPosition); 66 64 67 private: 65 68 explicit ScrollingTree(ScrollingCoordinator*); -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
r106720 r106750 30 30 31 31 #include "PlatformWheelEvent.h" 32 #include "ScrollingTree.h" 32 33 #include "ScrollingTreeState.h" 33 34 … … 73 74 setScrollPosition(scrollPosition() + offset); 74 75 75 // FIXME: Tell the scrolling coordinator that our position changed.76 scrollingTree()->updateMainFrameScrollPosition(scrollPosition()); 76 77 } 77 78
Note: See TracChangeset
for help on using the changeset viewer.