Implement MultiDocument protocol for restoring focus to a WKWebView
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2018 21:32:17 +0000 (21:32 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2018 21:32:17 +0000 (21:32 +0000)
commitb123c02da5ddd6405979f2ffc22026b9ab32730e
treed94dedc3b8cae88505d064d7bb7a695853d3c8eb
parent82da9a82273f15fd5455eb77a05eacd47d88cdeb
Implement MultiDocument protocol for restoring focus to a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=181510

Reviewed by Dan Bernstein.

Support the UIKit protocol for restoring focus to a what previously had focus.
WebKit already knows what node was previously being focused by the DOM, we merely
need to be asked to turn the focus on again.
Resubmitting https://trac.webkit.org/changeset/226826 as it broke internal builds

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _restoreFocusWithToken:]):
(-[WKContentView _preserveFocusWithToken:destructively:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm