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

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

Issue 2144923002: DevTools: remove the ComputedStyles -> Styles pane dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 5 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: third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
index 5ee2239f9615700c2a1fb7b2677414223d86c118..f052a0ccafad53a55c2f7105e70ce1c9ffab0416 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
@@ -996,6 +996,26 @@ WebInspector.CSSModel.prototype = {
this._agent.setEffectivePropertyValueForNode(nodeId, name, value);
},
+ /**
+ * @param {!WebInspector.DOMNode} node
+ * @return {!Promise.<?WebInspector.CSSMatchedStyles>}
+ */
+ cachedMatchedCascadeForNode: function(node)
+ {
+ if (this._cachedMatchedCascadeNode !== node)
+ this.discardCachedMatchedCascade();
+ this._cachedMatchedCascadeNode = node;
+ if (!this._cachedMatchedCascadePromise)
+ this._cachedMatchedCascadePromise = this.matchedStylesPromise(node.id);
+ return this._cachedMatchedCascadePromise;
+ },
+
+ discardCachedMatchedCascade: function()
+ {
+ delete this._cachedMatchedCascadeNode;
+ delete this._cachedMatchedCascadePromise;
+ },
+
__proto__: WebInspector.SDKModel.prototype
}

Powered by Google App Engine
This is Rietveld 408576698