Add edit commands to plugin context menu

Desktop / Chromium - Diana Gage [google.com] - 10 August 2017 16:27 EDT

This CL adds support for executing "Cut", "Paste", and "PasteAndMatchStyle" commands via the mouse and context menu in pepper plugins. The plugin's context menu is built differently when focus is within an editable text area: editable items are added as options and regular page items are not shown.

Currently, the "SelectAll" command is disabled because it has not yet been implemented, and spell check and writing direction sub menus are not shown because support has not been added for them for plugins.

BUG=59266

Change-Id: Ib181f6dea29be3f524e5e19252ff12e34488ee16 Reviewed-on: https://chromium-review.googlesource.com/604827

4eb98ee Add edit commands to plugin context menu.
.../render_view_context_menu.cc | 13 +++-
.../core/exported/WebPluginContainerImpl.cpp | 5 ++
.../Source/core/exported/WebPluginContainerImpl.h | 3 +
.../core/exported/WebPluginContainerTest.cpp | 84 ++++++++++++++++++++++
.../WebKit/Source/core/frame/WebLocalFrameImpl.cpp | 5 +-
.../WebKit/Source/core/page/ContextMenuClient.cpp | 14 +++-
6 files changed, 119 insertions(+), 5 deletions(-)

Upstream: git.chromium.org


  • Share