| OLD | NEW |
| 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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1266 | 1266 |
| 1267 var titleText = this._uiSourceCode.displayName(); | 1267 var titleText = this._uiSourceCode.displayName(); |
| 1268 if (!ignoreIsDirty && | 1268 if (!ignoreIsDirty && |
| 1269 (this._uiSourceCode.isDirty() || WebInspector.persistence.hasUnsavedComm
ittedChanges(this._uiSourceCode))) | 1269 (this._uiSourceCode.isDirty() || WebInspector.persistence.hasUnsavedComm
ittedChanges(this._uiSourceCode))) |
| 1270 titleText = '*' + titleText; | 1270 titleText = '*' + titleText; |
| 1271 | 1271 |
| 1272 var binding = WebInspector.persistence.binding(this._uiSourceCode); | 1272 var binding = WebInspector.persistence.binding(this._uiSourceCode); |
| 1273 if (binding && Runtime.experiments.isEnabled('persistence2')) { | 1273 if (binding && Runtime.experiments.isEnabled('persistence2')) { |
| 1274 var titleElement = createElement('span'); | 1274 var titleElement = createElement('span'); |
| 1275 titleElement.textContent = titleText; | 1275 titleElement.textContent = titleText; |
| 1276 var status = titleElement.createChild('span'); | 1276 var icon = WebInspector.Icon.create('smallicon-checkmark', 'mapped-file-ch
eckmark'); |
| 1277 status.classList.add('mapped-file-bubble'); | 1277 icon.title = WebInspector.PersistenceUtils.tooltipForUISourceCode(this._ui
SourceCode); |
| 1278 status.textContent = '\u25C9'; | 1278 titleElement.appendChild(icon); |
| 1279 if (this._uiSourceCode === binding.network) | |
| 1280 status.title = WebInspector.UIString('Persisted to file system: %s', bin
ding.fileSystem.url().trimMiddle(150)); | |
| 1281 else if (binding.network.contentType().isFromSourceMap()) | |
| 1282 status.title = WebInspector.UIString('Linked to source map: %s', binding
.network.url().trimMiddle(150)); | |
| 1283 else | |
| 1284 status.title = WebInspector.UIString('Linked to %s', binding.network.url
().trimMiddle(150)); | |
| 1285 this._treeElement.title = titleElement; | 1279 this._treeElement.title = titleElement; |
| 1286 } else { | 1280 } else { |
| 1287 this._treeElement.title = titleText; | 1281 this._treeElement.title = titleText; |
| 1288 } | 1282 } |
| 1289 | 1283 |
| 1290 var tooltip = this._uiSourceCode.url(); | 1284 var tooltip = this._uiSourceCode.url(); |
| 1291 if (this._uiSourceCode.contentType().isFromSourceMap()) | 1285 if (this._uiSourceCode.contentType().isFromSourceMap()) |
| 1292 tooltip = WebInspector.UIString('%s (from source map)', this._uiSourceCode
.displayName()); | 1286 tooltip = WebInspector.UIString('%s (from source map)', this._uiSourceCode
.displayName()); |
| 1293 this._treeElement.tooltip = tooltip; | 1287 this._treeElement.tooltip = tooltip; |
| 1294 } | 1288 } |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 /** | 1603 /** |
| 1610 * @param {string} title | 1604 * @param {string} title |
| 1611 * @override | 1605 * @override |
| 1612 */ | 1606 */ |
| 1613 setTitle(title) { | 1607 setTitle(title) { |
| 1614 this._title = title; | 1608 this._title = title; |
| 1615 if (this._treeElement) | 1609 if (this._treeElement) |
| 1616 this._treeElement.title = this._title; | 1610 this._treeElement.title = this._title; |
| 1617 } | 1611 } |
| 1618 }; | 1612 }; |
| OLD | NEW |