Web Inspector: [GTK] Copy copies to nowhere
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 08:25:26 +0000 (08:25 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 08:25:26 +0000 (08:25 +0000)
commit1d10bb648551bd8f9327d2e37594c7a6dd4e9845
treeac454dde7be849da3f2e9f2cd98e4174ef1d5ea4
parentb83c94e98b11f5dd0739bc4bd74395b1111405a6
Web Inspector: [GTK] Copy copies to nowhere
https://bugs.webkit.org/show_bug.cgi?id=181228

Reviewed by Michael Catanzaro.

The thing is that those items are actually submenu items, with options, for example in the case of Copy to copy
HTML, Text, XPath, etc. We are not correctly handling submenus when populating the context menu received from
the web process.

* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::populateSubMenu): Helper to populate submenu items recursively.
(WebKit::WebContextMenuProxyGtk::populate): Handle submenu items.
* UIProcess/gtk/WebContextMenuProxyGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp
Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.h