[Webkit-unassigned] [Bug 181228] Web Inspector: [GTK] Copy copies to nowhere
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 2 14:05:51 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=181228
Devin Rousso <drousso at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |drousso at apple.com
--- Comment #6 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 366482
--> https://bugs.webkit.org/attachment.cgi?id=366482
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;
}
```
> 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/20190402/7a63169d/attachment.html>
More information about the webkit-unassigned
mailing list