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

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

Issue 1974543002: DevTools: do not pro-actively query all StyleSheets for their content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/CSSStyleSheetHeader.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleSheetHeader.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleSheetHeader.js
index 3ca043e94455d814e7afeccb06c0a6791b773aaf..f1856ddc0e6a2632122723520c095673978dc496 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleSheetHeader.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSStyleSheetHeader.js
@@ -33,8 +33,8 @@ WebInspector.CSSStyleSheetHeader.prototype = {
originalContentProvider: function()
{
if (!this._originalContentProvider) {
- var originalContentPromise = this._cssModel.originalStyleSheetText(this);
- this._originalContentProvider = new WebInspector.StaticContentProvider(this.contentURL(), this.contentType(), originalContentPromise);
+ var lazyContent = this._cssModel.originalStyleSheetText.bind(this._cssModel, this);
+ this._originalContentProvider = new WebInspector.StaticContentProvider(this.contentURL(), this.contentType(), lazyContent);
}
return this._originalContentProvider;
},
@@ -218,4 +218,4 @@ WebInspector.CSSStyleSheetHeader.OriginalContentProvider.prototype = {
this.requestContent().then(performSearch);
}
-}
+}

Powered by Google App Engine
This is Rietveld 408576698