 Chromium Code Reviews
 Chromium Code Reviews Issue 661103002:
  DevTools: make web component anchor handling go the generic route.  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk
    
  
    Issue 661103002:
  DevTools: make web component anchor handling go the generic route.  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk| Index: Source/devtools/front_end/ui/DOMExtension.js | 
| diff --git a/Source/devtools/front_end/ui/DOMExtension.js b/Source/devtools/front_end/ui/DOMExtension.js | 
| index d862f94212839c823b06dc74b64cd0f377d55f74..d05f132f402001c59d2f98a10845919c369177d5 100644 | 
| --- a/Source/devtools/front_end/ui/DOMExtension.js | 
| +++ b/Source/devtools/front_end/ui/DOMExtension.js | 
| @@ -791,12 +791,21 @@ Node.prototype.setTextContentTruncatedIfNeeded = function(text, placeholder) | 
| /** | 
| * @return {?Node} | 
| */ | 
| -Event.prototype.elementFromPoint = function() | 
| +Event.prototype.deepElementFromPoint = function() | 
| { | 
| + // 1. climb to the component root. | 
| 
apavlov
2014/10/17 15:40:59
climb -> Climb
 | 
| var node = this.target; | 
| while (node && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE && node.nodeType !== Node.DOCUMENT_NODE) | 
| node = node.parentNode; | 
| - return node ? node.elementFromPoint(this.pageX, this.pageY) : null; | 
| + | 
| + if (!node) | 
| + return null; | 
| + | 
| + // 2. Find deepest node by coordinates. | 
| + node = node.elementFromPoint(this.pageX, this.pageY); | 
| + while (node && node.shadowRoot) | 
| + node = node.shadowRoot.elementFromPoint(this.pageX, this.pageY); | 
| + return node; | 
| } | 
| /** |