* SUMMARY New JavaScript/Probe breakpoint action disappears when clicking continue checkbox. Clicking the continue checkbox before entering action text is perfectly reasonable, and it's very frustrating to have to add the action again. The same scenario with a Log Message action doesn't have this problem, the difference being that we allow breakpoints that log an empty message. * STEPS TO REPRODUCE 1. Open Debugger tab 2. Create a new breakpoint 3. Edit breakpoint, add action 4. Change action to Evaluate JavaScript or Probe Expression 5. Leave action text blank 6. Click continue checkbox => New action disappears.
<rdar://problem/21709406>
Created attachment 256319 [details] [Patch] Proposed Fix
Comment on attachment 256319 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=256319&action=review Good call! This has annoyed me in the past. > Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:530 > + return !action.data.length && (action.type === WebInspector.BreakpointAction.Type.Evaluate || action.type === WebInspector.BreakpointAction.Type.Probe); Maybe action.data.trim().length
Comment on attachment 256319 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=256319&action=review >> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:530 >> + return !action.data.length && (action.type === WebInspector.BreakpointAction.Type.Evaluate || action.type === WebInspector.BreakpointAction.Type.Probe); > > Maybe action.data.trim().length Also no need for length. !action.data.trim() is the same, since "" is falsey.
Comment on attachment 256319 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=256319&action=review >>> Source/WebInspectorUI/UserInterface/Models/Breakpoint.js:530 >>> + return !action.data.length && (action.type === WebInspector.BreakpointAction.Type.Evaluate || action.type === WebInspector.BreakpointAction.Type.Probe); >> >> Maybe action.data.trim().length > > Also no need for length. !action.data.trim() is the same, since "" is falsey. BreakPointActionView trims the CodeMirror value before storing in the action.
Created attachment 256460 [details] [Patch] Proposed Fix
Created attachment 256464 [details] [Patch] Proposed Fix
Comment on attachment 256464 [details] [Patch] Proposed Fix r=me
Comment on attachment 256464 [details] [Patch] Proposed Fix Clearing flags on attachment: 256464 Committed r186589: <http://trac.webkit.org/changeset/186589>
All reviewed patches have been landed. Closing bug.