Title: [163926] branches/safari-537.75-branch/Source/WebCore
Revision
163926
Author
[email protected]
Date
2014-02-11 18:03:55 -0800 (Tue, 11 Feb 2014)

Log Message

Merge r161925.

Modified Paths

Diff

Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (163925 => 163926)


--- branches/safari-537.75-branch/Source/WebCore/ChangeLog	2014-02-12 02:01:14 UTC (rev 163925)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog	2014-02-12 02:03:55 UTC (rev 163926)
@@ -1,5 +1,26 @@
 2014-02-11  Matthew Hanson  <[email protected]>
 
+        Merge r161925.
+
+    2014-01-13  Myles C. Maxfield  <[email protected]>
+
+            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):
+
+2014-02-11  Matthew Hanson  <[email protected]>
+
         Merge r158739.
 
     2013-11-06  Ryosuke Niwa  <[email protected]>

Modified: branches/safari-537.75-branch/Source/WebCore/editing/mac/EditorMac.mm (163925 => 163926)


--- branches/safari-537.75-branch/Source/WebCore/editing/mac/EditorMac.mm	2014-02-12 02:01:14 UTC (rev 163925)
+++ branches/safari-537.75-branch/Source/WebCore/editing/mac/EditorMac.mm	2014-02-12 02:03:55 UTC (rev 163926)
@@ -278,6 +278,8 @@
 // This was left in a bad state when selectedTextForClipboard was added. Need to look over clients and fix this.
 String Editor::stringSelectionForPasteboard()
 {
+    if (!canCopy())
+        return "";
     String text = selectedText();
     text.replace(noBreakSpace, ' ');
     return text;
@@ -285,6 +287,8 @@
 
 String Editor::stringSelectionForPasteboardWithImageAltText()
 {
+    if (!canCopy())
+        return "";
     String text = selectedTextForClipboard();
     text.replace(noBreakSpace, ' ');
     return text;
@@ -292,6 +296,8 @@
 
 PassRefPtr<SharedBuffer> Editor::dataSelectionForPasteboard(const String& pasteboardType)
 {
+    if (!canCopy())
+        return nullptr;
     return Pasteboard::getDataSelection(m_frame, pasteboardType);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to