RESOLVED FIXED Bug 119949
Factor Clipboard into drag and non-drag parts
https://bugs.webkit.org/show_bug.cgi?id=119949
Summary Factor Clipboard into drag and non-drag parts
Darin Adler
Reported 2013-08-17 08:38:02 PDT
Factor Clipboard into drag and non-drag parts
Attachments
Patch (27.08 KB, patch)
2013-08-17 08:50 PDT, Darin Adler
no flags
Patch (27.01 KB, patch)
2013-08-17 09:21 PDT, Darin Adler
sam: review+
Darin Adler
Comment 1 2013-08-17 08:50:57 PDT
Early Warning System Bot
Comment 2 2013-08-17 08:58:31 PDT
Early Warning System Bot
Comment 3 2013-08-17 08:59:29 PDT
EFL EWS Bot
Comment 4 2013-08-17 09:01:07 PDT
EFL EWS Bot
Comment 5 2013-08-17 09:09:13 PDT
Build Bot
Comment 6 2013-08-17 09:17:18 PDT
kov's GTK+ EWS bot
Comment 7 2013-08-17 09:19:44 PDT
Darin Adler
Comment 8 2013-08-17 09:21:09 PDT
Darin Adler
Comment 9 2013-08-18 21:17:22 PDT
Daniel Bates
Comment 10 2013-08-20 12:59:14 PDT
(In reply to comment #9) > Committed r154260: <http://trac.webkit.org/changeset/154260> This change breaks all builds that disable drag support, such as the iOS WebKit build (*), because we only declare Clipboard::hasData() when building with drag support enabled, but always define Clipboard::hasData() (since its implementation isn't surrounded by a "ENABLE(DRAG_SUPPORT)" guard). I landed a build fix that defines Clipboard::hasData() when building with and without drag support in <http://trac.webkit.org/changeset/154350>. Although Clipboard::hasData() is only used in DragController, I chose this approach as opposed to adding an ENABLE(DRAG_SUPPORT) guard around the implementation of Clipboard::hasData() (and the declaration and definition for the Pasteboard method of the same name) because Clipboard exposes other methods for interacting with the underlying pasteboard data when building without drag support, including Clipboard::{clear, get, set}Data() and it seemed strange to segregate hasData() from these other methods based on the availability of drag support. Let me know if we should segregate hasData() from the other Clipboard::*Data methods or if there is a better approach to fixing the build for ports that don't enable drag support. (*) For completeness, the following is the error we get when we build the iOS port with this change: Source/WebCore/dom/Clipboard.cpp:111:17: error: out-of-line definition of 'hasData' does not match any declaration in 'WebCore::Clipboard'
Darin Adler
Comment 11 2013-08-20 13:04:19 PDT
(In reply to comment #10) > Although Clipboard::hasData() is only used in DragController, I chose this approach as opposed to adding an ENABLE(DRAG_SUPPORT) guard around the implementation of Clipboard::hasData() (and the declaration and definition for the Pasteboard method of the same name) because Clipboard exposes other methods for interacting with the underlying pasteboard data when building without drag support I would have done it the other way, fixing the .cpp file and putting the hasData function in the section for drag support. I am trying to thin out this class. I don’t want it to have lots of functions for logical completeness; I want it to be as small as possible.
Daniel Bates
Comment 12 2013-08-20 14:23:00 PDT
(In reply to comment #11) > (In reply to comment #10) > > Although Clipboard::hasData() is only used in DragController, I chose this approach as opposed to adding an ENABLE(DRAG_SUPPORT) guard around the implementation of Clipboard::hasData() (and the declaration and definition for the Pasteboard method of the same name) because Clipboard exposes other methods for interacting with the underlying pasteboard data when building without drag support > > I would have done it the other way, fixing the .cpp file and putting the hasData function in the section for drag support. I am trying to thin out this class. I don’t want it to have lots of functions for logical completeness; I want it to be as small as possible. Filed bug #120088 to only declare and define Clipboard::hasData() when building with drag support.
Note You need to log in before you can comment on or make changes to this bug.