<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208576] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208576">208576</a></dd>
<dt>Author</dt> <dd>wilander@apple.com</dd>
<dt>Date</dt> <dd>2016-11-10 20:15:41 -0800 (Thu, 10 Nov 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add link information to data transfer pasteboard for drag and drop links
https://bugs.webkit.org/show_bug.cgi?id=163468
<rdar://problem/20634630>
Reviewed by Brent Fulgham.
Source/WebCore:
Test: editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html
This test ensures data transfers still work for types 'text' and 'url', i.e. that we don't
regress in-page use of the drag pasteboard.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
Now adds trustworthy link information to the drag pasteboard.
* platform/Pasteboard.h:
New function declaration Pasteboard::writeTrustworthyWebURLsPboardType.
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
Empty, i.e. not implemented.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
Empty, i.e. not implemented.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
Calls ASSERT_NOT_REACHED() to make sure we don't use this function before we have
decided on a trustrworthy URL pasteboard type on iOS. Currently not used since we
don't support drag & drop on iOS.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
Writes the given URL to the WebURLsWithTitlesPboardType. This pasteboard type
serves as a trusted drop source.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
Empty, i.e. not implemented.
LayoutTests:
* editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt: Added.
* editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html: Added.
This test ensures data transfer is not deleted or overwritten for the types 'text' and 'url'.
* platform/ios-simulator/TestExpectations:
Drag & drop is not supported on iOS.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformPasteboardh">trunk/Source/WebCore/platform/Pasteboard.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPasteboardEflcpp">trunk/Source/WebCore/platform/efl/PasteboardEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgtkPasteboardGtkcpp">trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformiosPasteboardIOSmm">trunk/Source/WebCore/platform/ios/PasteboardIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPasteboardMacmm">trunk/Source/WebCore/platform/mac/PasteboardMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformwinPasteboardWincpp">trunk/Source/WebCore/platform/win/PasteboardWin.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingpasteboarddraglinkwithdatatransferaddstrustedlinktopasteboardexpectedtxt">trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingpasteboarddraglinkwithdatatransferaddstrustedlinktopasteboardhtml">trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/LayoutTests/ChangeLog        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-11-10 John Wilander <wilander@apple.com>
+
+ Add link information to data transfer pasteboard for drag and drop links
+ https://bugs.webkit.org/show_bug.cgi?id=163468
+ <rdar://problem/20634630>
+
+ Reviewed by Brent Fulgham.
+
+ * editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt: Added.
+ * editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html: Added.
+ This test ensures data transfer is not deleted or overwritten for the types 'text' and 'url'.
+ * platform/ios-simulator/TestExpectations:
+ Drag & drop is not supported on iOS.
+
</ins><span class="cx"> 2016-11-10 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r208522): LayoutTest fast/loader/reload-zero-byte-plugin.html is a flaky failure
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboarddraglinkwithdatatransferaddstrustedlinktopasteboardexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt (0 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt         (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard-expected.txt        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstAnchorSource and not overwritten.
+PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondAnchorSource and not overwritten.
+PASS 'javascript:alert('Set by data transfer');' was set in the data transfer for firstSvgSource and not overwritten.
+PASS 'http://webkit.org/setByDataTransfer' was set in the data transfer for secondSvgSource and not overwritten.
+
+This only has an ondragenter handler and is here to make sure dragging over it doesn't change the pasteboard.
+This only has an ondragover handler and is here to make sure dragging over it doesn't change the pasteboard.
+firstAnchorSource
+secondAnchorSource
+https://webkit.org
+
+https://webkit.org
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestseditingpasteboarddraglinkwithdatatransferaddstrustedlinktopasteboardhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html (0 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html         (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html>
+<head>
+ <script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<input id="destination" type="text" style="height: 256px; width: 256px; border: 1px dashed black;" />
+<hr>
+
+<div id="ondragenterElement" ondragenter='event.preventDefault(); event.dataTransfer.setData("url", "http://webkit.org/setByDragenter")'>
+ <a href="https://webkit.org">This only has an ondragenter handler and is here to make sure dragging over it doesn't change the pasteboard.</a>
+</div>
+
+<div id="ondragoverElement" ondragover='event.preventDefault(); event.dataTransfer.setData("text", "Text set by dragover.")'>
+ <a href="https://webkit.org">This only has an ondragover handler and is here to make sure dragging over it doesn't change the pasteboard.</a>
+</div>
+
+<a id="firstAnchorSource" draggable="true" href="https://webkit.org">firstAnchorSource</a><br>
+<a id="secondAnchorSource" draggable="true" href="https://webkit.org">secondAnchorSource</a><br>
+
+<svg id="firstSvgSource" draggable="true" width="140" height="30" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <a xlink:href="https://webkit.org" target="_blank">
+ <rect height="30" width="120" y="0" x="0" rx="15"/>
+ <text fill="white" text-anchor="middle" y="21" x="60">https://webkit.org</text>
+ </a>
+</svg><br>
+<svg id="secondSvgSource" draggable="true" width="140" height="30" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <a xlink:href="https://webkit.org" target="_blank">
+ <rect height="30" width="120" y="0" x="0" rx="15"/>
+ <text fill="blue" text-anchor="middle" y="21" x="60">https://webkit.org</text>
+ </a>
+</svg><br>
+
+<!-- Should be uncommented when https://bugs.webkit.org/show_bug.cgi?id=164280 is fixed
+
+<div draggable="true">
+ <math id="firstMathSource" style="padding: 0">
+ <mrow href="https://webkit.org">
+ <mrow>
+ <mrow>
+ <mspace id="space1" width="150px" height="20px" mathbackground="yellow"></mspace>
+ </mrow>
+ </mrow>
+ </mrow>
+ </math>
+</div>
+<div draggable="true">
+ <math id="secondMathSource" style="padding: 0">
+ <mrow href="https://webkit.org">
+ <mrow>
+ <mrow>
+ <mspace id="space2" width="150px" height="20px" mathbackground="red"></mspace>
+ </mrow>
+ </mrow>
+ </mrow>
+ </math>
+</div>
+
+-->
+<script>
+ var TEXT_TO_SET_IN_DATA_TRANSFER = "javascript:alert('Set by data transfer');";
+ var URL_TO_SET_IN_DATA_TRANSFER = "http://webkit.org/setByDataTransfer";
+
+ var testResults = [];
+
+ function addDragstartEventHander(elementId, dataTransferType) {
+ var intendedDataTransferContent = (dataTransferType === "text" ? TEXT_TO_SET_IN_DATA_TRANSFER : URL_TO_SET_IN_DATA_TRANSFER);
+ document.getElementById(elementId).addEventListener("dragstart", function (event) {
+ event.dataTransfer.setData(dataTransferType, intendedDataTransferContent);
+ var actualDataTransferContent = event.dataTransfer.getData(dataTransferType);
+ if (actualDataTransferContent === intendedDataTransferContent) {
+ testResults.push({
+ passed : true,
+ message : "'" + actualDataTransferContent + "' was set in the data transfer for " + elementId + " and not overwritten."
+ });
+ } else {
+ testResults.push({
+ passed : false,
+ message : (actualDataTransferContent ? "'" + actualDataTransferContent + "'" : "Nothing") + " was set in the data transfer for " + elementId + " or it was overwritten."
+ });
+ }
+ });
+ }
+
+ addDragstartEventHander("firstAnchorSource", "text");
+ addDragstartEventHander("secondAnchorSource", "url");
+ addDragstartEventHander("firstSvgSource", "text");
+ addDragstartEventHander("secondSvgSource", "url");
+ // Should be uncommented when https://bugs.webkit.org/show_bug.cgi?id=164280 is fixed
+ // addDragstartEventHander("firstMathSource", "text");
+ // addDragstartEventHander("secondMathSource", "url");
+
+ function moveMouseToCenterOfElement(elementId) {
+ var element = document.getElementById(elementId);
+ var centerX = element.offsetLeft + element.offsetWidth / 2;
+ var centerY = element.offsetTop + element.offsetHeight / 2;
+ eventSender.mouseMoveTo(centerX, centerY);
+ }
+
+ function dragAndDropElement (elementId) {
+ moveMouseToCenterOfElement(elementId);
+ eventSender.mouseDown();
+ eventSender.leapForward(200);
+ moveMouseToCenterOfElement("ondragoverElement");
+ eventSender.leapForward(100);
+ moveMouseToCenterOfElement("ondragenterElement");
+ eventSender.leapForward(100);
+ moveMouseToCenterOfElement("destination");
+ eventSender.leapForward(200);
+ eventSender.mouseUp();
+ }
+
+ if (window.testRunner && eventSender) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+
+ dragAndDropElement("firstAnchorSource");
+ dragAndDropElement("secondAnchorSource");
+ dragAndDropElement("firstSvgSource");
+ dragAndDropElement("secondSvgSource");
+ // Should be uncommented when https://bugs.webkit.org/show_bug.cgi?id=164280 is fixed
+ // dragAndDropElement("firstMathSource");
+ // dragAndDropElement("secondMathSource");
+
+ testResults.forEach(function(result) {
+ if (result.passed) {
+ testPassed(result.message);
+ } else {
+ testFailed(result.message);
+ }
+ });
+
+ testRunner.notifyDone();
+ }
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -229,6 +229,7 @@
</span><span class="cx"> fast/canvas/canvas-toDataURL-webp.html
</span><span class="cx">
</span><span class="cx"> # Drag-and-drop is not supported:
</span><ins>+editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html
</ins><span class="cx"> fast/events/bogus-dropEffect-effectAllowed.html
</span><span class="cx"> fast/events/clear-drag-state.html
</span><span class="cx"> fast/events/clear-edit-drag-state.html
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/ChangeLog        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-11-10 John Wilander <wilander@apple.com>
+
+ Add link information to data transfer pasteboard for drag and drop links
+ https://bugs.webkit.org/show_bug.cgi?id=163468
+ <rdar://problem/20634630>
+
+ Reviewed by Brent Fulgham.
+
+ Test: editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html
+ This test ensures data transfers still work for types 'text' and 'url', i.e. that we don't
+ regress in-page use of the drag pasteboard.
+
+ * page/DragController.cpp:
+ (WebCore::DragController::startDrag):
+ Now adds trustworthy link information to the drag pasteboard.
+ * platform/Pasteboard.h:
+ New function declaration Pasteboard::writeTrustworthyWebURLsPboardType.
+ * platform/efl/PasteboardEfl.cpp:
+ (WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
+ Empty, i.e. not implemented.
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
+ Empty, i.e. not implemented.
+ * platform/ios/PasteboardIOS.mm:
+ (WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
+ Calls ASSERT_NOT_REACHED() to make sure we don't use this function before we have
+ decided on a trustrworthy URL pasteboard type on iOS. Currently not used since we
+ don't support drag & drop on iOS.
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
+ Writes the given URL to the WebURLsWithTitlesPboardType. This pasteboard type
+ serves as a trusted drop source.
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeTrustworthyWebURLsPboardType):
+ Empty, i.e. not implemented.
+
</ins><span class="cx"> 2016-11-10 Said Abou-Hallawa <sabouhallawa@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r207182): [iOS] Crash because of passing freed CFDictionaryRef to CG when decoding a sub-sampled large image
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/page/DragController.cpp        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -875,6 +875,13 @@
</span><span class="cx"> // Simplify whitespace so the title put on the dataTransfer resembles what the user sees
</span><span class="cx"> // on the web page. This includes replacing newlines with spaces.
</span><span class="cx"> src.editor().copyURL(linkURL, hitTestResult.textContent().simplifyWhiteSpace(), dataTransfer.pasteboard());
</span><ins>+ } else {
+ // Make sure the pasteboard also contains trustworthy link data
+ // but don't overwrite more general pasteboard types.
+ PasteboardURL pasteboardURL;
+ pasteboardURL.url = linkURL;
+ pasteboardURL.title = hitTestResult.textContent();
+ dataTransfer.pasteboard().writeTrustworthyWebURLsPboardType(pasteboardURL);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const VisibleSelection& sourceSelection = src.selection().selection();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPasteboardh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Pasteboard.h (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Pasteboard.h        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/Pasteboard.h        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -166,6 +166,7 @@
</span><span class="cx"> virtual void read(PasteboardWebContentReader&);
</span><span class="cx">
</span><span class="cx"> virtual void write(const PasteboardURL&);
</span><ins>+ virtual void writeTrustworthyWebURLsPboardType(const PasteboardURL&);
</ins><span class="cx"> virtual void write(const PasteboardImage&);
</span><span class="cx"> virtual void write(const PasteboardWebContent&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPasteboardEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PasteboardEfl.cpp (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PasteboardEfl.cpp        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/efl/PasteboardEfl.cpp        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -96,6 +96,11 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
+{
+ notImplemented();
+}
+
</ins><span class="cx"> void Pasteboard::writeString(const String&, const String&)
</span><span class="cx"> {
</span><span class="cx"> notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgtkPasteboardGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx">
</span><span class="cx"> #include "DragData.h"
</span><span class="cx"> #include "Image.h"
</span><ins>+#include "NotImplemented.h"
</ins><span class="cx"> #include "PasteboardStrategy.h"
</span><span class="cx"> #include "PlatformStrategies.h"
</span><span class="cx"> #include "SelectionData.h"
</span><span class="lines">@@ -179,6 +180,11 @@
</span><span class="cx"> writeToClipboard();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
+{
+ notImplemented();
+}
+
</ins><span class="cx"> void Pasteboard::write(const PasteboardImage& pasteboardImage)
</span><span class="cx"> {
</span><span class="cx"> m_selectionData->clearAll();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosPasteboardIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -127,6 +127,15 @@
</span><span class="cx"> platformStrategies()->pasteboardStrategy()->writeToPasteboard(kUTTypeURL, pasteboardURL.url.string());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL& pasteboardURL)
+{
+ // A trustworthy URL pasteboard type needs to be decided on
+ // before we allow calls to this function. A page data transfer
+ // should not use the same pasteboard type as this function for
+ // URLs.
+ ASSERT_NOT_REACHED();
+}
+
</ins><span class="cx"> void Pasteboard::writePasteboard(const Pasteboard&)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPasteboardMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -234,6 +234,13 @@
</span><span class="cx"> m_changeCount = writeURLForTypes(writableTypesForURL(), m_pasteboardName, pasteboardURL);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL& pasteboardURL)
+{
+ NSURL *cocoaURL = pasteboardURL.url;
+ Vector<String> paths = { [cocoaURL absoluteString], pasteboardURL.title.stripWhiteSpace() };
+ m_changeCount = platformStrategies()->pasteboardStrategy()->setPathnamesForType(paths, WebURLsWithTitlesPboardType, m_pasteboardName);
+}
+
</ins><span class="cx"> static NSFileWrapper* fileWrapper(const PasteboardImage& pasteboardImage)
</span><span class="cx"> {
</span><span class="cx"> NSFileWrapper *wrapper = [[[NSFileWrapper alloc] initRegularFileWithContents:pasteboardImage.resourceData->createNSData().get()] autorelease];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinPasteboardWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/PasteboardWin.cpp (208575 => 208576)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/PasteboardWin.cpp        2016-11-11 02:20:48 UTC (rev 208575)
+++ trunk/Source/WebCore/platform/win/PasteboardWin.cpp        2016-11-11 04:15:41 UTC (rev 208576)
</span><span class="lines">@@ -721,6 +721,11 @@
</span><span class="cx"> writeURLToDataObject(pasteboardURL.url, pasteboardURL.title);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Pasteboard::writeTrustworthyWebURLsPboardType(const PasteboardURL&)
+{
+ notImplemented();
+}
+
</ins><span class="cx"> void Pasteboard::writeImage(Element& element, const URL&, const String&)
</span><span class="cx"> {
</span><span class="cx"> if (!is<RenderImage>(element.renderer()))
</span></span></pre>
</div>
</div>
</body>
</html>