Changeset 268626 in webkit


Ignore:
Timestamp:
Oct 16, 2020 6:50:57 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION(r266480): line-based JavaScript breakpoint tree element titles also show the file name
https://bugs.webkit.org/show_bug.cgi?id=217859

Reviewed by Timothy Hatcher.

r266480 changed it such that WI.BreakpointTreeElement would only call updateTitles if
the constructor was not provided a title while also adding a fallback for title in the
constructor of WI.JavaScriptBreakpointTreeElement, ensuring that it would always be set
by the time it reached WI.BreakpointTreeElement, meaning that updateTitles would never
be called.

Since updateTitles was only implemented by WI.JavaScriptBreakpointTreeElement, remove
it from WI.BreakpointTreeElement and ensure that it is always called for non-special
JavaScript breakpoints (in addition to whenever the WI.SourceCodeLocation changes).

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.updateTitles): Deleted.

  • UserInterface/Views/JavaScriptBreakpointTreeElement.js:

(WI.JavaScriptBreakpointTreeElement):
(WI.JavaScriptBreakpointTreeElement.prototype._updateTitles): Added.
(WI.JavaScriptBreakpointTreeElement.prototype._breakpointLocationDidChange):
(WI.JavaScriptBreakpointTreeElement.prototype.updateTitles): Deleted.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r268473 r268626  
     12020-10-16  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION(r266480): line-based JavaScript breakpoint tree element titles also show the file name
     4        https://bugs.webkit.org/show_bug.cgi?id=217859
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        r266480 changed it such that `WI.BreakpointTreeElement` would only call `updateTitles` if
     9        the constructor was not provided a `title` while also adding a fallback for `title` in the
     10        constructor of `WI.JavaScriptBreakpointTreeElement`, ensuring that it would always be set
     11        by the time it reached `WI.BreakpointTreeElement`, meaning that `updateTitles` would never
     12        be called.
     13
     14        Since `updateTitles` was only implemented by `WI.JavaScriptBreakpointTreeElement`, remove
     15        it from `WI.BreakpointTreeElement` and ensure that it is always called for non-special
     16        JavaScript breakpoints (in addition to whenever the `WI.SourceCodeLocation` changes).
     17
     18        * UserInterface/Views/BreakpointTreeElement.js:
     19        (WI.BreakpointTreeElement.prototype.updateTitles): Deleted.
     20        * UserInterface/Views/JavaScriptBreakpointTreeElement.js:
     21        (WI.JavaScriptBreakpointTreeElement):
     22        (WI.JavaScriptBreakpointTreeElement.prototype._updateTitles): Added.
     23        (WI.JavaScriptBreakpointTreeElement.prototype._breakpointLocationDidChange):
     24        (WI.JavaScriptBreakpointTreeElement.prototype.updateTitles): Deleted.
     25
    1262020-10-14  Devin Rousso  <drousso@apple.com>
    227
  • trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js

    r266534 r268626  
    5555        this._listenerSet.register(this.status, "click", this._statusImageElementClicked);
    5656
    57         if (!title)
    58             this.updateTitles();
    5957        this.updateStatus();
    6058
     
    144142        if (this._breakpoint.editable)
    145143            this.status.classList.toggle(WI.BreakpointTreeElement.StatusImageAutoContinueStyleClassName, this._breakpoint.autoContinue);
    146     }
    147 
    148     updateTitles()
    149     {
    150         // Overridden by subclasses if needed.
    151144    }
    152145
  • trunk/Source/WebInspectorUI/UserInterface/Views/JavaScriptBreakpointTreeElement.js

    r266480 r268626  
    3434        classNames.push("javascript");
    3535
    36         if (!title)
     36        if (!title && breakpoint.special)
    3737            title = breakpoint.displayName;
    3838
    3939        super(breakpoint, {classNames, title});
    4040
    41         if (!breakpoint.special)
     41        if (!breakpoint.special) {
    4242            this.listenerSet.register(breakpoint, WI.JavaScriptBreakpoint.Event.LocationDidChange, this._breakpointLocationDidChange);
     43            this._updateTitles();
     44        }
    4345        this.listenerSet.register(breakpoint, WI.JavaScriptBreakpoint.Event.ResolvedStateDidChange, this.updateStatus);
    4446    }
     
    6365    }
    6466
    65     updateTitles()
     67    // Private
     68
     69    _updateTitles()
    6670    {
    67         super.updateTitles();
    68 
    6971        console.assert(!this.breakpoint.special);
    7072
     
    9092    }
    9193
    92     // Private
    93 
    9494    _breakpointLocationDidChange(event)
    9595    {
     
    100100            return;
    101101
    102         this.updateTitles();
     102        this._updateTitles();
    103103    }
    104104};
Note: See TracChangeset for help on using the changeset viewer.