| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (!this._muteSourceCodeEvents) { | 150 if (!this._muteSourceCodeEvents) { |
| 151 this._innerSetContent(this._uiSourceCode.workingCopy()); | 151 this._innerSetContent(this._uiSourceCode.workingCopy()); |
| 152 this.onUISourceCodeContentChanged(); | 152 this.onUISourceCodeContentChanged(); |
| 153 } | 153 } |
| 154 this._textEditor.markClean(); | 154 this._textEditor.markClean(); |
| 155 this._updateStyle(); | 155 this._updateStyle(); |
| 156 }, | 156 }, |
| 157 | 157 |
| 158 _updateStyle: function() | 158 _updateStyle: function() |
| 159 { | 159 { |
| 160 this.element.enableStyleClass("source-frame-unsaved-committed-changes",
this._uiSourceCode.hasUnsavedCommittedChanges()); | 160 this.element.classList.toggle("source-frame-unsaved-committed-changes",
this._uiSourceCode.hasUnsavedCommittedChanges()); |
| 161 }, | 161 }, |
| 162 | 162 |
| 163 onUISourceCodeContentChanged: function() | 163 onUISourceCodeContentChanged: function() |
| 164 { | 164 { |
| 165 }, | 165 }, |
| 166 | 166 |
| 167 /** | 167 /** |
| 168 * @param {string} content | 168 * @param {string} content |
| 169 */ | 169 */ |
| 170 _innerSetContent: function(content) | 170 _innerSetContent: function(content) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 181 contextMenu.appendSeparator(); | 181 contextMenu.appendSeparator(); |
| 182 }, | 182 }, |
| 183 | 183 |
| 184 dispose: function() | 184 dispose: function() |
| 185 { | 185 { |
| 186 this.detach(); | 186 this.detach(); |
| 187 }, | 187 }, |
| 188 | 188 |
| 189 __proto__: WebInspector.SourceFrame.prototype | 189 __proto__: WebInspector.SourceFrame.prototype |
| 190 } | 190 } |
| OLD | NEW |