WebKit Bugzilla
Attachment 360359 Details for
Bug 193808
: REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193808-20190128111602.patch (text/plain), 3.40 KB, created by
Matt Baker
on 2019-01-28 11:16:15 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2019-01-28 11:16:15 PST
Size:
3.40 KB
patch
obsolete
>Subversion Revision: 240588 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index f954955d1c096ccfe52f596365fe423d8814a2b6..cf161ea9e9ff975e0491736d5922879d7e70bdf0 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-28 Matt Baker <mattbaker@apple.com> >+ >+ REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode >+ https://bugs.webkit.org/show_bug.cgi?id=193808 >+ <rdar://problem/47537734> >+ >+ Reviewed by Devin Rousso. >+ >+ * UserInterface/Controllers/SelectionController.js: >+ (WI.SelectionController.prototype.didRemoveItems): >+ >+ * UserInterface/Views/TreeOutline.js: >+ (WI.TreeOutline.prototype._indexesForSubtree): >+ Fix a bug where no IndexSet was returned when passed a TreeElement with >+ no children. This caused the Timelines tree selection to be corrupted when >+ entering and exiting edit mode, as TreeElements are inserted and removed. >+ > 2019-01-28 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Add Changes panel to Elements tab >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js b/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >index b65f9f031f7c5e55277f554052245081eb526d66..75cbcf50bd3dacab08e451f11831c94e4de25caa 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >@@ -221,9 +221,12 @@ WI.SelectionController = class SelectionController extends WI.Object > > didRemoveItems(indexes) > { >+ if (!indexes) >+ return; >+ > console.assert(indexes instanceof WI.IndexSet); > >- if (!this._selectedIndexes.size) >+ if (!indexes.size || !this._selectedIndexes.size) > return; > > let firstRemovedIndex = indexes.firstIndex; >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index a47e60b89af6e0def5b868a6447905f5ab29ef9d..02cd7b49c7a0c4429942a35f0d381769cd638d30 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -1082,27 +1082,23 @@ WI.TreeOutline = class TreeOutline extends WI.Object > { > let treeOutline = treeElement.treeOutline; > if (!treeOutline) >- return new WI.IndexSet; >+ return null; > > let firstChild = treeElement.children[0]; >- if (!firstChild) >- return new WI.IndexSet; >+ if (treeElement.root && !firstChild) >+ return null; > >- let startIndex = treeOutline._indexOfTreeElement(firstChild); >+ let current = firstChild || treeElement; >+ let startIndex = treeOutline._indexOfTreeElement(current); > let endIndex = startIndex; > > const skipUnrevealed = false; > const stayWithin = treeElement; > const dontPopulate = true; > >- let current = firstChild; > while (current = current.traverseNextTreeElement(skipUnrevealed, stayWithin, dontPopulate)) > endIndex++; > >- // Include the index of the subtree's root, unless it's the TreeOutline root. >- if (!treeElement.root) >- startIndex--; >- > let count = endIndex - startIndex + 1; > > let indexes = new WI.IndexSet;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193808
:
360312
| 360359