RESOLVED FIXED Bug 163403
Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
https://bugs.webkit.org/show_bug.cgi?id=163403
Summary Web Inspector: Dragging to delete a Breakpoint should never trigger a Content...
Joseph Pecoraro
Reported 2016-10-13 14:23:54 PDT
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
Attachments
[PATCH] Proposed Fix (3.40 KB, patch)
2016-10-13 14:31 PDT, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2016-10-13 14:24:29 PDT
Joseph Pecoraro
Comment 2 2016-10-13 14:31:50 PDT
Created attachment 291516 [details] [PATCH] Proposed Fix
Timothy Hatcher
Comment 3 2016-10-14 15:41:08 PDT
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?
Joseph Pecoraro
Comment 4 2016-10-14 15:49:50 PDT
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.
WebKit Commit Bot
Comment 5 2016-10-14 16:13:13 PDT
Comment on attachment 291516 [details] [PATCH] Proposed Fix Clearing flags on attachment: 291516 Committed r207359: <http://trac.webkit.org/changeset/207359>
WebKit Commit Bot
Comment 6 2016-10-14 16:13:17 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.