Title: [200995] trunk/Source/WebInspectorUI
- Revision
- 200995
- Author
- [email protected]
- Date
- 2016-05-16 21:11:41 -0700 (Mon, 16 May 2016)
Log Message
Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement')
https://bugs.webkit.org/show_bug.cgi?id=157759
<rdar://problem/26309427>
Patch by Joseph Pecoraro <[email protected]> on 2016-05-16
Reviewed by Timothy Hatcher.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._pathComponentSelected):
Handle possible null path components.
* UserInterface/Views/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
When there is a list of just one that is triggered, the Clicked
event should produce that one, to be consistent with clicking
on a list of multiple elements and selecting the same value.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200994 => 200995)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-17 04:11:34 UTC (rev 200994)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-17 04:11:41 UTC (rev 200995)
@@ -1,3 +1,21 @@
+2016-05-16 Joseph Pecoraro <[email protected]>
+
+ Uncaught Exception: TypeError: null is not an object (evaluating 'event.data.pathComponent.domTreeElement')
+ https://bugs.webkit.org/show_bug.cgi?id=157759
+ <rdar://problem/26309427>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/DOMTreeContentView.js:
+ (WebInspector.DOMTreeContentView.prototype._pathComponentSelected):
+ Handle possible null path components.
+
+ * UserInterface/Views/HierarchicalPathComponent.js:
+ (WebInspector.HierarchicalPathComponent.prototype.get selectedPathComponent):
+ When there is a list of just one that is triggered, the Clicked
+ event should produce that one, to be consistent with clicking
+ on a list of multiple elements and selecting the same value.
+
2016-05-16 Saam barati <[email protected]>
Hook up ShadowChicken to the debugger to show tail deleted frames
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js (200994 => 200995)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2016-05-17 04:11:34 UTC (rev 200994)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js 2016-05-17 04:11:41 UTC (rev 200995)
@@ -371,6 +371,9 @@
_pathComponentSelected(event)
{
+ if (!event.data.pathComponent)
+ return;
+
console.assert(event.data.pathComponent instanceof WebInspector.DOMTreeElementPathComponent);
console.assert(event.data.pathComponent.domTreeElement instanceof WebInspector.DOMTreeElement);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathComponent.js (200994 => 200995)
--- trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathComponent.js 2016-05-17 04:11:34 UTC (rev 200994)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HierarchicalPathComponent.js 2016-05-17 04:11:41 UTC (rev 200995)
@@ -86,8 +86,10 @@
get selectedPathComponent()
{
- var selectElement = this._selectElement[this._selectElement.selectedIndex];
- return selectElement && selectElement._pathComponent || null;
+ let selectedOption = this._selectElement[this._selectElement.selectedIndex];
+ if (!selectedOption && this._selectElement.options.length === 1)
+ selectedOption = this._selectElement.options[0];
+ return selectedOption && selectedOption._pathComponent || null;
}
get element()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes