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

Unified Diff: Source/devtools/front_end/DOMAgent.js

Issue 177963004: DevTools: Split creating inspector stylesheet and adding a new rule into stylesheet in protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 10 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/DOMAgent.js
diff --git a/Source/devtools/front_end/DOMAgent.js b/Source/devtools/front_end/DOMAgent.js
index 9e4a4fbc0e798309a8597db0cd4333aad2acf490..45a624a87212fa88668abb6770deb0cf6e8c6eb5 100644
--- a/Source/devtools/front_end/DOMAgent.js
+++ b/Source/devtools/front_end/DOMAgent.js
@@ -49,6 +49,7 @@ WebInspector.DOMNode = function(domAgent, doc, isInShadowTree, payload) {
this._nodeValue = payload.nodeValue;
this._pseudoType = payload.pseudoType;
this._shadowRootType = payload.shadowRootType;
+ this._frameId = payload.frameId || null;
this._shadowRoots = [];
@@ -475,6 +476,17 @@ WebInspector.DOMNode.prototype = {
},
/**
+ * @return {?PageAgent.FrameId}
+ */
+ frameId: function()
+ {
+ var node = this;
+ while (!node._frameId && node.parentNode)
+ node = node.parentNode;
+ return node._frameId;
+ },
+
+ /**
* @param {!Array.<string>} attrs
* @return {boolean}
*/

Powered by Google App Engine
This is Rietveld 408576698