Don't activate Selection Assistant unless it is actually needed.
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2018 20:34:40 +0000 (20:34 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Apr 2018 20:34:40 +0000 (20:34 +0000)
commitc3f0b1ac900e5b0210fd2dad9dec603c30f262e0
tree764dbe0dafdf808ce58ee1ac889a6711f811437c
parentd9043888746430d746e8089fda6cd1551524095b
Don't activate Selection Assistant unless it is actually needed.
https://bugs.webkit.org/show_bug.cgi?id=184944
<rdar://problem/39469671>

Reviewed by Tim Horton.

Source/WebKit:

Don't activate the selection unless we need to. Activating on init is overeager and allowing Javascript to
activate selections without user input.

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

LayoutTests:

Turning on previously flakey tests that are fixed with this change.

* platform/ios-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-wk2/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm