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

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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 */ 126 */
127 function ruleListReceived(ruleUsageList) { 127 function ruleListReceived(ruleUsageList) {
128 128
129 for (var rule of ruleUsageList) { 129 for (var rule of ruleUsageList) {
130 if (rule.wasUsed) 130 if (rule.wasUsed)
131 continue; 131 continue;
132 132
133 var styleSheetHeader = cssModel.styleSheetHeaderForId(rule.styleSheetId) ; 133 var styleSheetHeader = cssModel.styleSheetHeaderForId(rule.styleSheetId) ;
134 var url = styleSheetHeader.sourceURL; 134 var url = styleSheetHeader.sourceURL;
135 135
136 Components.CoverageProfile.instance().appendUnusedRule(url, rule.range); 136 Components.CoverageProfile.instance().appendUnusedRule(url, Common.TextR ange.fromObject(rule.range));
137 } 137 }
138 } 138 }
139 139
140 cssModel.ruleListPromise().then(ruleListReceived); 140 cssModel.ruleListPromise().then(ruleListReceived);
141 } 141 }
142 142
143 /** 143 /**
144 * @param {!SDK.Target} target 144 * @param {!SDK.Target} target
145 * @return {!Promise} 145 * @return {!Promise}
146 */ 146 */
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 306 }
307 307
308 /** 308 /**
309 * @param {number} progress 309 * @param {number} progress
310 * @override 310 * @override
311 */ 311 */
312 eventsRetrievalProgress(progress) { 312 eventsRetrievalProgress(progress) {
313 this._delegate.loadingProgress(progress); 313 this._delegate.loadingProgress(progress);
314 } 314 }
315 }; 315 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698