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

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

Issue 148523012: DevTools: [CSS] remove getAllStylesheets method from protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/StyleSheetOutlineDialog.js
diff --git a/Source/devtools/front_end/StyleSheetOutlineDialog.js b/Source/devtools/front_end/StyleSheetOutlineDialog.js
index b7f21e5e0e88c42371e6821b8096d456f9d09fa9..e8334d27e0eb8805a3b5a3c1acae4185b251fdd8 100644
--- a/Source/devtools/front_end/StyleSheetOutlineDialog.js
+++ b/Source/devtools/front_end/StyleSheetOutlineDialog.js
@@ -102,27 +102,15 @@ WebInspector.StyleSheetOutlineDialog.prototype = {
_requestItems: function()
{
- /**
- * @param {?Protocol.Error} error
- * @param {!Array.<!CSSAgent.CSSStyleSheetHeader>} infos
- * @this {WebInspector.StyleSheetOutlineDialog}
- */
- function didGetAllStyleSheets(error, infos)
- {
- if (error)
+ var styleSheets = WebInspector.cssModel.allStyleSheets();
+ for (var i = 0; i < styleSheets.length; ++i) {
+ var styleSheet = styleSheets[i];
+ if (styleSheet.sourceURL === this._uiSourceCode.url) {
+ WebInspector.CSSStyleSheet.createForId(styleSheet.id, didGetStyleSheet.bind(this));
return;
-
- for (var i = 0; i < infos.length; ++i) {
- var info = infos[i];
- if (info.sourceURL === this._uiSourceCode.url) {
- WebInspector.CSSStyleSheet.createForId(info.styleSheetId, didGetStyleSheet.bind(this));
- return;
- }
}
}
- CSSAgent.getAllStyleSheets(didGetAllStyleSheets.bind(this));
-
/**
* @param {?WebInspector.CSSStyleSheet} styleSheet
* @this {WebInspector.StyleSheetOutlineDialog}

Powered by Google App Engine
This is Rietveld 408576698