Changeset 207359 in webkit


Ignore:
Timestamp:
Oct 14, 2016 4:10:34 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
https://bugs.webkit.org/show_bug.cgi?id=163403
<rdar://problem/28762930>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-14
Reviewed by Timothy Hatcher.

  • UserInterface/Views/BreakpointTreeElement.js:

(WebInspector.BreakpointTreeElement.prototype.ondelete):
Signal when a breakpoint tree element will be going away because it was
deleted via the keyboard operation within the TreeOutline. This is a dirty
way to do the signal but we remove BreakpointTreeElements asynchronously
when the Breakpoint actually gets removed from the backend.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
Deselect a BreakpointTreeElement if it was deleted in a way other then
the delete keyboard shortcut. This ensures another TreeElement selection
doesn't force ContentView changes.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r207358 r207359  
     12016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
     4        https://bugs.webkit.org/show_bug.cgi?id=163403
     5        <rdar://problem/28762930>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        * UserInterface/Views/BreakpointTreeElement.js:
     10        (WebInspector.BreakpointTreeElement.prototype.ondelete):
     11        Signal when a breakpoint tree element will be going away because it was
     12        deleted via the keyboard operation within the TreeOutline. This is a dirty
     13        way to do the signal but we remove BreakpointTreeElements asynchronously
     14        when the Breakpoint actually gets removed from the backend.
     15
     16        * UserInterface/Views/DebuggerSidebarPanel.js:
     17        (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
     18        Deselect a BreakpointTreeElement if it was deleted in a way other then
     19        the delete keyboard shortcut. This ensures another TreeElement selection
     20        doesn't force ContentView changes.
     21
    1222016-10-14  Joseph Pecoraro  <pecoraro@apple.com>
    223
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js

    r201620 r207359  
    8181            return false;
    8282
     83        // We set this flag so that TreeOutlines that will remove this
     84        // BreakpointTreeElement will know whether it was deleted from
     85        // within the TreeOutline or from outside it (e.g. TextEditor).
     86        this.__deletedViaDeleteKeyboardShortcut = true;
     87
    8388        WebInspector.debuggerManager.removeBreakpoint(this._breakpoint);
    8489        return true;
  • trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js

    r205930 r207359  
    587587    _removeDebuggerTreeElement(debuggerTreeElement)
    588588    {
    589         var parentTreeElement = debuggerTreeElement.parent;
     589        // If this is a BreakpointTreeElement being deleted because of a cause
     590        // outside of the TreeOutline then deselect if it is selected to avoid
     591        // TreeOutline selection changes causing unexpected ContentView changes.
     592        if (!debuggerTreeElement.__deletedViaDeleteKeyboardShortcut)
     593            debuggerTreeElement.deselect();
     594
     595        let parentTreeElement = debuggerTreeElement.parent;
    590596        parentTreeElement.removeChild(debuggerTreeElement);
    591597
Note: See TracChangeset for help on using the changeset viewer.