[webkit-reviews] review granted: [Bug 211723] [GTK] Rework drag and drop handling in preparation for GTK4 : [Attachment 399122] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 12 09:17:18 PDT 2020


Adrian Perez <aperez at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 211723: [GTK] Rework drag and drop handling in preparation for GTK4
https://bugs.webkit.org/show_bug.cgi?id=211723

Attachment 399122: Patch

https://bugs.webkit.org/attachment.cgi?id=399122&action=review




--- Comment #3 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 399122
  --> https://bugs.webkit.org/attachment.cgi?id=399122
Patch

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

> Source/WebCore/platform/gtk/GtkUtilities.cpp:111
> +	   && gdkAction & GDK_ACTION_LINK)

It took me a while to understand why this is done in this way. IMO it's more
idiomatic to use a bitmastk to checl all flags at once: 

  static constexpr auto gdkEveryMask = GDK_ACTION_COPY | GDK_ACTION_MOVE |
GDK_ACTION_LINK;
  if ((gdkAction & gdkEveryMask) == gdkEveryMask)
      return DragOperationEvery;

...but it was already written this way before, so feel free to leave it as-is.


More information about the webkit-reviews mailing list