Title: [186589] trunk/Source/WebInspectorUI
Revision
186589
Author
mattba...@apple.com
Date
2015-07-09 01:03:55 -0700 (Thu, 09 Jul 2015)

Log Message

Web Inspector: New _javascript_/Probe breakpoint action disappears when clicking continue checkbox
https://bugs.webkit.org/show_bug.cgi?id=146688

Reviewed by Brian Burg.

Delay removal of empty Evaluate and Probe actions until after the breakpoint popover has been dismissed. This
will make the breakpoint editing experience less jarring, by preventing actions from disappearing when clicking
other controls in the popover.

* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.didDismissPopover):
Clear empty Evaluate and Probe actions on popover dismissal.

* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._codeMirrorBlurred):
Don't remove actions with empty data on CodeMirror blur.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (186588 => 186589)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 07:35:15 UTC (rev 186588)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-09 08:03:55 UTC (rev 186589)
@@ -1,5 +1,24 @@
 2015-07-09  Matt Baker  <mattba...@apple.com>
 
+        Web Inspector: New _javascript_/Probe breakpoint action disappears when clicking continue checkbox
+        https://bugs.webkit.org/show_bug.cgi?id=146688
+
+        Reviewed by Brian Burg.
+
+        Delay removal of empty Evaluate and Probe actions until after the breakpoint popover has been dismissed. This
+        will make the breakpoint editing experience less jarring, by preventing actions from disappearing when clicking
+        other controls in the popover.
+
+        * UserInterface/Models/Breakpoint.js:
+        (WebInspector.Breakpoint.prototype.didDismissPopover):
+        Clear empty Evaluate and Probe actions on popover dismissal.
+
+        * UserInterface/Views/BreakpointActionView.js:
+        (WebInspector.BreakpointActionView.prototype._codeMirrorBlurred):
+        Don't remove actions with empty data on CodeMirror blur.
+
+2015-07-09  Matt Baker  <mattba...@apple.com>
+
         Web Inspector: new breakpoint action dialog should reuse same action type
         https://bugs.webkit.org/show_bug.cgi?id=137255
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js (186588 => 186589)


--- trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js	2015-07-09 07:35:15 UTC (rev 186588)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js	2015-07-09 08:03:55 UTC (rev 186589)
@@ -533,6 +533,19 @@
         delete this._popover;
     }
 
+    didDismissPopover(popover)
+    {
+        // Remove Evaluate and Probe actions that have no data.
+        var emptyActions = this._actions.filter(function(action) {
+            if (action.type !== WebInspector.BreakpointAction.Type.Evaluate && action.type !== WebInspector.BreakpointAction.Type.Probe)
+                return false;
+            return !(action.data && action.data.trim());
+        });
+
+        for (var action of emptyActions)
+            this.removeAction(action);
+    }
+
     _showEditBreakpointPopover(boundingClientRect)
     {
         var bounds = WebInspector.Rect.rectFromClientRect(boundingClientRect);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js (186588 => 186589)


--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js	2015-07-09 07:35:15 UTC (rev 186588)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js	2015-07-09 08:03:55 UTC (rev 186589)
@@ -192,12 +192,7 @@
     _codeMirrorBlurred(event)
     {
         // Throw away the _expression_ if it's just whitespace.
-        var data = "" || "").trim();
-
-        if (!data.length)
-            this._removeAction();
-        else
-            this._action.data = ""
+        this._action.data = "" || "").trim();
     }
 
     _codeMirrorViewportChanged(event)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to