RESOLVED FIXED 72056
[chromium] Fix plumbing for differentiating between clipboard/selection pastes.
https://bugs.webkit.org/show_bug.cgi?id=72056
Summary [chromium] Fix plumbing for differentiating between clipboard/selection pastes.
Daniel Cheng
Reported 2011-11-10 13:59:32 PST
[chromium] Fix plumbing for differentiating between clipboard/selection pastes.
Attachments
Patch (13.40 KB, patch)
2011-11-10 14:15 PST, Daniel Cheng
no flags
Patch (13.74 KB, patch)
2011-11-21 16:11 PST, Daniel Cheng
no flags
Daniel Cheng
Comment 1 2011-11-10 14:15:18 PST
WebKit Review Bot
Comment 2 2011-11-10 14:17:08 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Darin Fisher (:fishd, Google)
Comment 3 2011-11-14 14:44:01 PST
Comment on attachment 114570 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114570&action=review > Source/WebKit/chromium/src/PlatformSupport.cpp:153 > +uint64_t PlatformSupport::clipboardGetSequenceNumber(PasteboardPrivate::ClipboardBuffer buffer) if you are going to rename WebClipboard::getSequenceNumber to WebClipboard::sequenceNumber, then it follows that you should also rename clipboardGetSequenceNumber to clipboardSequenceNumber, right?
Daniel Cheng
Comment 4 2011-11-14 14:48:43 PST
Comment on attachment 114570 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114570&action=review >> Source/WebKit/chromium/src/PlatformSupport.cpp:153 >> +uint64_t PlatformSupport::clipboardGetSequenceNumber(PasteboardPrivate::ClipboardBuffer buffer) > > if you are going to rename WebClipboard::getSequenceNumber to WebClipboard::sequenceNumber, then > it follows that you should also rename clipboardGetSequenceNumber to clipboardSequenceNumber, right? Hm. I wasn't sure. I remember hearing somewhere that in WebKit, Class::getX() is usually something that returns a mutable X, so I thought WebClipboard::sequenceNumber would be more appropriate. But it seems like renaming the general convention in PlatformSupport is prefixVerbObject, which clipboardSequenceNumber wouldn't follow. Do you have a preference here?
Daniel Cheng
Comment 5 2011-11-21 16:11:29 PST
Daniel Cheng
Comment 6 2011-11-21 16:11:50 PST
(In reply to comment #3) > (From update of attachment 114570 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=114570&action=review > > > Source/WebKit/chromium/src/PlatformSupport.cpp:153 > > +uint64_t PlatformSupport::clipboardGetSequenceNumber(PasteboardPrivate::ClipboardBuffer buffer) > > if you are going to rename WebClipboard::getSequenceNumber to WebClipboard::sequenceNumber, then > it follows that you should also rename clipboardGetSequenceNumber to clipboardSequenceNumber, right? I've updated the patch to make the naming consistent in WebKit.
Tony Chang
Comment 7 2011-11-21 16:16:04 PST
Comment on attachment 116154 [details] Patch LGTM, I defer to fishd due to the API change.
Tony Chang
Comment 8 2011-11-21 16:16:53 PST
Comment on attachment 116154 [details] Patch Oh, is it possible to write a test for this?
Daniel Cheng
Comment 9 2011-11-21 16:19:35 PST
(In reply to comment #8) > (From update of attachment 116154 [details]) > Oh, is it possible to write a test for this? It might be possible, by calling execCommand("copy"), then calling execCommand("paste") in the copy handler, then verifying that reads fail as expected. But the logic for exposing a clipboard sequence number is currently not implemented in the mock clipboard used by DRT, so it would require another 2-sided patch.
Darin Fisher (:fishd, Google)
Comment 10 2011-11-21 17:18:41 PST
Comment on attachment 116154 [details] Patch WebKit API change LGTM
Daniel Cheng
Comment 11 2011-11-22 16:39:38 PST
Note You need to log in before you can comment on or make changes to this bug.