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

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: 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..ada88814c1aee0930545278deb47ba7070e5a775 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -603,7 +603,7 @@ WebInspector.DOMNode.prototype = {
*/
frameId: function()
{
- var node = this;
+ var node = this.parentNode || this;
dgozman 2016/08/03 16:53:13 Does this work for immediate children of iframe no
lushnikov 2016/08/03 18:00:08 Yes; added test.
while (!node._frameId && node.parentNode)
node = node.parentNode;
return node._frameId;
dgozman 2016/08/03 16:53:13 Should we change _frameId instead?
lushnikov 2016/08/03 18:00:08 Renamed into frameOwnerFrameId to avoid confusion
« 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