Title: [293189] trunk/Source/WebInspectorUI
- Revision
- 293189
- Author
- drou...@apple.com
- Date
- 2022-04-21 14:46:57 -0700 (Thu, 21 Apr 2022)
Log Message
Web Inspector: Elements: Layout: hovering over a node should highlight it in the page
https://bugs.webkit.org/show_bug.cgi?id=239621
Reviewed by Patrick Angle.
* UserInterface/Views/NodeOverlayListSection.js:
(WI.NodeOverlayListSection.prototype.layout):
Use the existing `WI.linkifyNodeReference` to create the UI for the `WI.DOMNode`.
* UserInterface/Base/DOMUtilities.js:
(WI.linkifyNodeReferenceElement):
Don't style the UI as a link if clicking it doesn't do anything.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (293188 => 293189)
--- trunk/Source/WebInspectorUI/ChangeLog 2022-04-21 21:03:05 UTC (rev 293188)
+++ trunk/Source/WebInspectorUI/ChangeLog 2022-04-21 21:46:57 UTC (rev 293189)
@@ -1,5 +1,20 @@
2022-04-21 Devin Rousso <drou...@apple.com>
+ Web Inspector: Elements: Layout: hovering over a node should highlight it in the page
+ https://bugs.webkit.org/show_bug.cgi?id=239621
+
+ Reviewed by Patrick Angle.
+
+ * UserInterface/Views/NodeOverlayListSection.js:
+ (WI.NodeOverlayListSection.prototype.layout):
+ Use the existing `WI.linkifyNodeReference` to create the UI for the `WI.DOMNode`.
+
+ * UserInterface/Base/DOMUtilities.js:
+ (WI.linkifyNodeReferenceElement):
+ Don't style the UI as a link if clicking it doesn't do anything.
+
+2022-04-21 Devin Rousso <drou...@apple.com>
+
Web Inspector: add reference page links for the Timelines Tab
https://bugs.webkit.org/show_bug.cgi?id=239580
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/DOMUtilities.js (293188 => 293189)
--- trunk/Source/WebInspectorUI/UserInterface/Base/DOMUtilities.js 2022-04-21 21:03:05 UTC (rev 293188)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/DOMUtilities.js 2022-04-21 21:46:57 UTC (rev 293189)
@@ -83,7 +83,7 @@
element.title = options.displayName || node.displayName;
let nodeType = node.nodeType();
- if ((nodeType !== Node.DOCUMENT_NODE || node.parentNode) && nodeType !== Node.TEXT_NODE)
+ if (!options.ignoreClick && (nodeType !== Node.DOCUMENT_NODE || node.parentNode) && nodeType !== Node.TEXT_NODE)
element.classList.add("node-link");
WI.bindInteractionsForNodeToElement(node, element, options);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NodeOverlayListSection.js (293188 => 293189)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NodeOverlayListSection.js 2022-04-21 21:03:05 UTC (rev 293188)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NodeOverlayListSection.js 2022-04-21 21:46:57 UTC (rev 293189)
@@ -100,9 +100,8 @@
itemContainerElement.classList.add("node-overlay-list-item-container");
let labelElement = itemContainerElement.appendChild(document.createElement("label"));
- let nodeDisplayName = labelElement.appendChild(document.createElement("span"));
+ let nodeDisplayName = labelElement.appendChild(WI.linkifyNodeReference(domNode, {ignoreClick: true}));
nodeDisplayName.classList.add("node-display-name");
- nodeDisplayName.textContent = domNode.displayName;
let checkboxElement = labelElement.appendChild(document.createElement("input"));
labelElement.insertBefore(checkboxElement, nodeDisplayName);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes