Web Inspector: clicking in Inspector webview clears the selection in the inspected...
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2017 23:05:43 +0000 (23:05 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2017 23:05:43 +0000 (23:05 +0000)
commit56d90cfec282c25c70f9c6dd485800a8ac097a21
treeff57f882d3572e56aa243bee313bc757a7dcc76e
parent0dea35b68b35fe6a490621e8911e63b289741c8d
Web Inspector: clicking in Inspector webview clears the selection in the inspected page
https://bugs.webkit.org/show_bug.cgi?id=178014
<rdar://problem/12706857>

Reviewed by Timothy Hatcher.

If the Inspector is docked to the inspected view, clicking on the Inspector
webview will cause selection in the inspected view to be lost. This is because
the selection is lost when the web view resigns first responder.

Add a check in maintainsInactiveSelection to always retain selection if
Web Inspector is open. This approach seems simpler than trying to sync a client's
usage of WKPageSetMaintainsInactiveSelection with overrides that need to be applied
and unapplied when an inspector web view is shown or hidden.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maintainsInactiveSelection const):
(WebKit::WebPageProxy::inspector const): Drive by, use nullptr.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::maintainsInactiveSelection const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h