WebKit Bugzilla
Attachment 360312 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-20190127192448.patch (text/plain), 3.64 KB, created by
Matt Baker
on 2019-01-27 19:24:57 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2019-01-27 19:24:57 PST
Size:
3.64 KB
patch
obsolete
>Subversion Revision: 240556 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index ffddf7c4c6be26091f8a4312fd3ddd2ad0174d4f..c656d2e631a6bfadf4e27f6d35b1c903ff84b265 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-27 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 NOBODY (OOPS!). >+ >+ * UserInterface/Views/TreeOutline.js: >+ (WI.TreeOutline.prototype.removeChildAtIndex): >+ (WI.TreeOutline.prototype.removeChildren): >+ Check for null before calling didRemoveItems. Previously we passed in >+ an empty IndexSet returned by _indexesForSubtree. >+ (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-26 Devin Rousso <drousso@apple.com> > > Web Inspector: handle CSS Color 4 color syntaxes >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index a47e60b89af6e0def5b868a6447905f5ab29ef9d..d5202ec82ed7b8e0af13938cea26767091d44c1c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -346,7 +346,8 @@ WI.TreeOutline = class TreeOutline extends WI.Object > child.previousSibling = null; > > if (treeOutline) { >- treeOutline._selectionController.didRemoveItems(removedIndexes); >+ if (removedIndexes) >+ treeOutline._selectionController.didRemoveItems(removedIndexes); > treeOutline.dispatchEventToListeners(WI.TreeOutline.Event.ElementRemoved, {element: child}); > } > } >@@ -394,7 +395,8 @@ WI.TreeOutline = class TreeOutline extends WI.Object > this.children.shift(); > > if (treeOutline) { >- treeOutline._selectionController.didRemoveItems(removedIndexes); >+ if (removedIndexes) >+ treeOutline._selectionController.didRemoveItems(removedIndexes); > treeOutline.dispatchEventToListeners(WI.TreeOutline.Event.ElementRemoved, {element: child}); > } > } >@@ -1082,27 +1084,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