[iOS] Get iOS part off legacy clipboard
Created attachment 202233 [details]
Attachment 202233 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Clipboard.h', u'Source/WebCore/editing/Editor.cpp', u'Source/WebCore/platform/Pasteboard.h', u'Source/WebCore/platform/ios/ClipboardIOS.h', u'Source/WebCore/platform/ios/ClipboardIOS.mm', u'Source/WebCore/platform/ios/PasteboardIOS.mm']" exit_code: 1
Source/WebCore/editing/Editor.cpp:708: Do not add platform specific code in WebCore outside of platform. [build/webcore_platform_layering_violation] 
Source/WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] 
Total errors found: 2 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #2)
> Source/WebCore/editing/Editor.cpp:708: Do not add platform specific code in WebCore outside of platform. [build/webcore_platform_layering_violation] 
That guideline is right in spirit, but wrong in detail.
Created attachment 203554 [details]
Created attachment 208640 [details]
I need some help testing this in an iOS merge. I think the patch is ready.
Comment on attachment 208640 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=208640&action=review
This change looks sane to me. I noticed some minor issues. I am happy to help you merge this change into iOS WebKit and test it. We will likely need to make changes to iOS-specific files that aren't upstream, at the time of writing, before we can build with this change. It should be sufficient to land this change and then merge it into iOS WebKit and test it. Let me know if you would like to make such changes and test this patch before landing it in the WebKit.org repository.
Dave Kilzer may also have insight/suggestions into how best to merge and test this in iOS WebKit.
> + clipboard->pasteboard()->setFrame(m_frame);
Notice that Clipboard::pasteboard() returns a reference instead of a pointer: <http://trac.webkit.org/browser/trunk/Source/WebCore/dom/Clipboard.h?rev=153978#L136>. So, we need to write this as:
> +String Pasteboard::readString(const String& type) const
Notice that Pasteboard::readString() isn't declared const in Pasteboard.h, <http://trac.webkit.org/browser/trunk/Source/WebCore/platform/Pasteboard.h#L129>.
> +ListHashSet<String> Pasteboard::types() const
Notice that Pasteboard::types() isn't declared const in Pasteboard.h, <http://trac.webkit.org/browser/trunk/Source/WebCore/platform/Pasteboard.h?rev=153978#L127>.
Created attachment 208847 [details]
Here are the changes we need to make in order to build this patch on iOS.
Just curious, Dan, any testing results yet? Did it work?
Committed r154160: <http://trac.webkit.org/changeset/154160>
(In reply to comment #9)
> Just curious, Dan, any testing results yet? Did it work?
As far as I can tell copying and pasting works in iOS after this change. I copied and pasted combinations of English, Hebrew, and Chinese text from websites and third-party apps into content editable elements, <textarea>s and <input>s as well as copied and pasted such text between content editable elements, <textarea>s and <input>s.