Changeset 245742 in webkit
- Timestamp:
- May 23, 2019, 8:25:27 PM (7 years ago)
- Location:
- trunk
- 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
-
trunk/LayoutTests/ChangeLog
r245733 r245742 1 2019-05-23 Simon Fraser <simon.fraser@apple.com> 2 3 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 4 https://bugs.webkit.org/show_bug.cgi?id=198208 5 <rdar://problem/49720087> 6 7 Reviewed by Zalan Bujtas. 8 9 * fast/scrolling/programmatic-scroll-to-negative-offset-expected.txt: Added. 10 * fast/scrolling/programmatic-scroll-to-negative-offset.html: Added. 11 1 12 2019-05-23 Fujii Hironori <Hironori.Fujii@sony.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r245730 r245742 1 2019-05-23 Simon Fraser <simon.fraser@apple.com> 2 3 With async overflow scrolling, programmatic scroll to a negative offset fails to clamp the scroll offset 4 https://bugs.webkit.org/show_bug.cgi?id=198208 5 <rdar://problem/49720087> 6 7 Reviewed by Zalan Bujtas. 8 9 RenderLayer::scrollToOffset() needs to pass the clamped offset to scrollingCoordinator->requestScrollPositionUpdate(), 10 otherwise the scrolling tree will round-trip a negative value and scrollLeft will end up negative. 11 12 Test: fast/scrolling/programmatic-scroll-to-negative-offset.html 13 14 * rendering/RenderLayer.cpp: 15 (WebCore::RenderLayer::scrollToOffset): 16 1 17 2019-05-23 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r245490 r245742 2436 2436 void RenderLayer::scrollToOffset(const ScrollOffset& scrollOffset, ScrollType scrollType, ScrollClamping clamping) 2437 2437 { 2438 ScrollOffset newScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset;2439 if ( newScrollOffset == this->scrollOffset())2438 ScrollOffset clampedScrollOffset = clamping == ScrollClamping::Clamped ? clampScrollOffset(scrollOffset) : scrollOffset; 2439 if (clampedScrollOffset == this->scrollOffset()) 2440 2440 return; 2441 2441 … … 2446 2446 #if ENABLE(ASYNC_SCROLLING) 2447 2447 if (ScrollingCoordinator* scrollingCoordinator = page().scrollingCoordinator()) 2448 handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset( scrollOffset));2448 handled = scrollingCoordinator->requestScrollPositionUpdate(*this, scrollPositionFromOffset(clampedScrollOffset)); 2449 2449 #endif 2450 2450 2451 2451 if (!handled) 2452 scrollToOffsetWithoutAnimation( newScrollOffset, clamping);2452 scrollToOffsetWithoutAnimation(clampedScrollOffset, clamping); 2453 2453 2454 2454 setCurrentScrollType(previousScrollType);
Note:
See TracChangeset
for help on using the changeset viewer.