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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2206153002: DevTools: make iframe nodes report correct frame they belong to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename + test Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index 198476998c399c142edeff8f16533aa4c2621dd9..49a316ec353d8e12a0ae04d3fcad47fc66168c14 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -53,7 +53,7 @@ WebInspector.DOMNode = function(domModel, doc, isInShadowTree, payload)
this._nodeValue = payload.nodeValue;
this._pseudoType = payload.pseudoType;
this._shadowRootType = payload.shadowRootType;
- this._frameId = payload.frameId || null;
+ this._frameOwnerFrameId = payload.frameId || null;
this._xmlVersion = payload.xmlVersion;
this._shadowRoots = [];
@@ -603,10 +603,10 @@ WebInspector.DOMNode.prototype = {
*/
frameId: function()
{
- var node = this;
- while (!node._frameId && node.parentNode)
+ var node = this.parentNode || this;
+ while (!node._frameOwnerFrameId && node.parentNode)
node = node.parentNode;
- return node._frameId;
+ return node._frameOwnerFrameId;
},
/**
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698