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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js

Issue 2492343002: Devtools: Pretty print fix for CSS coverage decorations. (Closed)
Patch Set: Pretty print fix for CSS coverage decorations. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @typedef {!{range: !Protocol.CSS.SourceRange, styleSheetId: !Protocol.CSS.St yleSheetId, wasUsed: boolean}} */ 5 /** @typedef {!{range: !Protocol.CSS.SourceRange, styleSheetId: !Protocol.CSS.St yleSheetId, wasUsed: boolean}} */
6 SDK.CSSModel.RuleUsage; 6 SDK.CSSModel.RuleUsage;
7 7
8 /** 8 /**
9 * @implements {SDK.TargetManager.Observer} 9 * @implements {SDK.TargetManager.Observer}
10 * @implements {SDK.TracingManagerClient} 10 * @implements {SDK.TracingManagerClient}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 * @param {!Array<!SDK.CSSModel.RuleUsage>} ruleUsageList 125 * @param {!Array<!SDK.CSSModel.RuleUsage>} ruleUsageList
126 */ 126 */
127 function ruleListReceived(ruleUsageList) { 127 function ruleListReceived(ruleUsageList) {
128 for (var rule of ruleUsageList) { 128 for (var rule of ruleUsageList) {
129 if (rule.wasUsed) 129 if (rule.wasUsed)
130 continue; 130 continue;
131 131
132 var styleSheetHeader = cssModel.styleSheetHeaderForId(rule.styleSheetId) ; 132 var styleSheetHeader = cssModel.styleSheetHeaderForId(rule.styleSheetId) ;
133 var url = styleSheetHeader.sourceURL; 133 var url = styleSheetHeader.sourceURL;
134 134
135 Components.CoverageProfile.instance().appendUnusedRule(url, rule.range); 135 Components.CoverageProfile.instance().appendUnusedRule(url, Common.TextR ange.fromObject(rule.range));
136 } 136 }
137 } 137 }
138 138
139 cssModel.ruleListPromise().then(ruleListReceived); 139 cssModel.ruleListPromise().then(ruleListReceived);
140 } 140 }
141 141
142 /** 142 /**
143 * @param {!SDK.Target} target 143 * @param {!SDK.Target} target
144 * @return {!Promise} 144 * @return {!Promise}
145 */ 145 */
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 305
306 /** 306 /**
307 * @param {number} progress 307 * @param {number} progress
308 * @override 308 * @override
309 */ 309 */
310 eventsRetrievalProgress(progress) { 310 eventsRetrievalProgress(progress) {
311 this._delegate.loadingProgress(progress); 311 this._delegate.loadingProgress(progress);
312 } 312 }
313 }; 313 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698