Changeset 258729 in webkit


Ignore:
Timestamp:
Mar 19, 2020 2:35:47 PM (4 years ago)
Author:
Nikita Vasilyev
Message:

Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
https://bugs.webkit.org/show_bug.cgi?id=209301

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.removeChildAtIndex):
Check suppressSelectSibling once instead of three times.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r258623 r258729  
     12020-03-19  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
     4        https://bugs.webkit.org/show_bug.cgi?id=209301
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * UserInterface/Views/TreeOutline.js:
     9        (WI.TreeOutline.prototype.removeChildAtIndex):
     10        Check `suppressSelectSibling` once instead of three times.
     11
    1122020-03-17  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

    r257380 r258729  
    361361        let parent = child.parent;
    362362
    363         if (child.deselect(suppressOnDeselect)) {
    364             if (child.previousSibling && !suppressSelectSibling)
     363        if (child.deselect(suppressOnDeselect) && !suppressSelectSibling) {
     364            if (child.previousSibling)
    365365                child.previousSibling.select(true, false);
    366             else if (child.nextSibling && !suppressSelectSibling)
     366            else if (child.nextSibling)
    367367                child.nextSibling.select(true, false);
    368             else if (!suppressSelectSibling)
     368            else
    369369                parent.select(true, false);
    370370        }
Note: See TracChangeset for help on using the changeset viewer.