[iOS] Pasting rich content does not perform a two-step paste
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jul 2014 00:12:02 +0000 (00:12 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jul 2014 00:12:02 +0000 (00:12 +0000)
commit550d608e9364767668f04280f9ed63613fff19f8
treee16f0a86db144862a88867bb38057d33c8488797
parent1c7f64aebf27b3310f17aa266a42152650b7b269
[iOS] Pasting rich content does not perform a two-step paste
https://bugs.webkit.org/show_bug.cgi?id=134795

Reviewed by Benjamin Poulain.

Source/WebCore:
UIKit requires writing something (anything!) to a particular pasteboard
during copy in order to flag the content as rich. When a paste occurs,
UIKit will read this flag and perform a two-step paste.

Test: platform/ios-sim/editing/pasteboard/two-step-paste.html

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):

LayoutTests:
Copy and paste some text, and make sure that the two step paste occurred.
The mechanism for detecting this is whether or not styles have changed appropriately.

* platform/ios-sim/editing/pasteboard/two-step-paste-expected.txt: Added.
* platform/ios-sim/editing/pasteboard/two-step-paste.html: Added.

Tools:
Two-step paste requires setting InputViewObeysDOMFocus on the UIWebBrowserView.

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm