Changeset 252201 in webkit


Ignore:
Timestamp:
Nov 7, 2019 12:31:44 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION(r249451): missing "Reveal in DOM Tree" on nodes logged to the console
https://bugs.webkit.org/show_bug.cgi?id=203836

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForDOMNode):

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.populateContextMenu):
DOM trees in the console are marked as being non-editable, which is intended to prevent
modifications (e.g. changing an attribute) from being made in the console as the DOM tree
there is not hooked up to the associated DOM agent. In r249451 however, this guard was over
expanded to include non-editing actions, like "Reveal in DOM Tree" and DOM breakpoints.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype._handleContextMenuEvent):
Drive-by: add a separator before "Copy Selected" so it doesn't end up in the same group as

any "Collapse All" from a WI.TreeOutline.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r252200 r252201  
     12019-11-07  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION(r249451): missing "Reveal in DOM Tree" on nodes logged to the console
     4        https://bugs.webkit.org/show_bug.cgi?id=203836
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/ContextMenuUtilities.js:
     9        (WI.appendContextMenuItemsForDOMNode):
     10        * UserInterface/Views/DOMTreeOutline.js:
     11        (WI.DOMTreeOutline.prototype.populateContextMenu):
     12        DOM trees in the console are marked as being non-editable, which is intended to prevent
     13        modifications (e.g. changing an attribute) from being made in the console as the DOM tree
     14        there is not hooked up to the associated DOM agent. In r249451 however, this guard was over
     15        expanded to include non-editing actions, like "Reveal in DOM Tree" and DOM breakpoints.
     16
     17        * UserInterface/Views/LogContentView.js:
     18        (WI.LogContentView.prototype._handleContextMenuEvent):
     19        Drive-by: add a separator before "Copy Selected" so it doesn't end up in the same group as
     20                  any "Collapse All" from a `WI.TreeOutline`.
     21
    1222019-11-07  Devin Rousso  <drousso@apple.com>
    223
  • trunk/Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js

    r252063 r252201  
    227227    contextMenu.appendSeparator();
    228228
    229     if (!options.disallowEditing) {
     229    if (!options.usingLocalDOMNode) {
    230230        if (domNode.isCustomElement()) {
    231231            contextMenu.appendItem(WI.UIString("Jump to Definition"), () => {
     
    261261        }
    262262
    263         if (WI.cssManager.canForcePseudoClasses() && domNode.attached) {
     263        if (!options.disallowEditing && WI.cssManager.canForcePseudoClasses() && domNode.attached) {
    264264            contextMenu.appendSeparator();
    265265
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js

    r251302 r252201  
    296296        let options = {
    297297            disallowEditing: !this._editable,
     298            usingLocalDOMNode: this._usingLocalDOMNode,
    298299            excludeRevealElement: this._excludeRevealElementContextMenu,
    299300            copySubMenu: subMenus.copy,
  • trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js

    r251227 r252201  
    507507        let contextMenu = WI.ContextMenu.createFromEvent(event);
    508508
     509        contextMenu.appendSeparator();
     510
    509511        if (this._selectedMessages.length) {
    510512            contextMenu.appendItem(WI.UIString("Copy Selected"), () => {
Note: See TracChangeset for help on using the changeset viewer.