Title: [158594] branches/safari-537.73-branch/Source/WebInspectorUI
- Revision
- 158594
- Author
- [email protected]
- Date
- 2013-11-04 13:56:58 -0800 (Mon, 04 Nov 2013)
Log Message
Merged r158404. <rdar://problem/15371809>
Modified Paths
Diff
Modified: branches/safari-537.73-branch/Source/WebInspectorUI/ChangeLog (158593 => 158594)
--- branches/safari-537.73-branch/Source/WebInspectorUI/ChangeLog 2013-11-04 21:53:27 UTC (rev 158593)
+++ branches/safari-537.73-branch/Source/WebInspectorUI/ChangeLog 2013-11-04 21:56:58 UTC (rev 158594)
@@ -1,5 +1,26 @@
2013-11-04 Lucas Forschler <[email protected]>
+ Merge r158404
+
+ 2013-10-31 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Breakpoints in auto-formatted _javascript_ editors are not working
+ https://bugs.webkit.org/show_bug.cgi?id=123589
+
+ Reviewed by Timothy Hatcher.
+
+ The internal this._ignoreCodeMirrorContentDidChangeEvent flag was being used
+ in two places that could be nested, meaning the flag was deleted while it
+ was still expected to be set. Change it instead to a counter, to handle nesting.
+
+ * UserInterface/TextEditor.js:
+ (WebInspector.TextEditor):
+ (WebInspector.TextEditor.prototype.set string):
+ (WebInspector.TextEditor.prototype.set formatted):
+ (WebInspector.TextEditor.prototype._contentChanged):
+
+2013-11-04 Lucas Forschler <[email protected]>
+
Merge r158061
2013-10-25 Joseph Pecoraro <[email protected]>
Modified: branches/safari-537.73-branch/Source/WebInspectorUI/UserInterface/TextEditor.js (158593 => 158594)
--- branches/safari-537.73-branch/Source/WebInspectorUI/UserInterface/TextEditor.js 2013-11-04 21:53:27 UTC (rev 158593)
+++ branches/safari-537.73-branch/Source/WebInspectorUI/UserInterface/TextEditor.js 2013-11-04 21:56:58 UTC (rev 158594)
@@ -62,6 +62,7 @@
this._searchQuery = null;
this._searchResults = [];
this._currentSearchResultIndex = -1;
+ this._ignoreCodeMirrorContentDidChangeEvent = 0;
this._formatted = false
this._formatterSourceMap = null;
@@ -135,9 +136,10 @@
this._revealPendingPositionIfPossible();
}
- this._ignoreCodeMirrorContentDidChangeEvent = true;
+ this._ignoreCodeMirrorContentDidChangeEvent++;
this._codeMirror.operation(update.bind(this));
- delete this._ignoreCodeMirrorContentDidChangeEvent;
+ this._ignoreCodeMirrorContentDidChangeEvent--;
+ console.assert(this._ignoreCodeMirrorContentDidChangeEvent >= 0);
},
get readOnly()
@@ -165,9 +167,10 @@
if (formatted && !this.canBeFormatted())
return;
- this._ignoreCodeMirrorContentDidChangeEvent = true;
+ this._ignoreCodeMirrorContentDidChangeEvent++;
this._prettyPrint(formatted);
- delete this._ignoreCodeMirrorContentDidChangeEvent;
+ this._ignoreCodeMirrorContentDidChangeEvent--;
+ console.assert(this._ignoreCodeMirrorContentDidChangeEvent >= 0);
this._formatted = formatted;
this._updateCodeMirrorReadOnly();
@@ -585,7 +588,7 @@
_contentChanged: function(codeMirror, change)
{
- if (this._ignoreCodeMirrorContentDidChangeEvent)
+ if (this._ignoreCodeMirrorContentDidChangeEvent > 0)
return;
this.dispatchEventToListeners(WebInspector.TextEditor.Event.ContentDidChange);
},
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes