Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 */ | 178 */ |
| 179 willHide() { | 179 willHide() { |
| 180 super.willHide(); | 180 super.willHide(); |
| 181 this._popoverHelper.hidePopover(); | 181 this._popoverHelper.hidePopover(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 /** | 184 /** |
| 185 * @override | 185 * @override |
| 186 */ | 186 */ |
| 187 onUISourceCodeContentChanged() { | 187 onUISourceCodeContentChanged() { |
| 188 for (var decoration of this._breakpointDecorations) | 188 var decorations = Array.from(this._breakpointDecorations); |
| 189 decoration.breakpoint.remove(); | 189 this._textEditor.operation(() => decorations.map(decoration => decoration.hi de())); |
|
lushnikov
2016/12/07 05:08:40
Why do we need "hide"? Can't we have just this:
f
kozy
2016/12/07 05:13:15
You're right. breakpoint.remove will synchronously
| |
| 190 for (var decoration of decorations) { | |
| 191 if (decoration.breakpoint) | |
| 192 decoration.breakpoint.remove(); | |
| 193 } | |
| 194 this._breakpointDecorations.clear(); | |
| 190 super.onUISourceCodeContentChanged(); | 195 super.onUISourceCodeContentChanged(); |
| 191 } | 196 } |
| 192 | 197 |
| 193 /** | 198 /** |
| 194 * @override | 199 * @override |
| 195 */ | 200 */ |
| 196 onTextChanged(oldRange, newRange) { | 201 onTextChanged(oldRange, newRange) { |
| 197 this._scriptsPanel.updateLastModificationTime(); | 202 this._scriptsPanel.updateLastModificationTime(); |
| 198 super.onTextChanged(oldRange, newRange); | 203 super.onTextChanged(oldRange, newRange); |
| 199 if (this._compiler) | 204 if (this._compiler) |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1321 hide() { | 1326 hide() { |
| 1322 if (!this.bookmark) | 1327 if (!this.bookmark) |
| 1323 return; | 1328 return; |
| 1324 this.bookmark.clear(); | 1329 this.bookmark.clear(); |
| 1325 this.bookmark = null; | 1330 this.bookmark = null; |
| 1326 } | 1331 } |
| 1327 }; | 1332 }; |
| 1328 | 1333 |
| 1329 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark'); | 1334 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark'); |
| 1330 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element'); | 1335 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element'); |
| OLD | NEW |