Changeset 158404 in webkit
- Timestamp:
- Oct 31, 2013 4:12:10 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r158356 r158404 1 2013-10-31 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Breakpoints in auto-formatted JavaScript editors are not working 4 https://bugs.webkit.org/show_bug.cgi?id=123589 5 6 Reviewed by Timothy Hatcher. 7 8 The internal this._ignoreCodeMirrorContentDidChangeEvent flag was being used 9 in two places that could be nested, meaning the flag was deleted while it 10 was still expected to be set. Change it instead to a counter, to handle nesting. 11 12 * UserInterface/TextEditor.js: 13 (WebInspector.TextEditor): 14 (WebInspector.TextEditor.prototype.set string): 15 (WebInspector.TextEditor.prototype.set formatted): 16 (WebInspector.TextEditor.prototype._contentChanged): 17 1 18 2013-10-31 Joseph Pecoraro <pecoraro@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/TextEditor.js
r157966 r158404 62 62 this._searchResults = []; 63 63 this._currentSearchResultIndex = -1; 64 this._ignoreCodeMirrorContentDidChangeEvent = 0; 64 65 65 66 this._formatted = false; … … 135 136 } 136 137 137 this._ignoreCodeMirrorContentDidChangeEvent = true;138 this._ignoreCodeMirrorContentDidChangeEvent++; 138 139 this._codeMirror.operation(update.bind(this)); 139 delete this._ignoreCodeMirrorContentDidChangeEvent; 140 this._ignoreCodeMirrorContentDidChangeEvent--; 141 console.assert(this._ignoreCodeMirrorContentDidChangeEvent >= 0); 140 142 }, 141 143 … … 164 166 return; 165 167 166 this._ignoreCodeMirrorContentDidChangeEvent = true;168 this._ignoreCodeMirrorContentDidChangeEvent++; 167 169 this._prettyPrint(formatted); 168 delete this._ignoreCodeMirrorContentDidChangeEvent; 170 this._ignoreCodeMirrorContentDidChangeEvent--; 171 console.assert(this._ignoreCodeMirrorContentDidChangeEvent >= 0); 169 172 170 173 this._formatted = formatted; … … 593 596 _contentChanged: function(codeMirror, change) 594 597 { 595 if (this._ignoreCodeMirrorContentDidChangeEvent )598 if (this._ignoreCodeMirrorContentDidChangeEvent > 0) 596 599 return; 597 600
Note: See TracChangeset
for help on using the changeset viewer.