Changeset 249011 in webkit
- Timestamp:
- Aug 22, 2019, 8:47:23 AM (7 years ago)
- Location:
- branches/safari-608-branch
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt (added)
-
LayoutTests/fast/scrolling/ios/autoscroll-input-when-very-zoomed.html (added)
-
LayoutTests/resources/ui-helper.js (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/LayoutTests/ChangeLog
r248988 r249011 1 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248977. rdar://problem/54599960 4 5 Do not adjust viewport if editing selection is already visible 6 https://bugs.webkit.org/show_bug.cgi?id=200907 7 <rdar://problem/53903417> 8 9 Reviewed by Simon Fraser. 10 11 Source/WebCore: 12 13 Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html 14 15 Currently due to scrolling being mostly handled by integers, we are getting 16 issues with rounding errors when trying to adjust the viewport while 17 editing text when we are significantly zoomed in. The real fix would be to 18 start dealing with scrolling with floats/doubles, but until such time, 19 we should early out of adjusting selections that we are certain are currently 20 visible. 21 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::scrollRectToVisible): 24 25 LayoutTests: 26 27 * fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added. 28 * fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added. 29 * resources/ui-helper.js: 30 (window.UIHelper.immediateZoomToScale): 31 32 33 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248977 268f45cc-cd09-0410-ab3c-d52691b4dbfc 34 35 2019-08-21 Megan Gardner <megan_gardner@apple.com> 36 37 Do not adjust viewport if editing selection is already visible 38 https://bugs.webkit.org/show_bug.cgi?id=200907 39 <rdar://problem/53903417> 40 41 Reviewed by Simon Fraser. 42 43 * fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added. 44 * fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added. 45 * resources/ui-helper.js: 46 (window.UIHelper.immediateZoomToScale): 47 1 48 2019-08-21 Kocsen Chung <kocsen_chung@apple.com> 2 49 -
branches/safari-608-branch/LayoutTests/resources/ui-helper.js
r248619 r249011 709 709 } 710 710 711 static immediateZoomToScale(scale) 712 { 713 const uiScript = `uiController.immediateZoomToScale(${scale})`; 714 return new Promise(resolve => testRunner.runUIScript(uiScript, resolve)); 715 } 716 711 717 static typeCharacter(characterString) 712 718 { -
branches/safari-608-branch/Source/WebCore/ChangeLog
r249010 r249011 1 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r248977. rdar://problem/54599960 4 5 Do not adjust viewport if editing selection is already visible 6 https://bugs.webkit.org/show_bug.cgi?id=200907 7 <rdar://problem/53903417> 8 9 Reviewed by Simon Fraser. 10 11 Source/WebCore: 12 13 Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html 14 15 Currently due to scrolling being mostly handled by integers, we are getting 16 issues with rounding errors when trying to adjust the viewport while 17 editing text when we are significantly zoomed in. The real fix would be to 18 start dealing with scrolling with floats/doubles, but until such time, 19 we should early out of adjusting selections that we are certain are currently 20 visible. 21 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::scrollRectToVisible): 24 25 LayoutTests: 26 27 * fast/scrolling/ios/autoscroll-input-when-very-zoomed-expected.txt: Added. 28 * fast/scrolling/ios/autoscroll-input-when-very-zoomed.html: Added. 29 * resources/ui-helper.js: 30 (window.UIHelper.immediateZoomToScale): 31 32 33 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248977 268f45cc-cd09-0410-ab3c-d52691b4dbfc 34 35 2019-08-21 Megan Gardner <megan_gardner@apple.com> 36 37 Do not adjust viewport if editing selection is already visible 38 https://bugs.webkit.org/show_bug.cgi?id=200907 39 <rdar://problem/53903417> 40 41 Reviewed by Simon Fraser. 42 43 Test: fast/scrolling/ios/autoscroll-input-when-very-zoomed.html 44 45 Currently due to scrolling being mostly handled by integers, we are getting 46 issues with rounding errors when trying to adjust the viewport while 47 editing text when we are significantly zoomed in. The real fix would be to 48 start dealing with scrolling with floats/doubles, but until such time, 49 we should early out of adjusting selections that we are certain are currently 50 visible. 51 52 * rendering/RenderLayer.cpp: 53 (WebCore::RenderLayer::scrollRectToVisible): 54 1 55 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 56 -
branches/safari-608-branch/Source/WebCore/rendering/RenderLayer.cpp
r248653 r249011 2702 2702 2703 2703 LayoutRect revealRect = getRectToExpose(viewRect, targetRect, insideFixed, options.alignX, options.alignY); 2704 ScrollOffset clampedScrollPosition = roundedIntPoint(revealRect.location()).constrainedBetween(minScrollPosition, maxScrollPosition); 2705 frameView.setScrollPosition(clampedScrollPosition); 2704 // Avoid scrolling to the rounded value of revealRect.location() if we don't actually need to scroll 2705 if (revealRect != viewRect) { 2706 ScrollOffset clampedScrollPosition = roundedIntPoint(revealRect.location()).constrainedBetween(minScrollPosition, maxScrollPosition); 2707 frameView.setScrollPosition(clampedScrollPosition); 2708 } 2706 2709 2707 2710 // This is the outermost view of a web page, so after scrolling this view we
Note:
See TracChangeset
for help on using the changeset viewer.