Web Inspector: No context menu available via ENABLE_INSPECTOR_SERVER
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Apr 2017 04:47:19 +0000 (04:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Apr 2017 04:47:19 +0000 (04:47 +0000)
commitc0dcffe89c59d9db88f88bd678592df3b58128a4
treefbfcf61ce21f286f7d6b0f3dbee18c7ff9fd9dff
parent60922cb30ab78fcf5075f64c79b4ce2a9aa72ac5
Web Inspector: No context menu available via ENABLE_INSPECTOR_SERVER
https://bugs.webkit.org/show_bug.cgi?id=170705

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-04-13
Reviewed by Joseph Pecoraro.

Reintroduce old SoftContextMenu class (removed in r157278) and apply various fixes:
- Remove legacy globals and prototype extensions.
- Align JS/CSS style with current front-end code.
- Update UI and fix UX to replicate the macOS native context menu.

* Scripts/copy-user-interface-resources.pl:
Add copyright line for Sony Interactive Entertainment.

* UserInterface/Base/InspectorFrontendHostStub.js:
(WebInspector.InspectorFrontendHostStub.prototype.showContextMenu):
Use SoftContextMenu.

* UserInterface/Main.html:
Include SoftContextMenu.

* UserInterface/Views/SoftContextMenu.css: Added.
(.soft-context-menu-glass-pane):
(.soft-context-menu):
(.soft-context-menu > .item):
(.soft-context-menu > .item.disabled):
(.soft-context-menu > .item.highlighted):
(.soft-context-menu > .item > .checkmark):
(.soft-context-menu > .item > .label):
(.soft-context-menu > .item > .submenu-arrow):
(.soft-context-menu > .separator):
(.soft-context-menu > .separator > .line):

* UserInterface/Views/SoftContextMenu.js: Added.
(WebInspector.SoftContextMenu):
(WebInspector.SoftContextMenu.prototype.show):
(WebInspector.SoftContextMenu.prototype._consumeEvent):
(WebInspector.SoftContextMenu.prototype._parentGlassPaneElement):
(WebInspector.SoftContextMenu.prototype._createMenuItem):
(WebInspector.SoftContextMenu.prototype._createSeparator):
(WebInspector.SoftContextMenu.prototype._repositionMenuOnScreen):
(WebInspector.SoftContextMenu.prototype._showSubMenu):
(WebInspector.SoftContextMenu.prototype._hideSubMenu):
(WebInspector.SoftContextMenu.prototype._menuItemContextMenu):
(WebInspector.SoftContextMenu.prototype._menuItemMouseDown):
(WebInspector.SoftContextMenu.prototype._menuItemMouseUp):
(WebInspector.SoftContextMenu.prototype._menuItemMouseOver):
(WebInspector.SoftContextMenu.prototype._menuItemMouseOut):
(WebInspector.SoftContextMenu.prototype._menuKeyDown):
(WebInspector.SoftContextMenu.prototype._glassPaneMouseDown):
(WebInspector.SoftContextMenu.prototype._focus):
(WebInspector.SoftContextMenu.prototype._triggerAction):
(WebInspector.SoftContextMenu.prototype._highlightMenuItem):
(WebInspector.SoftContextMenu.prototype._highlightPrevious):
(WebInspector.SoftContextMenu.prototype._highlightNext):
(WebInspector.SoftContextMenu.prototype._discardMenu):
(WebInspector.SoftContextMenu.prototype._discardSubMenus):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
Source/WebInspectorUI/UserInterface/Base/InspectorFrontendHostStub.js
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Views/SoftContextMenu.css [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Views/SoftContextMenu.js [new file with mode: 0644]