haikuwebkit/LayoutTests/fast/events/autoscroll-when-input-is-of...

4 lines
282 B
Plaintext
Raw Permalink Normal View History

Fix text autoscrolling when typing in modern webkit https://bugs.webkit.org/show_bug.cgi?id=196718 Source/WebCore: <rdar://problem/49225507> Reviewed by Tim Horton. Tests: fast/events/autoscroll-when-input-is-offscreen.html fast/events/autoscroll-with-software-keyboard.html We have been relying on UIKit to scroll editable text, but since we cannot give them enough information for them to always do the right thing, we should just do all the work in WebKit. This has the added benifit of fixing some tricky autoscrolling bugs that have cropped up recently. * editing/Editor.cpp: (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::revealSelectionAfterEditingOperation): We should be scrolling the main frame in WebKit. We have been relying on UIKit, but we cannot give them enough information to guarantee a correct scroll, so just do all the work in WebKit. * page/FrameView.cpp: (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const): Update to use the rect that is actually visible, accounting for the software keyboard. Source/WebKit: <rdar://problem/49225507> Reviewed by Tim Horton. For staging only. We need to turn off UIKit's scrolling behavior to land the changes we are making. To keep from the build ever breaking, I am temporarily circumventing the changes in UIKit. This will be removed once the next UIKit submission happens. * UIProcess/ios/WKContentViewInteraction.mm: (-[WKUIWKTextInteractionAssistant scrollSelectionToVisible]): (-[WKContentView setUpTextSelectionAssistant]): LayoutTests: Reviewed by Tim Horton. * fast/events/autoscroll-when-input-is-offscreen-expected.txt: Added. * fast/events/autoscroll-when-input-is-offscreen.html: Added. * fast/events/autoscroll-with-software-keyboard-expected.txt: Added. * fast/events/autoscroll-with-software-keyboard.html: Added. Canonical link: https://commits.webkit.org/211059@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-10 18:47:25 +00:00
This test focuses a form, them scrolls to the bottom of the page. Then text is entered in the form, and we check to make sure the page has scrolled so that the input is visible again.
PASS: page has scrolled back to the top to show the element that has text being entered into it.