[webkit-reviews] review granted: [Bug 120088] Define Clipboard::hasData() only when building with drag support : [Attachment 209229] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 20 14:41:41 PDT 2013
Darin Adler <darin at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 120088: Define Clipboard::hasData() only when building with drag support
https://bugs.webkit.org/show_bug.cgi?id=120088
Attachment 209229: Patch
https://bugs.webkit.org/attachment.cgi?id=209229&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=209229&action=review
> Source/WebCore/dom/Clipboard.cpp:116
> +#if ENABLE(DRAG_SUPPORT)
> bool Clipboard::hasData()
> {
> return m_pasteboard->hasData();
> }
> +#endif
I suggest moving it down to the DRAG_SUPPORT part of the file. I chose that
over littering the file with #if statements.
Note that this function does *not* belong in the same family as functions like
getData; if it was suitable for exposure to the web as getData is, it would
have to check canReadData and return false unconditionally in that case. It’s
really a function just for internal use.
> Source/WebCore/dom/Clipboard.h:85
> static PassRefPtr<Clipboard> createForDragAndDrop();
> static PassRefPtr<Clipboard>
createForDragAndDrop(ClipboardAccessPolicy, const DragData&);
> + bool hasData();
Should not be grouped with the create functions in a single paragraph. Just
include another blank line, please.
More information about the webkit-reviews
mailing list