Activate selection when interacting with editable content
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 18:05:20 +0000 (18:05 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2018 18:05:20 +0000 (18:05 +0000)
commitebec52ad953fd3a61abfc8ab179b30d8ff7762e8
tree7a6b1af1a6bbe30183c2bfbb06e8067018283fb7
parent4e176d4f0c8091bc2a907e05db9338bbef473857
Activate selection when interacting with editable content
https://bugs.webkit.org/show_bug.cgi?id=185017

Reviewed by Tim Horton.

Source/WebKit:

Fixes a regression from r231016 where selection now does not work when interacting with
editable content. When we go into editable content, we should turn on the assistant.
This fulfills the requirement of user interaction as well, so any javascript selections
after this point should be valid.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingKeyboard]):
(-[WKContentView _stopAssistingKeyboard]):

LayoutTests:

Fixed double-tap-on-editable-and-noneditable test, as it was not actually written correctly.
Should actually double tap on correct content and check for the correct output now.
Added two more tests to make sure that selections really are happening in editable content.

* fast/events/touch/ios/double-tap-on-editable-and-noneditable.html:
* fast/events/touch/ios/double-tap-on-editable-content-for-selection-expected.txt: Added.
* fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text-expected.txt: Added.
* fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html: Added.
* fast/events/touch/ios/double-tap-on-editable-content-for-selection.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/double-tap-on-editable-and-noneditable.html
LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection.html [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm