Changeset 200995 in webkit
- Timestamp:
- May 16, 2016 9:11:41 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r200981 r200995 1 2016-05-16 Joseph Pecoraro <pecoraro@apple.com> 2 3 Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement') 4 https://bugs.webkit.org/show_bug.cgi?id=157759 5 <rdar://problem/26309427> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/DOMTreeContentView.js: 10 (WebInspector.DOMTreeContentView.prototype._pathComponentSelected): 11 Handle possible null path components. 12 13 * UserInterface/Views/HierarchicalPathComponent.js: 14 (WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent): 15 When there is a list of just one that is triggered, the Clicked 16 event should produce that one, to be consistent with clicking 17 on a list of multiple elements and selecting the same value. 18 1 19 2016-05-16 Saam barati <sbarati@apple.com> 2 20 -
trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js
r192086 r200995 372 372 _pathComponentSelected(event) 373 373 { 374 if (!event.data.pathComponent) 375 return; 376 374 377 console.assert(event.data.pathComponent instanceof WebInspector.DOMTreeElementPathComponent); 375 378 console.assert(event.data.pathComponent.domTreeElement instanceof WebInspector.DOMTreeElement); -
trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathComponent.js
r196275 r200995 87 87 get selectedPathComponent() 88 88 { 89 var selectElement = this._selectElement[this._selectElement.selectedIndex]; 90 return selectElement && selectElement._pathComponent || null; 89 let selectedOption = this._selectElement[this._selectElement.selectedIndex]; 90 if (!selectedOption && this._selectElement.options.length === 1) 91 selectedOption = this._selectElement.options[0]; 92 return selectedOption && selectedOption._pathComponent || null; 91 93 } 92 94
Note: See TracChangeset
for help on using the changeset viewer.