Title: [219214] trunk/Source/WebInspectorUI
- Revision
- 219214
- Author
- drou...@apple.com
- Date
- 2017-07-06 13:51:20 -0700 (Thu, 06 Jul 2017)
Log Message
Web Inspector: Highlight matching canvas element when hovering contexts in the Resources tab
https://bugs.webkit.org/show_bug.cgi?id=174209
Reviewed by Joseph Pecoraro.
* UserInterface/Views/CanvasTreeElement.js:
(WebInspector.CanvasTreeElement.prototype.onattach):
(WebInspector.CanvasTreeElement.prototype._handleMouseOver):
(WebInspector.CanvasTreeElement.prototype._handleMouseOut):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (219213 => 219214)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-07-06 20:23:27 UTC (rev 219213)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-07-06 20:51:20 UTC (rev 219214)
@@ -1,3 +1,15 @@
+2017-07-06 Devin Rousso <drou...@apple.com>
+
+ Web Inspector: Highlight matching canvas element when hovering contexts in the Resources tab
+ https://bugs.webkit.org/show_bug.cgi?id=174209
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/CanvasTreeElement.js:
+ (WebInspector.CanvasTreeElement.prototype.onattach):
+ (WebInspector.CanvasTreeElement.prototype._handleMouseOver):
+ (WebInspector.CanvasTreeElement.prototype._handleMouseOut):
+
2017-07-06 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Add another Protocol Version
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js (219213 => 219214)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js 2017-07-06 20:23:27 UTC (rev 219213)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasTreeElement.js 2017-07-06 20:51:20 UTC (rev 219214)
@@ -35,6 +35,14 @@
// Protected
+ onattach()
+ {
+ super.onattach();
+
+ this.element.addEventListener("mouseover", this._handleMouseOver.bind(this));
+ this.element.addEventListener("mouseout", this._handleMouseOut.bind(this));
+ }
+
populateContextMenu(contextMenu, event)
{
super.populateContextMenu(contextMenu, event);
@@ -52,4 +60,21 @@
contextMenu.appendSeparator();
}
+
+ // Private
+
+ _handleMouseOver(event)
+ {
+ this.representedObject.requestNode((node) => {
+ if (!node || !node.ownerDocument)
+ return;
+
+ WebInspector.domTreeManager.highlightDOMNode(node.id, "all");
+ });
+ }
+
+ _handleMouseOut(event)
+ {
+ WebInspector.domTreeManager.hideDOMNodeHighlight();
+ }
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes