Changeset 245743 in webkit
- Timestamp:
- May 23, 2019, 10:27:33 PM (7 years ago)
- Location:
- branches/safari-608.1.24.20-branch
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/programmatic-scroll-to-negative-offset-expected.txt (added)
-
LayoutTests/fast/scrolling/programmatic-scroll-to-negative-offset.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608.1.24.20-branch/LayoutTests/ChangeLog
r245690 r245743 1 2019-05-23 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r245742. rdar://problem/49720087 4 5 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 6 https://bugs.webkit.org/show_bug.cgi?id=198208 7 <rdar://problem/49720087> 8 9 Reviewed by Zalan Bujtas. 10 11 Source/WebCore: 12 13 RenderLayer::scrollToOffset() needs to pass the clamped offset to scrollingCoordinator->requestScrollPositionUpdate(), 14 otherwise the scrolling tree will round-trip a negative value and scrollLeft will end up negative. 15 16 Test: fast/scrolling/programmatic-scroll-to-negative-offset.html 17 18 * rendering/RenderLayer.cpp: 19 (WebCore::RenderLayer::scrollToOffset): 20 21 LayoutTests: 22 23 * fast/scrolling/programmatic-scroll-to-negative-offset-expected.txt: Added. 24 * fast/scrolling/programmatic-scroll-to-negative-offset.html: Added. 25 26 27 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245742 268f45cc-cd09-0410-ab3c-d52691b4dbfc 28 29 2019-05-23 Simon Fraser <simon.fraser@apple.com> 30 31 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 32 https://bugs.webkit.org/show_bug.cgi?id=198208 33 <rdar://problem/49720087> 34 35 Reviewed by Zalan Bujtas. 36 37 * fast/scrolling/programmatic-scroll-to-negative-offset-expected.txt: Added. 38 * fast/scrolling/programmatic-scroll-to-negative-offset.html: Added. 39 1 40 2019-05-23 Kocsen Chung <kocsen_chung@apple.com> 2 41 -
branches/safari-608.1.24.20-branch/Source/WebCore/ChangeLog
r245632 r245743 1 2019-05-23 Babak Shafiei <bshafiei@apple.com> 2 3 Cherry-pick r245742. rdar://problem/49720087 4 5 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 6 https://bugs.webkit.org/show_bug.cgi?id=198208 7 <rdar://problem/49720087> 8 9 Reviewed by Zalan Bujtas. 10 11 Source/WebCore: 12 13 RenderLayer::scrollToOffset() needs to pass the clamped offset to scrollingCoordinator->requestScrollPositionUpdate(), 14 otherwise the scrolling tree will round-trip a negative value and scrollLeft will end up negative. 15 16 Test: fast/scrolling/programmatic-scroll-to-negative-offset.html 17 18 * rendering/RenderLayer.cpp: 19 (WebCore::RenderLayer::scrollToOffset): 20 21 LayoutTests: 22 23 * fast/scrolling/programmatic-scroll-to-negative-offset-expected.txt: Added. 24 * fast/scrolling/programmatic-scroll-to-negative-offset.html: Added. 25 26 27 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245742 268f45cc-cd09-0410-ab3c-d52691b4dbfc 28 29 2019-05-23 Simon Fraser <simon.fraser@apple.com> 30 31 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 32 https://bugs.webkit.org/show_bug.cgi?id=198208 33 <rdar://problem/49720087> 34 35 Reviewed by Zalan Bujtas. 36 37 RenderLayer::scrollToOffset() needs to pass the clamped offset to scrollingCoordinator->requestScrollPositionUpdate(), 38 otherwise the scrolling tree will round-trip a negative value and scrollLeft will end up negative. 39 40 Test: fast/scrolling/programmatic-scroll-to-negative-offset.html 41 42 * rendering/RenderLayer.cpp: 43 (WebCore::RenderLayer::scrollToOffset): 44 1 45 2019-05-22 Kocsen Chung <kocsen_chung@apple.com> 2 46 -
branches/safari-608.1.24.20-branch/Source/WebCore/rendering/RenderLayer.cpp
r245630 r245743 2422 2422 void RenderLayer::scrollToOffset(const ScrollOffset& scrollOffset, ScrollType scrollType, ScrollClamping clamping) 2423 2423 { 2424 ScrollOffset newScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset;2425 if ( newScrollOffset == this->scrollOffset())2424 ScrollOffset clampedScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset; 2425 if (clampedScrollOffset == this->scrollOffset()) 2426 2426 return; 2427 2427 … … 2432 2432 #if ENABLE(ASYNC_SCROLLING) 2433 2433 if (ScrollingCoordinator* scrollingCoordinator = page().scrollingCoordinator()) 2434 handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset( scrollOffset));2434 handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset(clampedScrollOffset)); 2435 2435 #endif 2436 2436 2437 2437 if (!handled) 2438 scrollToOffsetWithoutAnimation( newScrollOffset, clamping);2438 scrollToOffsetWithoutAnimation(clampedScrollOffset, clamping); 2439 2439 2440 2440 setCurrentScrollType(previousScrollType);
Note:
See TracChangeset
for help on using the changeset viewer.