| 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.VBox} | 33 * @extends {WebInspector.VBox} |
| 34 */ | 34 */ |
| 35 WebInspector.RevisionHistoryView = function() | 35 WebInspector.RevisionHistoryView = function() |
| 36 { | 36 { |
| 37 WebInspector.VBox.call(this); | 37 WebInspector.VBox.call(this); |
| 38 this.registerRequiredCSS("sources/revisionHistory.css"); | |
| 39 this.element.classList.add("revision-history-drawer"); | |
| 40 this._uiSourceCodeItems = new Map(); | 38 this._uiSourceCodeItems = new Map(); |
| 41 | 39 |
| 42 this._treeOutline = new TreeOutline(); | 40 this._treeOutline = new TreeOutlineInShadow(); |
| 43 this._treeOutline.element.classList.add("outline-disclosure"); | 41 this._treeOutline.registerRequiredCSS("sources/revisionHistory.css"); |
| 42 this._treeOutline.makeDense(); |
| 44 this.element.appendChild(this._treeOutline.element); | 43 this.element.appendChild(this._treeOutline.element); |
| 45 | 44 |
| 46 /** | 45 /** |
| 47 * @param {!WebInspector.UISourceCode} uiSourceCode | 46 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 48 * @this {WebInspector.RevisionHistoryView} | 47 * @this {WebInspector.RevisionHistoryView} |
| 49 */ | 48 */ |
| 50 function populateRevisions(uiSourceCode) | 49 function populateRevisions(uiSourceCode) |
| 51 { | 50 { |
| 52 if (uiSourceCode.history.length) | 51 if (uiSourceCode.history.length) |
| 53 this._createUISourceCodeItem(uiSourceCode); | 52 this._createUISourceCodeItem(uiSourceCode); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 contentSpan.classList.add("revision-history-line-" + changeType); | 295 contentSpan.classList.add("revision-history-line-" + changeType); |
| 297 }, | 296 }, |
| 298 | 297 |
| 299 allowRevert: function() | 298 allowRevert: function() |
| 300 { | 299 { |
| 301 this._revertElement.classList.remove("hidden"); | 300 this._revertElement.classList.remove("hidden"); |
| 302 }, | 301 }, |
| 303 | 302 |
| 304 __proto__: TreeElement.prototype | 303 __proto__: TreeElement.prototype |
| 305 } | 304 } |
| OLD | NEW |