Changeset 274157 in webkit


Ignore:
Timestamp:
Mar 9, 2021 10:32:07 AM (17 months ago)
Author:
Razvan Caliman
Message:

Web Inspector: Jump from Layout panel to grid container element
https://bugs.webkit.org/show_bug.cgi?id=222429
<rdar://problem/74751801>

Reviewed by Devin Rousso.

Add a button to inspect a CSS grid overlay's corresponding element.
Remove the similar functionality from the overloaded label.

  • UserInterface/Views/CSSGridSection.css:

(.css-grid-section .node-display-name,):
(.css-grid-section .node-overlay-list-item-container :is(.go-to-arrow, .inline-swatch)):
(.css-grid-section .node-overlay-list-item-container:not(:hover) .go-to-arrow):

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.layout):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r274151 r274157  
     12021-03-09  Razvan Caliman  <rcaliman@apple.com>
     2
     3        Web Inspector: Jump from Layout panel to grid container element
     4        https://bugs.webkit.org/show_bug.cgi?id=222429
     5        <rdar://problem/74751801>
     6
     7        Reviewed by Devin Rousso.
     8
     9        Add a button to inspect a CSS grid overlay's corresponding element.
     10        Remove the similar functionality from the overloaded label.
     11
     12        * UserInterface/Views/CSSGridSection.css:
     13        (.css-grid-section .node-display-name,):
     14        (.css-grid-section .node-overlay-list-item-container :is(.go-to-arrow, .inline-swatch)):
     15        (.css-grid-section .node-overlay-list-item-container:not(:hover) .go-to-arrow):
     16        * UserInterface/Views/CSSGridSection.js:
     17        (WI.CSSGridSection.prototype.layout):
     18
    1192021-03-09  Razvan Caliman  <rcaliman@apple.com>
    220
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css

    r273148 r274157  
    2424 */
    2525
    26 .css-grid-section .node-link,
     26.css-grid-section .node-display-name,
    2727.css-grid-section .editor-group > .editor > label {
    2828    margin-inline: 5px;
    29     text-decoration: none;
    3029}
    3130
     
    4948}
    5049
    51 .css-grid-section .node-overlay-list-item-container .inline-swatch {
     50.css-grid-section .node-overlay-list-item-container :is(.go-to-arrow, .inline-swatch) {
    5251    flex-shrink: 0;
     52}
     53
     54.css-grid-section .node-overlay-list-item-container:not(:hover) .go-to-arrow {
     55    opacity: 0;
    5356}
    5457
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js

    r273912 r274157  
    102102            checkboxElement.type = "checkbox";
    103103            checkboxElement.checked = nodesWithGridOverlay.includes(domNode);
    104             labelElement.appendChild(WI.linkifyNodeReference(domNode));
     104
     105            const nodeDisplayName = labelElement.appendChild(document.createElement("span"));
     106            nodeDisplayName.classList.add("node-display-name");
     107            nodeDisplayName.textContent = domNode.displayName;
    105108
    106109            this._checkboxElementByNodeMap.set(domNode, checkboxElement);
     
    129132                WI.overlayManager.setGridColorForNode(domNode, gridColor);
    130133            }, swatch);
     134
     135            let buttonElement = itemContainerElement.appendChild(WI.createGoToArrowButton());
     136            buttonElement.title = WI.repeatedUIString.revealInDOMTree();
     137            WI.bindInteractionsForNodeToElement(domNode, buttonElement);
    131138        }
    132139    }
Note: See TracChangeset for help on using the changeset viewer.