Changeset 116830 in webkit
- Timestamp:
- May 11, 2012 5:56:13 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116828 r116830 1 2012-05-11 Anders Carlsson <andersca@apple.com> 2 3 Comcast website displays bottom of page when loaded 4 https://bugs.webkit.org/show_bug.cgi?id=86277 5 <rdar://problem/11426887> 6 7 Reviewed by Beth Dakin. 8 9 There were two bugs here. The first bug was that FrameView::setScrollPosition didn't end up calling into the scrolling coordinator 10 to update the scroll position. The second bug was that ScrollingTreeNodeMac::setScrollPosition didn't constrain the scroll position 11 to the edge of the page. 12 13 * page/FrameView.cpp: 14 (WebCore::FrameView::setScrollPosition): 15 Call requestScrollPositionUpdate. 16 17 * page/scrolling/ScrollingTree.cpp: 18 * page/scrolling/ScrollingTree.h: 19 Remove setMainFrameScrollPosition, it is not called by anyone. 20 21 * page/scrolling/mac/ScrollingTreeNodeMac.h: 22 * page/scrolling/mac/ScrollingTreeNodeMac.mm: 23 (WebCore::ScrollingTreeNodeMac::setScrollPosition): 24 Clamp to the page size and call setScrollPositionWithoutContentEdgeConstraints. 25 26 (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints): 27 Update the scroll layer position and call back to the main thread. 28 29 (WebCore::ScrollingTreeNodeMac::scrollBy): 30 Call setScrollPosition. 31 32 (WebCore::ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints): 33 Call setScrollPositionWithoutContentEdgeConstraints. 34 1 35 2012-05-11 Gavin Barraclough <barraclough@apple.com> 2 36 -
trunk/Source/WebCore/page/FrameView.cpp
r116687 r116830 1705 1705 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, true); 1706 1706 m_maintainScrollPositionAnchor = 0; 1707 1708 if (requestScrollPositionUpdate(scrollPoint)) 1709 return; 1710 1707 1711 ScrollView::setScrollPosition(scrollPoint); 1708 1712 } -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r116824 r116830 98 98 } 99 99 100 void ScrollingTree::setMainFrameScrollPosition(const IntPoint& scrollPosition)101 {102 ASSERT(ScrollingThread::isCurrentThread());103 104 m_rootNode->setScrollPosition(scrollPosition);105 }106 107 100 static void derefScrollingCoordinator(ScrollingCoordinator* scrollingCoordinator) 108 101 { -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r112707 r116830 76 76 void handleWheelEvent(const PlatformWheelEvent&); 77 77 78 void setMainFrameScrollPosition(const IntPoint&);79 80 78 void invalidate(); 81 79 void commitNewTreeState(PassOwnPtr<ScrollingTreeState>); -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.h
r109386 r116830 46 46 virtual void update(ScrollingTreeState*) OVERRIDE; 47 47 virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE; 48 virtual void setScrollPosition(const IntPoint&) OVERRIDE;49 48 50 49 // ScrollElasticityController member functions. … … 63 62 64 63 IntPoint scrollPosition() const; 64 void setScrollPosition(const IntPoint&); 65 void setScrollPositionWithoutContentEdgeConstraints(const IntPoint&); 66 65 67 void setScrollLayerPosition(const IntPoint&); 66 68 -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
r116570 r116830 86 86 } 87 87 88 void ScrollingTreeNodeMac::setScrollPosition(const IntPoint& scrollPosition)89 {90 updateMainFramePinState(scrollPosition);91 92 if (shouldUpdateScrollLayerPositionOnMainThread()) {93 m_probableMainThreadScrollPosition = scrollPosition;94 scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition);95 return;96 }97 98 setScrollLayerPosition(scrollPosition);99 scrollingTree()->updateMainFrameScrollPosition(scrollPosition);100 }101 102 88 bool ScrollingTreeNodeMac::allowsHorizontalStretching() 103 89 { … … 241 227 } 242 228 229 void ScrollingTreeNodeMac::setScrollPosition(const IntPoint& scrollPosition) 230 { 231 IntPoint newScrollPosition = scrollPosition; 232 newScrollPosition = newScrollPosition.shrunkTo(maximumScrollPosition()); 233 newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition()); 234 235 setScrollPositionWithoutContentEdgeConstraints(newScrollPosition); 236 } 237 238 void ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints(const IntPoint& scrollPosition) 239 { 240 updateMainFramePinState(scrollPosition); 241 242 if (shouldUpdateScrollLayerPositionOnMainThread()) { 243 m_probableMainThreadScrollPosition = scrollPosition; 244 scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition); 245 return; 246 } 247 248 setScrollLayerPosition(scrollPosition); 249 scrollingTree()->updateMainFrameScrollPosition(scrollPosition); 250 } 251 243 252 void ScrollingTreeNodeMac::setScrollLayerPosition(const IntPoint& position) 244 253 { … … 264 273 void ScrollingTreeNodeMac::scrollBy(const IntSize& offset) 265 274 { 266 IntPoint newScrollPosition = scrollPosition() + offset; 267 newScrollPosition = newScrollPosition.shrunkTo(maximumScrollPosition()); 268 newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition()); 269 270 setScrollPosition(newScrollPosition); 275 setScrollPosition(scrollPosition() + offset); 271 276 } 272 277 273 278 void ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints(const IntSize& offset) 274 279 { 275 setScrollPosition (scrollPosition() + offset);280 setScrollPositionWithoutContentEdgeConstraints(scrollPosition() + offset); 276 281 } 277 282
Note: See TracChangeset
for help on using the changeset viewer.