<!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>[212563] trunk/Source/WebCore</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/212563">212563</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2017-02-17 12:02:03 -0800 (Fri, 17 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Begin overhauling the pasteboard implementation
https://bugs.webkit.org/show_bug.cgi?id=168525

Reviewed by Tim Horton.

Add a new PasteboardWriterData object. This object will hold data that is going
to be written to the pasteboard at some point. Currently it only supports plain text.

Also add a Mac-only PasteboardWriter class which can convert a PasteboardWriterDataObject
into an object that conforms to NSPasteboardWriting.

The basic idea is that instead of doing a bunch of pasteboard operations,
we'll just package all the pasteboard data up into an object and ship it over to WebKit.

This code is currently unused but will be adopted by a new drag implementation (in an upcoming patch).

* WebCore.xcodeproj/project.pbxproj:
* platform/PasteboardWriterData.cpp: Added.
(WebCore::PasteboardWriterData::PasteboardWriterData):
(WebCore::PasteboardWriterData::~PasteboardWriterData):
(WebCore::PasteboardWriterData::isEmpty):
(WebCore::PasteboardWriterData::setPlainText):
* platform/PasteboardWriterData.h: Added.
* platform/mac/PasteboardWriter.h: Added.
* platform/mac/PasteboardWriter.mm: Added.
(WebCore::createPasteboardWriting):
* platform/spi/mac/NSPasteboardSPI.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformPasteboardWriterDatacpp">trunk/Source/WebCore/platform/PasteboardWriterData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformPasteboardWriterDatah">trunk/Source/WebCore/platform/PasteboardWriterData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPasteboardWriterh">trunk/Source/WebCore/platform/mac/PasteboardWriter.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPasteboardWritermm">trunk/Source/WebCore/platform/mac/PasteboardWriter.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformspimacNSPasteboardSPIh">trunk/Source/WebCore/platform/spi/mac/NSPasteboardSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (212562 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-02-17 19:34:48 UTC (rev 212562)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -2093,6 +2093,7 @@
</span><span class="cx">     platform/MainThreadSharedTimer.cpp
</span><span class="cx">     platform/MemoryPressureHandler.cpp
</span><span class="cx">     platform/NotImplemented.cpp
</span><ins>+    platform/PasteboardWriterData.cpp
</ins><span class="cx">     platform/PlatformSpeechSynthesisUtterance.cpp
</span><span class="cx">     platform/PlatformSpeechSynthesisVoice.cpp
</span><span class="cx">     platform/PlatformSpeechSynthesizer.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (212562 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-17 19:34:48 UTC (rev 212562)
+++ trunk/Source/WebCore/ChangeLog        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2017-02-17  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Begin overhauling the pasteboard implementation
+        https://bugs.webkit.org/show_bug.cgi?id=168525
+
+        Reviewed by Tim Horton.
+
+        Add a new PasteboardWriterData object. This object will hold data that is going
+        to be written to the pasteboard at some point. Currently it only supports plain text.
+
+        Also add a Mac-only PasteboardWriter class which can convert a PasteboardWriterDataObject
+        into an object that conforms to NSPasteboardWriting.
+
+        The basic idea is that instead of doing a bunch of pasteboard operations,
+        we'll just package all the pasteboard data up into an object and ship it over to WebKit.
+
+        This code is currently unused but will be adopted by a new drag implementation (in an upcoming patch).
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/PasteboardWriterData.cpp: Added.
+        (WebCore::PasteboardWriterData::PasteboardWriterData):
+        (WebCore::PasteboardWriterData::~PasteboardWriterData):
+        (WebCore::PasteboardWriterData::isEmpty):
+        (WebCore::PasteboardWriterData::setPlainText):
+        * platform/PasteboardWriterData.h: Added.
+        * platform/mac/PasteboardWriter.h: Added.
+        * platform/mac/PasteboardWriter.mm: Added.
+        (WebCore::createPasteboardWriting):
+        * platform/spi/mac/NSPasteboardSPI.h: Added.
+
</ins><span class="cx"> 2017-02-17  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (212562 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-17 19:34:48 UTC (rev 212562)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -951,6 +951,10 @@
</span><span class="cx">                 1AEF4E69170E174800AB2799 /* CachedSVGDocumentClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEF4E68170E174800AB2799 /* CachedSVGDocumentClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AF326790D78B9440068F0C4 /* EditorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF326770D78B9440068F0C4 /* EditorClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AF4CEEC18BC3C1B00BC2D34 /* VisitedLinkStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF4CEEB18BC3C1B00BC2D34 /* VisitedLinkStore.cpp */; };
</span><ins>+                1AF5E4D41E56735B004A1F01 /* PasteboardWriterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF5E4D21E56735A004A1F01 /* PasteboardWriterData.cpp */; };
+                1AF5E4D51E56735B004A1F01 /* PasteboardWriterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF5E4D31E56735A004A1F01 /* PasteboardWriterData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                1AF5E4E21E5779B1004A1F01 /* PasteboardWriter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AF5E4E01E5779B1004A1F01 /* PasteboardWriter.mm */; };
+                1AF5E4E31E5779B1004A1F01 /* PasteboardWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF5E4E11E5779B1004A1F01 /* PasteboardWriter.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1AF62EE614DA22A70041556C /* ScrollingCoordinatorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AF62EE314DA22A70041556C /* ScrollingCoordinatorMac.mm */; };
</span><span class="cx">                 1AF62EE714DA22A70041556C /* ScrollingCoordinator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF62EE414DA22A70041556C /* ScrollingCoordinator.cpp */; };
</span><span class="cx">                 1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF62EE514DA22A70041556C /* ScrollingCoordinator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7832,6 +7836,7 @@
</span><span class="cx">                 1A2AAC570DC2A3B100A20D9A /* ApplicationCacheStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheStorage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2E6E580CC55213004A2062 /* SQLValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2E6E780CC556D5004A2062 /* SQLiteAuthorizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteAuthorizer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A2F67891E577ABD00997FD1 /* NSPasteboardSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSPasteboardSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A3586DD15264C450022A659 /* RenderMultiColumnFlowThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMultiColumnFlowThread.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A3586DE15264C450022A659 /* RenderMultiColumnFlowThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMultiColumnFlowThread.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A3763691A2E68BB009A7EE2 /* StorageNamespaceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageNamespaceProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8129,6 +8134,10 @@
</span><span class="cx">                 1AEF4E68170E174800AB2799 /* CachedSVGDocumentClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedSVGDocumentClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AF326770D78B9440068F0C4 /* EditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AF4CEEB18BC3C1B00BC2D34 /* VisitedLinkStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkStore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1AF5E4D21E56735A004A1F01 /* PasteboardWriterData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PasteboardWriterData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AF5E4D31E56735A004A1F01 /* PasteboardWriterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PasteboardWriterData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AF5E4E01E5779B1004A1F01 /* PasteboardWriter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardWriter.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1AF5E4E11E5779B1004A1F01 /* PasteboardWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PasteboardWriter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1AF62EE314DA22A70041556C /* ScrollingCoordinatorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingCoordinatorMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AF62EE414DA22A70041556C /* ScrollingCoordinator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingCoordinator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AF62EE514DA22A70041556C /* ScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingCoordinator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -18063,6 +18072,8 @@
</span><span class="cx">                                 93500F3113FDE3BE0099EC24 /* NSScrollerImpDetails.h */,
</span><span class="cx">                                 52F52E1014A0134F00ACC397 /* NSScrollerImpDetails.mm */,
</span><span class="cx">                                 4B2709810AF2E5E00065127F /* PasteboardMac.mm */,
</span><ins>+                                1AF5E4E01E5779B1004A1F01 /* PasteboardWriter.mm */,
+                                1AF5E4E11E5779B1004A1F01 /* PasteboardWriter.h */,
</ins><span class="cx">                                 CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */,
</span><span class="cx">                                 CDEA762F146084EE008B31F1 /* PlatformClockCA.h */,
</span><span class="cx">                                 CDAA8D0714D385600061EA60 /* PlatformClockCM.h */,
</span><span class="lines">@@ -19034,6 +19045,7 @@
</span><span class="cx">                                 1C6466271A12C3F90094603C /* NSFontSPI.h */,
</span><span class="cx">                                 9321D58F1A3906FA008052BE /* NSImmediateActionGestureRecognizerSPI.h */,
</span><span class="cx">                                 937F4CCD1A2D4B0100BB39F5 /* NSMenuSPI.h */,
</span><ins>+                                1A2F67891E577ABD00997FD1 /* NSPasteboardSPI.h */,
</ins><span class="cx">                                 93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */,
</span><span class="cx">                                 7C0406121C66EE9C00AF0711 /* NSScrollerImpSPI.h */,
</span><span class="cx">                                 F40EA8AA1B867D6500CE5581 /* NSScrollingInputFilterSPI.h */,
</span><span class="lines">@@ -22961,6 +22973,8 @@
</span><span class="cx">                                 E1513D501677F08800149FCB /* NotImplemented.cpp */,
</span><span class="cx">                                 98EB1F941313FE0500D0E1EA /* NotImplemented.h */,
</span><span class="cx">                                 4B2708C50AF19EE40065127F /* Pasteboard.h */,
</span><ins>+                                1AF5E4D21E56735A004A1F01 /* PasteboardWriterData.cpp */,
+                                1AF5E4D31E56735A004A1F01 /* PasteboardWriterData.h */,
</ins><span class="cx">                                 C5F765B414E1D414006C899B /* PasteboardStrategy.h */,
</span><span class="cx">                                 A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */,
</span><span class="cx">                                 BC5C76291497FE1400BC4775 /* PlatformEvent.h */,
</span><span class="lines">@@ -25584,6 +25598,7 @@
</span><span class="cx">                                 D0B0556809C6700100307E43 /* CreateLinkCommand.h in Headers */,
</span><span class="cx">                                 514C766E0CE923A1007EF3CD /* Credential.h in Headers */,
</span><span class="cx">                                 3792917A1985EF3900F4B661 /* CredentialBase.h in Headers */,
</span><ins>+                                1AF5E4E31E5779B1004A1F01 /* PasteboardWriter.h in Headers */,
</ins><span class="cx">                                 3792917E1987678F00F4B661 /* CredentialCocoa.h in Headers */,
</span><span class="cx">                                 51A052331058774F00CC9E95 /* CredentialStorage.h in Headers */,
</span><span class="cx">                                 2D481F02146B5C5500AA7834 /* CrossfadeGeneratedImage.h in Headers */,
</span><span class="lines">@@ -25832,6 +25847,7 @@
</span><span class="cx">                                 2D29ECC6192ECC8300984B78 /* DisplayRefreshMonitorClient.h in Headers */,
</span><span class="cx">                                 2D29ECCA192F1F1D00984B78 /* DisplayRefreshMonitorIOS.h in Headers */,
</span><span class="cx">                                 2DE70023192FE82A00B0975C /* DisplayRefreshMonitorMac.h in Headers */,
</span><ins>+                                1AF5E4D51E56735B004A1F01 /* PasteboardWriterData.h in Headers */,
</ins><span class="cx">                                 2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
</span><span class="cx">                                 CD52481B18E200ED0008A07D /* DisplaySleepDisabler.h in Headers */,
</span><span class="cx">                                 5D8C4DC01428222C0026CE72 /* DisplaySleepDisablerCocoa.h in Headers */,
</span><span class="lines">@@ -31134,6 +31150,7 @@
</span><span class="cx">                                 9493B6BE1D74B4120088E780 /* MediaQueryBlockWatcher.cpp in Sources */,
</span><span class="cx">                                 4E19592B0A39DACC00220FE5 /* MediaQueryEvaluator.cpp in Sources */,
</span><span class="cx">                                 7CB5CA3F1E525C7100FAEF13 /* MediaQueryExpression.cpp in Sources */,
</span><ins>+                                1AF5E4D41E56735B004A1F01 /* PasteboardWriterData.cpp in Sources */,
</ins><span class="cx">                                 D3A94A38122DABAC00A37BBC /* MediaQueryList.cpp in Sources */,
</span><span class="cx">                                 D3AA10F3123A98AA0092152B /* MediaQueryMatcher.cpp in Sources */,
</span><span class="cx">                                 9493B6C01D74B4120088E780 /* MediaQueryParser.cpp in Sources */,
</span><span class="lines">@@ -31751,6 +31768,7 @@
</span><span class="cx">                                 A78FE13B12366B1000ACE8D0 /* SpellChecker.cpp in Sources */,
</span><span class="cx">                                 B8DBDB4D130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp in Sources */,
</span><span class="cx">                                 4512502215DCE37D002F84E2 /* SpinButtonElement.cpp in Sources */,
</span><ins>+                                1AF5E4E21E5779B1004A1F01 /* PasteboardWriter.mm in Sources */,
</ins><span class="cx">                                 93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
</span><span class="cx">                                 93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
</span><span class="cx">                                 93309E15099E64920056E581 /* SplitTextNodeContainingElementCommand.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPasteboardWriterDatacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/PasteboardWriterData.cpp (0 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PasteboardWriterData.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/PasteboardWriterData.cpp        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;PasteboardWriterData.h&quot;
+
+namespace WebCore {
+
+PasteboardWriterData::PasteboardWriterData()
+{
+}
+
+PasteboardWriterData::~PasteboardWriterData()
+{
+}
+
+bool PasteboardWriterData::isEmpty() const
+{
+    if (m_plainText)
+        return false;
+
+    return true;
+}
+
+void PasteboardWriterData::setPlainText(PlainText plainText)
+{
+    ASSERT(!m_plainText);
+
+    m_plainText = WTFMove(plainText);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformPasteboardWriterDatah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/PasteboardWriterData.h (0 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PasteboardWriterData.h                                (rev 0)
+++ trunk/Source/WebCore/platform/PasteboardWriterData.h        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;wtf/Optional.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class PasteboardWriterData final {
+public:
+    PasteboardWriterData();
+    ~PasteboardWriterData();
+
+    struct PlainText {
+        bool canSmartCopyOrDelete;
+        String text;
+    };
+
+    WEBCORE_EXPORT bool isEmpty() const;
+
+    const std::optional&lt;PlainText&gt;&amp; plainText() const { return m_plainText; }
+    void setPlainText(PlainText);
+
+private:
+    std::optional&lt;PlainText&gt; m_plainText;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPasteboardWriterh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/PasteboardWriter.h (0 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PasteboardWriter.h                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/PasteboardWriter.h        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(MAC)
+
+#import &lt;wtf/RetainPtr.h&gt;
+
+namespace WebCore {
+
+class PasteboardWriterData;
+
+WEBCORE_EXPORT RetainPtr&lt;id &lt;NSPasteboardWriting&gt;&gt; createPasteboardWriting(const PasteboardWriterData&amp;);
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPasteboardWritermm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/mac/PasteboardWriter.mm (0 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PasteboardWriter.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/mac/PasteboardWriter.mm        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;PasteboardWriter.h&quot;
+
+#if PLATFORM(MAC)
+
+#import &quot;NSPasteboardSPI.h&quot;
+#import &quot;PasteboardWriterData.h&quot;
+
+namespace WebCore {
+
+RetainPtr&lt;id &lt;NSPasteboardWriting&gt;&gt; createPasteboardWriting(const PasteboardWriterData&amp; data)
+{
+    auto pasteboardItem = adoptNS([[NSPasteboardItem alloc] init]);
+
+    if (auto&amp; plainText = data.plainText()) {
+        [pasteboardItem setString:plainText-&gt;text forType:NSPasteboardTypeString];
+        if (plainText-&gt;canSmartCopyOrDelete)
+            [pasteboardItem setData:nil forType:_NXSmartPaste];
+    }
+
+    return pasteboardItem;
+}
+
+}
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformspimacNSPasteboardSPIh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/spi/mac/NSPasteboardSPI.h (0 => 212563)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/mac/NSPasteboardSPI.h                                (rev 0)
+++ trunk/Source/WebCore/platform/spi/mac/NSPasteboardSPI.h        2017-02-17 20:02:03 UTC (rev 212563)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+// FIXME: This should include AppKit/AppKitPrivate.h when using the internal SDK,
+// but that file won't compile as C++.
+
+extern NSString *_NXSmartPaste;
</ins></span></pre>
</div>
</div>

</body>
</html>