Title: [187775] trunk/Source/WebInspectorUI
- Revision
- 187775
- Author
- mattba...@apple.com
- Date
- 2015-08-03 15:05:38 -0700 (Mon, 03 Aug 2015)
Log Message
Web Inspector: REGRESSION (r187708): Breakpoint dialog script action editing broken
https://bugs.webkit.org/show_bug.cgi?id=147553
Reviewed by Joseph Pecoraro.
Passing a widget to CodeMirror.setBookmark generates a viewportChange event, causing the
BreakpointActionView to update the popup for the breakpoint. The spurious update dismisses
the suggestion list, removes the CodeMirror completion hint, and causes other problems.
Now we ignore viewportChange events unless the viewport size changes. We still want to update
the popup when a carriage return or text wrap modifies the viewport.
* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._updateBody):
Evaluate and Probe actions store the current viewport size.
(WebInspector.BreakpointActionView.prototype._codeMirrorViewportChanged):
Check if viewport size has changed since last event.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (187774 => 187775)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-08-03 21:59:29 UTC (rev 187774)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-08-03 22:05:38 UTC (rev 187775)
@@ -1,3 +1,23 @@
+2015-08-03 Matt Baker <mattba...@apple.com>
+
+ Web Inspector: REGRESSION (r187708): Breakpoint dialog script action editing broken
+ https://bugs.webkit.org/show_bug.cgi?id=147553
+
+ Reviewed by Joseph Pecoraro.
+
+ Passing a widget to CodeMirror.setBookmark generates a viewportChange event, causing the
+ BreakpointActionView to update the popup for the breakpoint. The spurious update dismisses
+ the suggestion list, removes the CodeMirror completion hint, and causes other problems.
+
+ Now we ignore viewportChange events unless the viewport size changes. We still want to update
+ the popup when a carriage return or text wrap modifies the viewport.
+
+ * UserInterface/Views/BreakpointActionView.js:
+ (WebInspector.BreakpointActionView.prototype._updateBody):
+ Evaluate and Probe actions store the current viewport size.
+ (WebInspector.BreakpointActionView.prototype._codeMirrorViewportChanged):
+ Check if viewport size has changed since last event.
+
2015-08-03 Brian J. Burg <b...@cs.washington.edu>
Web Inspector: Application cache DataGrid has incorrect column heading styles
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js (187774 => 187775)
--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js 2015-08-03 21:59:29 UTC (rev 187774)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js 2015-08-03 22:05:38 UTC (rev 187775)
@@ -161,6 +161,8 @@
this._codeMirror.on("viewportChange", this._codeMirrorViewportChanged.bind(this));
this._codeMirror.on("blur", this._codeMirrorBlurred.bind(this));
+ this._codeMirrorViewport = {from: null, to: null};
+
var completionController = new WebInspector.CodeMirrorCompletionController(this._codeMirror);
completionController.addExtendedCompletionProvider("_javascript_", WebInspector._javascript_RuntimeCompletionProvider);
@@ -195,8 +197,13 @@
this._action.data = "" || "").trim();
}
- _codeMirrorViewportChanged(event)
+ _codeMirrorViewportChanged(event, from, to)
{
+ if (this._codeMirrorViewport.from === from && this._codeMirrorViewport.to === to)
+ return;
+
+ this._codeMirrorViewport.from = from;
+ this._codeMirrorViewport.to = to;
this._delegate.breakpointActionViewResized(this);
}
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes