RESOLVED FIXED Bug 46004
Change Clipboard to use an enum instead of isForDragging = true/false
https://bugs.webkit.org/show_bug.cgi?id=46004
Summary Change Clipboard to use an enum instead of isForDragging = true/false
Daniel Cheng
Reported 2010-09-17 15:26:35 PDT
The bool parameter can get hard to follow, and leads to mistakes--I fixed one probable error while updating the various platforms to use the enum instead of the bool.
Attachments
Patch (44.02 KB, patch)
2010-09-17 15:28 PDT, Daniel Cheng
no flags
Patch (49.02 KB, patch)
2010-09-20 11:32 PDT, Daniel Cheng
levin: commit-queue-
Patch (49.43 KB, patch)
2010-09-20 23:42 PDT, Daniel Cheng
no flags
Daniel Cheng
Comment 1 2010-09-17 15:28:58 PDT
Created attachment 67962 [details] Patch Flagging for R? so the EWS bots can try out the patch first.
Tony Chang
Comment 2 2010-09-17 15:35:54 PDT
This is great. I will r+ cq+ as soon as the ews bots go green (I think r+'ing cancels the ews run).
Daniel Bates
Comment 3 2010-09-17 15:43:24 PDT
I prefer enums over booleans. Is it proper to call these drag-drop and copy-paste instead of drag-and-drop and copy-and-paste? Hence, name the enum value DragAndDrop and CopyAndPaste.
Daniel Cheng
Comment 4 2010-09-17 16:47:57 PDT
(In reply to comment #3) > I prefer enums over booleans. Is it proper to call these drag-drop and copy-paste instead of drag-and-drop and copy-and-paste? Hence, name the enum value DragAndDrop and CopyAndPaste. I like this idea. I'll update the patch once I get back EWS results.
WebKit Review Bot
Comment 5 2010-09-17 16:50:14 PDT
Early Warning System Bot
Comment 6 2010-09-18 16:11:29 PDT
WebKit Review Bot
Comment 7 2010-09-18 21:46:47 PDT
Daniel Cheng
Comment 8 2010-09-20 11:32:19 PDT
Created attachment 68114 [details] Patch Fix the compile errors and rename CopyPaste/DragDrop to CopyAndPaste/DragAndDrop.
David Levin
Comment 9 2010-09-20 14:44:22 PDT
Comment on attachment 68114 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68114&action=review > WebCore/ChangeLog:8 > + No new tests. (OOPS!) This needs to be replaced with an explanation. Either: 1. Name the test(s), 2. Describe why a test isn't possible, or 3. Indicate that no new functionality is exposed so no new test is needed. > WebCore/dom/Clipboard.h:96 > + Clipboard(ClipboardAccessPolicy, ClipboardType clipboardType); Parameter name "clipboardType" shouldn't be here. > WebCore/platform/chromium/ClipboardChromium.cpp:207 > // If this isn't for a drag, it's for a cut/paste event handler. It looks like this comment isn't needed anymore (but if you remove it, you need to update the next comment line slightly). > WebCore/platform/chromium/ClipboardChromium.cpp:223 > // If this isn't for a drag, it's for a cut/paste event handler. Ditto. > WebCore/platform/mac/ClipboardMac.h:82 > + ClipboardMac(ClipboardType clipboardType, NSPasteboard *, ClipboardAccessPolicy, Frame*); Param name should go away. > WebCore/platform/win/ClipboardWin.h:81 > + ClipboardWin(ClipboardType clipboardType, IDataObject*, ClipboardAccessPolicy, Frame*); > + ClipboardWin(ClipboardType clipboardType, WCDataObject*, ClipboardAccessPolicy, Frame*); Param name should go away. > WebCore/platform/wx/ClipboardWx.h:68 > + ClipboardWx(ClipboardAccessPolicy, ClipboardType clipboardType); Param name should go away.
David Levin
Comment 10 2010-09-20 14:47:27 PDT
(In reply to comment #9) > (From update of attachment 68114 [details]) Basically consider this an r- (but I want to make sure the ews runs finish.)
Daniel Cheng
Comment 11 2010-09-20 23:42:02 PDT
Created attachment 68194 [details] Patch (In reply to comment #9) > (From update of attachment 68114 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68114&action=review > > > WebCore/ChangeLog:8 > > + No new tests. (OOPS!) > > This needs to be replaced with an explanation. Either: > 1. Name the test(s), > 2. Describe why a test isn't possible, or > 3. Indicate that no new functionality is exposed so no new test is needed. > Done. > > WebCore/dom/Clipboard.h:96 > > + Clipboard(ClipboardAccessPolicy, ClipboardType clipboardType); > > Parameter name "clipboardType" shouldn't be here. > Done. > > WebCore/platform/chromium/ClipboardChromium.cpp:207 > > // If this isn't for a drag, it's for a cut/paste event handler. > > It looks like this comment isn't needed anymore (but if you remove it, you need to update the next comment line slightly). > > > WebCore/platform/chromium/ClipboardChromium.cpp:223 > > // If this isn't for a drag, it's for a cut/paste event handler. > > Ditto. Done. > > > WebCore/platform/mac/ClipboardMac.h:82 > > + ClipboardMac(ClipboardType clipboardType, NSPasteboard *, ClipboardAccessPolicy, Frame*); > > Param name should go away. > Done. > > WebCore/platform/win/ClipboardWin.h:81 > > + ClipboardWin(ClipboardType clipboardType, IDataObject*, ClipboardAccessPolicy, Frame*); > > + ClipboardWin(ClipboardType clipboardType, WCDataObject*, ClipboardAccessPolicy, Frame*); > > Param name should go away. > Done. > > WebCore/platform/wx/ClipboardWx.h:68 > > + ClipboardWx(ClipboardAccessPolicy, ClipboardType clipboardType); > > Param name should go away. Done.
WebKit Commit Bot
Comment 12 2010-09-21 11:50:32 PDT
Comment on attachment 68194 [details] Patch Clearing flags on attachment: 68194 Committed r67973: <http://trac.webkit.org/changeset/67973>
WebKit Commit Bot
Comment 13 2010-09-21 11:50:38 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.