[Webkit-unassigned] [Bug 181228] Web Inspector: [GTK] Copy copies to nowhere

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 3 01:19:49 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=181228

--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Devin Rousso from comment #6)
> Comment on attachment 366482 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=366482&action=review
> 
> > Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp:126
> > +            Vector<WebContextMenuItemGlib> subMenuItems;
> > +            populateSubMenu(itemData, subMenuItems);
> > +            items.append(WebContextMenuItemGlib(itemData, WTFMove(subMenuItems)));
> 
> Rather than pass `subMenuItems` in as a modifiable arguments, could you have
> `populateSubMenu` return the `Vector<WebContextMenuItemGlib>` instead?
> ```
>     Vector<WebContextMenuItemGlib>
> WebContextMenuProxyGtk::populateSubMenu(const WebContextMenuItemData&
> subMenuItemData)
>     {
>         Vector<WebContextMenuItemGlib> items;
>         for (const auto& itemData : subMenuItemData.submenu()) {
>             if (itemData.type() == SubmenuType)
>                 items.append(WebContextMenuItemGlib(itemData,
> populateSubMenu(itemData));
>             else
>                 items.append(itemData);
>         }
>         return items;
>     }
> ```

Yes, much better. Thanks!

> > Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp:153
> > +            Vector<WebContextMenuItemGlib> subMenuItems;
> > +            populateSubMenu(item->data(), subMenuItems);
> > +            WebContextMenuItemGlib menuitem(item->data(), WTFMove(subMenuItems));
> 
> Ditto (>124).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190403/3b0de674/attachment.html>


More information about the webkit-unassigned mailing list