Changeset 218983 in webkit
- Timestamp:
- Jun 29, 2017 7:16:05 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r218975 r218983 1 2017-06-29 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Remove unnecessary hasChildren from TreeOutline 4 https://bugs.webkit.org/show_bug.cgi?id=173986 5 6 Reviewed by Joseph Pecoraro. 7 8 * UserInterface/Views/TreeOutline.js: 9 (WebInspector.TreeOutline): 10 (WebInspector.TreeOutline.prototype.appendChild): 11 (WebInspector.TreeOutline.prototype.insertChild): 12 (WebInspector.TreeOutline.prototype.removeChildAtIndex): 13 (WebInspector.TreeOutline.prototype.removeChild): 14 (WebInspector.TreeOutline.prototype.get selectedTreeElementIndex): 15 16 * UserInterface/Views/NavigationSidebarPanel.js: 17 (WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): 18 * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js: 19 (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value): 20 1 21 2017-06-29 Devin Rousso <drousso@apple.com> 2 22 -
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js
r218975 r218983 646 646 var visibleTreeElements = []; 647 647 this.contentTreeOutlines.forEach(function(outline) { 648 var currentTreeElement = outline. hasChildren? outline.children[0] : null;648 var currentTreeElement = outline.children.length ? outline.children[0] : null; 649 649 while (currentTreeElement) { 650 650 visibleTreeElements.push(currentTreeElement); -
trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js
r217690 r218983 45 45 this.allowsRepeatSelection = false; 46 46 this.root = true; 47 this.hasChildren = false;48 47 this.expanded = true; 49 48 this.selected = false; … … 157 156 158 157 this.children.push(child); 159 this.hasChildren = true;160 158 child.parent = this; 161 159 child.treeOutline = this.treeOutline; … … 207 205 208 206 this.children.splice(index, 0, child); 209 this.hasChildren = true;210 207 child.parent = this; 211 208 child.treeOutline = this.treeOutline; … … 268 265 child.previousSibling = null; 269 266 267 if (!this.children.length && this._listItemNode) 268 this._listItemNode.classList.remove("parent"); 269 270 270 if (treeOutline) 271 271 treeOutline.dispatchEventToListeners(WebInspector.TreeOutline.Event.ElementRemoved, {element: child}); … … 284 284 285 285 this.removeChildAtIndex(childIndex, suppressOnDeselect, suppressSelectSibling); 286 287 if (!this.children.length) {288 if (this._listItemNode)289 this._listItemNode.classList.remove("parent");290 this.hasChildren = false;291 }292 286 } 293 287 … … 623 617 get selectedTreeElementIndex() 624 618 { 625 if (!this. hasChildren|| !this.selectedTreeElement)619 if (!this.children.length || !this.selectedTreeElement) 626 620 return; 627 621 -
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js
r211462 r218983 69 69 get value() 70 70 { 71 if (!this._commaSeparatedKeywords. hasChildren)71 if (!this._commaSeparatedKeywords.children.length) 72 72 return ""; 73 73
Note: See TracChangeset
for help on using the changeset viewer.