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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2568623002: DevTools: [Persistence] green checkmark icons should not be editable (Closed)
Patch Set: fix test Created 4 years 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 */ 1261 */
1262 updateTitle(ignoreIsDirty) { 1262 updateTitle(ignoreIsDirty) {
1263 if (!this._treeElement) 1263 if (!this._treeElement)
1264 return; 1264 return;
1265 1265
1266 var titleText = this._uiSourceCode.displayName(); 1266 var titleText = this._uiSourceCode.displayName();
1267 if (!ignoreIsDirty && 1267 if (!ignoreIsDirty &&
1268 (this._uiSourceCode.isDirty() || Persistence.persistence.hasUnsavedCommi ttedChanges(this._uiSourceCode))) 1268 (this._uiSourceCode.isDirty() || Persistence.persistence.hasUnsavedCommi ttedChanges(this._uiSourceCode)))
1269 titleText = '*' + titleText; 1269 titleText = '*' + titleText;
1270 1270
1271 this._treeElement.title = titleText;
1272
1271 var binding = Persistence.persistence.binding(this._uiSourceCode); 1273 var binding = Persistence.persistence.binding(this._uiSourceCode);
1272 if (binding && Runtime.experiments.isEnabled('persistence2')) { 1274 if (binding && Runtime.experiments.isEnabled('persistence2')) {
1273 var titleElement = createElement('span'); 1275 var icon = UI.Icon.create('smallicon-green-checkmark');
1274 titleElement.textContent = titleText;
1275 var icon = UI.Icon.create('smallicon-checkmark', 'mapped-file-checkmark');
1276 icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(this._uiS ourceCode); 1276 icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(this._uiS ourceCode);
1277 titleElement.appendChild(icon); 1277 this._treeElement.setTrailingIcons([icon]);
1278 this._treeElement.title = titleElement;
1279 } else { 1278 } else {
1280 this._treeElement.title = titleText; 1279 this._treeElement.setTrailingIcons([]);
1281 } 1280 }
1282 1281
1283 var tooltip = this._uiSourceCode.url(); 1282 var tooltip = this._uiSourceCode.url();
1284 if (this._uiSourceCode.contentType().isFromSourceMap()) 1283 if (this._uiSourceCode.contentType().isFromSourceMap())
1285 tooltip = Common.UIString('%s (from source map)', this._uiSourceCode.displ ayName()); 1284 tooltip = Common.UIString('%s (from source map)', this._uiSourceCode.displ ayName());
1286 this._treeElement.tooltip = tooltip; 1285 this._treeElement.tooltip = tooltip;
1287 } 1286 }
1288 1287
1289 /** 1288 /**
1290 * @override 1289 * @override
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 /** 1600 /**
1602 * @param {string} title 1601 * @param {string} title
1603 * @override 1602 * @override
1604 */ 1603 */
1605 setTitle(title) { 1604 setTitle(title) {
1606 this._title = title; 1605 this._title = title;
1607 if (this._treeElement) 1606 if (this._treeElement)
1608 this._treeElement.title = this._title; 1607 this._treeElement.title = this._title;
1609 } 1608 }
1610 }; 1609 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698