Summary: Dragging to delete a Breakpoint should never trigger a ContentView change Steps to Reproduce: 1. Inspect http://bogojoker.com/shell/ 2. Set a breakpoint in easySlider.min.js 3. Set a breakpoint in facebox.js 4. Show Debugger Tab 5. Select the facebox.js breakpoint in Debugger Sidebar 6. Drag to delete the Breakpoint from the TextEditor's gutter => The breakpoint is deleted but the ContentView unexpectedly changes to easySlider.min.js Notes: - When deleting BreakpointTreeElements from the sidebar via the Delete keyboard shortcuts I would expect ContentView changes - When deleting BreakpointTreeElements in other ways (Context Menu, Drag + Delete from gutter) I do not expect ContentView changes
<rdar://problem/28762930>
Created attachment 291516 [details] [PATCH] Proposed Fix
Comment on attachment 291516 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=291516&action=review > Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:593 > + // If this is a BreakpointTreeElement being deleted because of a cause > + // outside of the TreeOutline then deselect if it is selected to avoid > + // TreeOutline selection changes causing unexpected ContentView changes. > + if (!debuggerTreeElement.__deletedViaDeleteKeyboardShortcut) > + debuggerTreeElement.deselect(); Maybe we should select the parent so the resource is selected to match the visible view?
Comment on attachment 291516 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=291516&action=review >> Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js:593 >> + debuggerTreeElement.deselect(); > > Maybe we should select the parent so the resource is selected to match the visible view? If this is the last BreakpointTreeElement then the parent (ResourceTreeElement) will be removed. We could select the resource in the resources TreeOutline but that might be offscreen which means, should we scroll to it? No selection is actually what I felt best with.
Comment on attachment 291516 [details] [PATCH] Proposed Fix Clearing flags on attachment: 291516 Committed r207359: <http://trac.webkit.org/changeset/207359>
All reviewed patches have been landed. Closing bug.