Changeset 249581 in webkit
- Timestamp:
- Sep 6, 2019, 11:05:51 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/scrollingcoordinator/ios/scroller-initial-scroll-position-expected.html (added)
-
LayoutTests/scrollingcoordinator/ios/scroller-initial-scroll-position.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp (modified) (2 diffs)
-
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249579 r249581 631 631 * platform/mac/TestExpectations: 632 632 633 2019-09-06 Simon Fraser <simon.fraser@apple.com> 634 635 REGRESSION (iOS 13): If an overflow:hidden with a non-zero scroll position is toggled to overflow:scroll, some other scroll causes its scroll position to get reset 636 https://bugs.webkit.org/show_bug.cgi?id=201528 637 rdar://problem/55044885 638 639 Reviewed by Frédéric Wang. 640 641 * scrollingcoordinator/ios/scroller-initial-scroll-position-expected.html: Added. 642 * scrollingcoordinator/ios/scroller-initial-scroll-position.html: Added. 643 633 644 2019-09-04 Yusuke Suzuki <ysuzuki@apple.com> 634 645 -
trunk/Source/WebCore/ChangeLog
r249575 r249581 511 511 512 512 * loader/EmptyFrameLoaderClient.h: 513 514 2019-09-06 Simon Fraser <simon.fraser@apple.com> 515 516 REGRESSION (iOS 13): If an overflow:hidden with a non-zero scroll position is toggled to overflow:scroll, some other scroll causes its scroll position to get reset 517 https://bugs.webkit.org/show_bug.cgi?id=201528 518 rdar://problem/55044885 519 520 Reviewed by Frédéric Wang. 521 522 If, when an overflow scrolling node is created, the scroller has non-zero scroll 523 position (for example, via toggling to overflow:hidden, setting scrollTop, then toggling 524 to overflow:scroll), then on the next update its scroll position will reset back to zero. 525 526 The bug was that newly created ScrollingTreeScrollingNodes didn't set m_currentScrollPosition 527 to the scroll position coming from the state node, so a subsequent update could cause 528 the 0,0 currentScrollPosition to get applied. If we're making a new node, and there's no 529 requestedScrollPosition, then initialize m_currentScrollPosition. 530 531 Test: scrollingcoordinator/ios/scroller-initial-scroll-position.html 532 533 * page/scrolling/ScrollingTreeScrollingNode.cpp: 534 (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren): 535 (WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren): 536 * page/scrolling/ScrollingTreeScrollingNode.h: 513 537 514 538 2019-09-04 Yusuke Suzuki <ysuzuki@apple.com> -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
r247013 r249581 63 63 m_reachableContentsSize = state.reachableContentsSize(); 64 64 65 if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) 65 if (state.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition)) { 66 66 m_lastCommittedScrollPosition = state.scrollPosition(); 67 if (m_isFirstCommit && !state.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) 68 m_currentScrollPosition = m_lastCommittedScrollPosition; 69 } 67 70 68 71 if (state.hasChangedProperty(ScrollingStateScrollingNode::ParentRelativeScrollableRect)) … … 112 115 if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) 113 116 scrollingTree().scrollingTreeNodeRequestsScroll(scrollingNodeID(), scrollingStateNode.requestedScrollPosition(), scrollingStateNode.requestedScrollPositionRepresentsProgrammaticScroll()); 117 118 m_isFirstCommit = false; 114 119 } 115 120 -
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
r247013 r249581 152 152 ScrollableAreaParameters m_scrollableAreaParameters; 153 153 bool m_expectsWheelEventTestTrigger { false }; 154 bool m_isFirstCommit { true }; 154 155 155 156 #if PLATFORM(COCOA)
Note:
See TracChangeset
for help on using the changeset viewer.