Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: Source/devtools/front_end/ui/treeoutline.js

Issue 602783002: Devtools: make DOM traversal utilities climb shadow tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/treeoutline.js
diff --git a/Source/devtools/front_end/ui/treeoutline.js b/Source/devtools/front_end/ui/treeoutline.js
index 92b4e610c062a68b10b65a7813562e2b122e01c0..f6ff33998b78f45a1b33c9fafae00402131ec561 100644
--- a/Source/devtools/front_end/ui/treeoutline.js
+++ b/Source/devtools/front_end/ui/treeoutline.js
@@ -323,7 +323,7 @@ TreeOutline.prototype.findTreeElement = function(representedObject, getParent)
*/
TreeOutline.prototype.treeElementFromPoint = function(x, y)
{
- var node = this._childrenListNode.ownerDocument.elementFromPoint(x, y);
+ var node = this._childrenListNode.ownerDocument.deepElementFromPoint(x, y);
if (!node)
return null;
@@ -333,6 +333,15 @@ TreeOutline.prototype.treeElementFromPoint = function(x, y)
return null;
}
+/**
+ * @param {?Event} event
aandrey 2014/09/25 05:47:21 either {!Event} or check for null before accessing
pfeldman 2014/10/13 13:33:11 Done.
+ * @return {?TreeElement}
+ */
+TreeOutline.prototype.treeElementFromEvent = function(event)
+{
+ return this.treeElementFromPoint(event.pageX, event.pageY);
+}
+
TreeOutline.prototype._treeKeyDown = function(event)
{
if (event.target !== this._childrenListNode)
« Source/devtools/front_end/ui/DOMExtension.js ('K') | « Source/devtools/front_end/ui/View.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698