RESOLVED FIXED 134795
[iOS] Pasting rich content does not perform a two-step paste
https://bugs.webkit.org/show_bug.cgi?id=134795
Summary [iOS] Pasting rich content does not perform a two-step paste
Myles C. Maxfield
Reported 2014-07-09 21:15:00 PDT
[iOS] Pasting rich content does not perform a two-step paste
Attachments
Patch (6.83 KB, patch)
2014-07-09 21:17 PDT, Myles C. Maxfield
benjamin: review+
benjamin: commit-queue-
Myles C. Maxfield
Comment 1 2014-07-09 21:17:08 PDT
Myles C. Maxfield
Comment 2 2014-07-09 21:18:28 PDT
Benjamin Poulain
Comment 3 2014-07-09 21:25:10 PDT
Comment on attachment 234687 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234687&action=review > Source/WebCore/platform/ios/PlatformPasteboardIOS.mm:160 > + static NSString* webIOSPastePboardType = @"iOS rich content paste pasteboard type"; No need for static here :-D > LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:8 > + var explanation = "The following test does a copy and a paste of contenteditable content. It then makes sure that the paste involved a two-step paste. The mechanism it uses to verify this is to determine if some styles change appropriately. If this test passes you should see the word Pass here ===>"; Let's use the test functions. Then the explanation can be added with description(explanation) > LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:35 > +<body id="b" onload="runTest()" dir="auto" contenteditable="true" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> > +<div id="e"> Let's use better id. > LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:48 > +<h2 class="story-heading" style="margin: 0px 0px 2px; font-style: italic; -webkit-text-size-adjust: 100%; word-spacing: -0.1em; line-height: 1.75rem; letter-spacing: 0.01em; font-size: 1.625rem; font-family: nyt-cheltenham, georgia, 'times new roman', times, serif; color: rgb(51, 51, 51);"> > +<a href="http://www.nytimes.com/2014/07/10/world/asia/chinese-hackers-pursue-key-data-on-us-workers.html" style="text-decoration: none; color: rgb(0, 0, 0);">Hackers in China Pursue Key Data on U.S. Workers > +</a> > +</h2> > +<p class="byline" style="margin: 4px 0px 1px; -webkit-text-size-adjust: 100%; line-height: 0.75rem; font-size: 0.625rem; font-family: georgia, 'times new roman', times, serif; color: rgb(153, 153, 153);">By MICHAEL S. SCHMIDT, DAVID E. SANGER and NICOLE PERLROTH&nbsp; > +<time id="t" class="timestamp" datetime="2014-07-09" data-eastern-timestamp="9:24 PM" data-utc-timestamp="1404955467" style="margin-left: 0.1em; white-space: nowrap; line-height: 0.6875rem; font-size: 0.625rem; font-family: nyt-franklin, arial, helvetica, sans-serif; color: rgb(168, 24, 23);">9:24 PM ET > +</time> > +</p> > +<p class="summary" style="margin: 0px; -webkit-text-size-adjust: 100%; line-height: 1.125rem; font-size: 0.8125rem; font-family: georgia, 'times new roman', times, serif; color: rgb(51, 51, 51);">The hackers penetrated the system that houses the personal information of all federal employees and appeared to be&nbsp; > +</p> > +<br>Sent from my iPad Let's nuke the original content and create some simpler content.
Myles C. Maxfield
Comment 4 2014-07-09 21:25:41 PDT
Comment on attachment 234687 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234687&action=review > LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:13 > + b.textContent = "OMFG"; WOAH WHOOPS this should not be here
Benjamin Poulain
Comment 5 2014-07-09 21:29:13 PDT
Comment on attachment 234687 [details] Patch Looks good, minor comments ->r+ cq-
Benjamin Poulain
Comment 6 2014-07-09 21:29:57 PDT
Comment on attachment 234687 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234687&action=review > LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:28 > + if (t.style.color == "rgb(168, 24, 23)") > + b.textContent = explanation + " Fail"; > + else > + b.textContent = explanation + " Pass"; This should be shouldBe()
Myles C. Maxfield
Comment 7 2014-07-10 15:09:40 PDT
Comment on attachment 234687 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234687&action=review >> Source/WebCore/platform/ios/PlatformPasteboardIOS.mm:160 >> + static NSString* webIOSPastePboardType = @"iOS rich content paste pasteboard type"; > > No need for static here :-D Done. >> LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:8 >> + var explanation = "The following test does a copy and a paste of contenteditable content. It then makes sure that the paste involved a two-step paste. The mechanism it uses to verify this is to determine if some styles change appropriately. If this test passes you should see the word Pass here ===>"; > > Let's use the test functions. Then the explanation can be added with description(explanation) Done. >> LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:13 >> + b.textContent = "OMFG"; > > WOAH WHOOPS this should not be here Done. >> LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:28 >> + b.textContent = explanation + " Pass"; > > This should be shouldBe() Done. >> LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:35 >> +<div id="e"> > > Let's use better id. Done. >> LayoutTests/platform/ios-sim/editing/pasteboard/two-step-paste.html:48 >> +<br>Sent from my iPad > > Let's nuke the original content and create some simpler content. Done.
Myles C. Maxfield
Comment 8 2014-07-10 17:12:48 PDT
Note You need to log in before you can comment on or make changes to this bug.