Highlighting password field then making a Sticky Note via Safari Services exposes...
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 01:02:15 +0000 (01:02 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 01:02:15 +0000 (01:02 +0000)
commit85ab8e18fa930ee38fcd4ed0501cf03446e9d883
tree858ad81a1f5002c7104d69afa296acd789f4f699
parente8883fcea8db0cf9911fa96426713a3481d392b6
Highlighting password field then making a Sticky Note via Safari Services exposes password
https://bugs.webkit.org/show_bug.cgi?id=126946

Reviewed by Enrica Casucci.

Using the Services menu has a slightly different codepath than Editor::copy() does. This
patch duplicates the canCopy() check that Editor::copy() does.

Testing is not possible because the Services menu is not accessible to our tests.

* editing/mac/EditorMac.mm:
(WebCore::Editor::stringSelectionForPasteboard):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
(WebCore::Editor::dataSelectionForPasteboard):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/mac/EditorMac.mm