Web Inspector: REGRESSION (r213000): copy from Search results content view broken
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 22:38:41 +0000 (22:38 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jun 2018 22:38:41 +0000 (22:38 +0000)
commitc2c864468979dd9bc718a61f03f88522bfcf9492
treeb80ffdefdd7db40882b36d53ef150b8135bffff0
parentaad90ee2ce98653ec0f971e5600fd514297b0963
Web Inspector: REGRESSION (r213000): copy from Search results content view broken
https://bugs.webkit.org/show_bug.cgi?id=187020
<rdar://problem/40928766>

Reviewed by Timothy Hatcher.

Since WI._copy listens for a copy event from the document, it is called
after CodeMirror handles the event and sets clipboard data. If WI._copy
finds a custom copy handler to call, that handler can determine whether
to overwrite the current clipboard data, or leave it alone.

SearchTabContentView's handleCopyEvent method should return early if the
content tree outline doesn't have the focus. This prevents the selection
in the TextEditor from being overwritten, without any special knowledge of
the content browser's current view.

* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView.prototype.handleCopyEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js