Bug 125367 - Add missing ENABLE(DRAG_SUPPORT) guards for DragClient and clients
Summary: Add missing ENABLE(DRAG_SUPPORT) guards for DragClient and clients
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 125248
  Show dependency treegraph
 
Reported: 2013-12-06 14:25 PST by Brian Burg
Modified: 2017-02-10 17:34 PST (History)
4 users (show)

See Also:


Attachments
patch (18.79 KB, patch)
2013-12-08 12:52 PST, Brian Burg
no flags Details | Formatted Diff | Diff
patch (18.79 KB, patch)
2013-12-08 13:40 PST, Brian Burg
no flags Details | Formatted Diff | Diff
patch (2.56 KB, patch)
2013-12-10 18:37 PST, Brian Burg
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2013-12-06 14:25:25 PST
Continuing on our theme... These guards are done differently in every port for no reason. They should be done the same way everywhere so it's blindingly obvious what drag support implies.
Comment 1 Brian Burg 2013-12-08 12:52:38 PST
Created attachment 218707 [details]
patch
Comment 2 EFL EWS Bot 2013-12-08 13:02:26 PST
Comment on attachment 218707 [details]
patch

Attachment 218707 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/46838079
Comment 3 Brian Burg 2013-12-08 13:40:43 PST
Created attachment 218712 [details]
patch
Comment 4 Darin Adler 2013-12-09 08:25:26 PST
Comment on attachment 218712 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218712&action=review

The cross-platform changes here are good; it’s a small refinement that costs very little to cut out even more of the drag code for platforms that have it turned off.

But the platform-specific part of this patch is overkill. It’s a mistake to add ENABLE(DRAG_SUPPORT) conditionals for every platform. Most platforms compile only with drag support enabled or only with drag support disabled. We don’t need each platform to support both conditions. Unfortunately I don’t know the status of the not-Apple-driven ports such as GTK, EFL, and WinCE.

> Source/WebCore/page/Page.cpp:1563
>      , dragClient(0)

Should be nullptr instead of 0.

> Source/WebKit/win/WebCoreSupport/WebDragClient.h:31
> +#if ENABLE(DRAG_SUPPORT)

No need to do this. Windows should always be compiled with DRAG_SUPPORT enabled.

> Source/WebKit/win/WebView.cpp:2770
> +#if ENABLE(DRAG_SUPPORT)

No need to do this. Windows should always be compiled with DRAG_SUPPORT enabled.

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:191
> +#if ENABLE(DRAG_SUPPORT)
> +#include "WebDragClient.h"
> +#include <WebCore/DragController.h>
> +#include <WebCore/DragData.h>
> +#include <WebCore/DragSession.h>
> +#endif

This change isn’t needed. These headers themselves are already properly conditionalized and there is no harm in including them unconditionally.
Comment 5 Brian Burg 2013-12-10 17:50:32 PST
(In reply to comment #4)
> (From update of attachment 218712 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=218712&action=review
> 
> The cross-platform changes here are good; it’s a small refinement that costs very little to cut out even more of the drag code for platforms that have it turned off.
> 
> But the platform-specific part of this patch is overkill.

OK, noted. I'll fix the other patches to heed this too.
Comment 6 Brian Burg 2013-12-10 18:37:15 PST
Created attachment 218931 [details]
patch
Comment 7 BJ Burg 2017-02-10 17:34:31 PST
Not needed.