Changeset 240594 in webkit
- Timestamp:
- Jan 28, 2019 11:53:20 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r240559 r240594 1 2019-01-28 Matt Baker <mattbaker@apple.com> 2 3 REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode 4 https://bugs.webkit.org/show_bug.cgi?id=193808 5 <rdar://problem/47537734> 6 7 Reviewed by Devin Rousso. 8 9 * UserInterface/Controllers/SelectionController.js: 10 (WI.SelectionController.prototype.didRemoveItems): 11 12 * UserInterface/Views/TreeOutline.js: 13 (WI.TreeOutline.prototype._indexesForSubtree): 14 Fix a bug where no IndexSet was returned when passed a TreeElement with 15 no children. This caused the Timelines tree selection to be corrupted when 16 entering and exiting edit mode, as TreeElements are inserted and removed. 17 1 18 2019-01-28 Nikita Vasilyev <nvasilyev@apple.com> 2 19 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js
r239405 r240594 222 222 didRemoveItems(indexes) 223 223 { 224 if (!indexes) 225 return; 226 224 227 console.assert(indexes instanceof WI.IndexSet); 225 228 226 if (! this._selectedIndexes.size)229 if (!indexes.size || !this._selectedIndexes.size) 227 230 return; 228 231 -
trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
r240051 r240594 1083 1083 let treeOutline = treeElement.treeOutline; 1084 1084 if (!treeOutline) 1085 return n ew WI.IndexSet;1085 return null; 1086 1086 1087 1087 let firstChild = treeElement.children[0]; 1088 if (!firstChild) 1089 return new WI.IndexSet; 1090 1091 let startIndex = treeOutline._indexOfTreeElement(firstChild); 1088 if (treeElement.root && !firstChild) 1089 return null; 1090 1091 let current = firstChild || treeElement; 1092 let startIndex = treeOutline._indexOfTreeElement(current); 1092 1093 let endIndex = startIndex; 1093 1094 … … 1096 1097 const dontPopulate = true; 1097 1098 1098 let current = firstChild;1099 1099 while (current = current.traverseNextTreeElement(skipUnrevealed, stayWithin, dontPopulate)) 1100 1100 endIndex++; 1101 1102 // Include the index of the subtree's root, unless it's the TreeOutline root.1103 if (!treeElement.root)1104 startIndex--;1105 1101 1106 1102 let count = endIndex - startIndex + 1;
Note: See TracChangeset
for help on using the changeset viewer.