Changeset 235142 in webkit


Ignore:
Timestamp:
Aug 21, 2018 3:08:18 PM (6 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION(r235095): duplicate actions existing in WI.CanvasSidebarPanel
https://bugs.webkit.org/show_bug.cgi?id=188808

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype._recordingChanged):
Check that the WI.RecordingAction is not already represented in the WI.TreeOutline
before adding it.

  • UserInterface/Views/CanvasSidebarPanel.css:

(.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.processing .subtitle > progress):
Drive-by: vertically center the <progress> shown for WI.RecordingFrame during processing.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r235141 r235142  
     12018-08-21  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION(r235095): duplicate actions existing in WI.CanvasSidebarPanel
     4        https://bugs.webkit.org/show_bug.cgi?id=188808
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Views/CanvasSidebarPanel.js:
     9        (WI.CanvasSidebarPanel.prototype._recordingChanged):
     10        Check that the `WI.RecordingAction` is not already represented in the `WI.TreeOutline`
     11        before adding it.
     12
     13        * UserInterface/Views/CanvasSidebarPanel.css:
     14        (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.processing .subtitle > progress):
     15        Drive-by: vertically center the <progress> shown for `WI.RecordingFrame` during processing.
     16
    1172018-08-21  Devin Rousso  <drousso@apple.com>
    218
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.css

    r235095 r235142  
    7676    width: 100%;
    7777    max-width: 100px;
    78     margin: 2px 4px 0;
     78    margin: 0 4px;
     79    vertical-align: -3px;
    7980}
    8081
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js

    r235095 r235142  
    408408        }
    409409
    410         if (this._recording.actions[0].ready) {
    411             this._recordingTreeOutline.appendChild(new WI.RecordingActionTreeElement(this._recording.actions[0], 0, this._recording.type));
     410        let initialStateAction = this._recording.actions[0];
     411        if (initialStateAction.ready && !this._recordingTreeOutline.getCachedTreeElement(initialStateAction)) {
     412            this._recordingTreeOutline.appendChild(new WI.RecordingActionTreeElement(initialStateAction, 0, this._recording.type));
    412413
    413414            if (!this._recording[WI.CanvasSidebarPanel.SelectedActionSymbol])
    414                 this.action = this._recording.actions[0];
     415                this.action = initialStateAction;
    415416        }
    416417
     
    420421                return;
    421422
    422             let folder = this._createRecordingFrameTreeElement(frame, frameIndex, this._recordingTreeOutline);
     423            let folder = this._recordingTreeOutline.getCachedTreeElement(frame);
     424            if (!folder)
     425                folder = this._createRecordingFrameTreeElement(frame, frameIndex, this._recordingTreeOutline);
    423426
    424427            for (let action of frame.actions) {
    425                 if (!action.ready)
     428                ++cumulativeActionIndex;
     429
     430                if (!action.ready || this._recordingTreeOutline.getCachedTreeElement(action))
    426431                    break;
    427 
    428                 ++cumulativeActionIndex;
    429432
    430433                this._createRecordingActionTreeElement(action, cumulativeActionIndex, folder);
Note: See TracChangeset for help on using the changeset viewer.