Changeset 215357 in webkit


Ignore:
Timestamp:
Apr 13, 2017 9:47:19 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

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> 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):

Location:
trunk/Source/WebInspectorUI
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r215333 r215357  
     12017-04-13  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Web Inspector: No context menu available via ENABLE_INSPECTOR_SERVER
     4        https://bugs.webkit.org/show_bug.cgi?id=170705
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        Reintroduce old SoftContextMenu class (removed in r157278) and apply various fixes:
     9        - Remove legacy globals and prototype extensions.
     10        - Align JS/CSS style with current front-end code.
     11        - Update UI and fix UX to replicate the macOS native context menu.
     12
     13        * Scripts/copy-user-interface-resources.pl:
     14        Add copyright line for Sony Interactive Entertainment.
     15       
     16        * UserInterface/Base/InspectorFrontendHostStub.js:
     17        (WebInspector.InspectorFrontendHostStub.prototype.showContextMenu):
     18        Use SoftContextMenu.
     19       
     20        * UserInterface/Main.html:
     21        Include SoftContextMenu.
     22
     23        * UserInterface/Views/SoftContextMenu.css: Added.
     24        (.soft-context-menu-glass-pane):
     25        (.soft-context-menu):
     26        (.soft-context-menu > .item):
     27        (.soft-context-menu > .item.disabled):
     28        (.soft-context-menu > .item.highlighted):
     29        (.soft-context-menu > .item > .checkmark):
     30        (.soft-context-menu > .item > .label):
     31        (.soft-context-menu > .item > .submenu-arrow):
     32        (.soft-context-menu > .separator):
     33        (.soft-context-menu > .separator > .line):
     34
     35        * UserInterface/Views/SoftContextMenu.js: Added.
     36        (WebInspector.SoftContextMenu):
     37        (WebInspector.SoftContextMenu.prototype.show):
     38        (WebInspector.SoftContextMenu.prototype._consumeEvent):
     39        (WebInspector.SoftContextMenu.prototype._parentGlassPaneElement):
     40        (WebInspector.SoftContextMenu.prototype._createMenuItem):
     41        (WebInspector.SoftContextMenu.prototype._createSeparator):
     42        (WebInspector.SoftContextMenu.prototype._repositionMenuOnScreen):
     43        (WebInspector.SoftContextMenu.prototype._showSubMenu):
     44        (WebInspector.SoftContextMenu.prototype._hideSubMenu):
     45        (WebInspector.SoftContextMenu.prototype._menuItemContextMenu):
     46        (WebInspector.SoftContextMenu.prototype._menuItemMouseDown):
     47        (WebInspector.SoftContextMenu.prototype._menuItemMouseUp):
     48        (WebInspector.SoftContextMenu.prototype._menuItemMouseOver):
     49        (WebInspector.SoftContextMenu.prototype._menuItemMouseOut):
     50        (WebInspector.SoftContextMenu.prototype._menuKeyDown):
     51        (WebInspector.SoftContextMenu.prototype._glassPaneMouseDown):
     52        (WebInspector.SoftContextMenu.prototype._focus):
     53        (WebInspector.SoftContextMenu.prototype._triggerAction):
     54        (WebInspector.SoftContextMenu.prototype._highlightMenuItem):
     55        (WebInspector.SoftContextMenu.prototype._highlightPrevious):
     56        (WebInspector.SoftContextMenu.prototype._highlightNext):
     57        (WebInspector.SoftContextMenu.prototype._discardMenu):
     58        (WebInspector.SoftContextMenu.prototype._discardSubMenus):
     59
    1602017-04-13  Brian Burg  <bburg@apple.com>
    261
  • trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl

    r205693 r215357  
    108108 * Copyright (C) 2015 Tobias Reiss <tobi+webkit@basecode.de>
    109109 * Copyright (C) 2015-2016 Devin Rousso <dcrousso+webkit@gmail.com>. All rights reserved.
     110 * Copyright (C) 2017 Sony Interactive Entertainment Inc.
    110111 *
    111112 * Redistribution and use in source and binary forms, with or without
  • trunk/Source/WebInspectorUI/UserInterface/Base/InspectorFrontendHostStub.js

    r212272 r215357  
    165165        showContextMenu: function(event, menuObject)
    166166        {
     167            new WebInspector.SoftContextMenu(menuObject).show(event);
    167168        },
    168169
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r215256 r215357  
    158158    <link rel="stylesheet" href="Views/SidebarPanel.css">
    159159    <link rel="stylesheet" href="Views/Slider.css">
     160    <link rel="stylesheet" href="Views/SoftContextMenu.css">
    160161    <link rel="stylesheet" href="Views/SourceCodeTextEditor.css">
    161162    <link rel="stylesheet" href="Views/SpringEditor.css">
     
    660661    <script src="Views/Sidebar.js"></script>
    661662    <script src="Views/Slider.js"></script>
     663    <script src="Views/SoftContextMenu.js"></script>
    662664    <script src="Views/SourceCodeTextEditor.js"></script>
    663665    <script src="Views/SourceCodeTimelineTimelineDataGridNode.js"></script>
Note: See TracChangeset for help on using the changeset viewer.