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

Unified Diff: Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js

Issue 661103002: DevTools: make web component anchor handling go the generic route. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/source_frame/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
index 5302726461ed33fe8026840316bba3f2d22b56c3..c5a4774f0b03e31eebd03931e6f23eda51d2be4f 100644
--- a/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js
@@ -750,7 +750,7 @@ WebInspector.CodeMirrorTextEditor.prototype = {
*/
coordinatesToCursorPosition: function(x, y)
{
- var element = document.deepElementFromPoint(x, y);
+ var element = this.element.ownerDocument.deepElementFromPoint(x, y);
if (!element || !element.isSelfOrDescendant(this._codeMirror.getWrapperElement()))
return null;
var gutterBox = this._codeMirror.getGutterElement().boxInWindow();

Powered by Google App Engine
This is Rietveld 408576698