Title: [237481] trunk/Source/WebInspectorUI
Revision
237481
Author
[email protected]
Date
2018-10-26 13:43:04 -0700 (Fri, 26 Oct 2018)

Log Message

Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._classListContainer.children')
https://bugs.webkit.org/show_bug.cgi?id=190966

Reviewed by Joseph Pecoraro.

* UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
(WI.GeneralStyleDetailsSidebarPanel.prototype.layout):
(WI.GeneralStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
(WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
Don't try to reload the class toggles if the we haven't `layout` yet, as the element won't
yet exist.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (237480 => 237481)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-10-26 20:11:43 UTC (rev 237480)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-10-26 20:43:04 UTC (rev 237481)
@@ -1,3 +1,17 @@
+2018-10-26  Devin Rousso  <[email protected]>
+
+        Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._classListContainer.children')
+        https://bugs.webkit.org/show_bug.cgi?id=190966
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
+        (WI.GeneralStyleDetailsSidebarPanel.prototype.layout):
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._classToggleButtonClicked):
+        (WI.GeneralStyleDetailsSidebarPanel.prototype._populateClassToggles):
+        Don't try to reload the class toggles if the we haven't `layout` yet, as the element won't
+        yet exist.
+
 2018-10-25  Devin Rousso  <[email protected]>
 
         Web Inspector: Canvas Recording loading goes significantly slower when "Frame" tree element is expanded

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js (237480 => 237481)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2018-10-26 20:11:43 UTC (rev 237480)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js	2018-10-26 20:43:04 UTC (rev 237481)
@@ -104,9 +104,7 @@
         this._panel.markAsNeedsRefresh(domNode);
 
         this._updatePseudoClassCheckboxes();
-
-        if (!this._classListContainer.hidden)
-            this._populateClassToggles();
+        this._populateClassToggles();
     }
 
     addEventListeners()
@@ -324,9 +322,6 @@
         this._classToggleButton.classList.toggle("selected");
         this._classListContainer.hidden = !this._classListContainer.hidden;
         this._classListContainerToggledSetting.value = !this._classListContainer.hidden;
-        if (this._classListContainer.hidden)
-            return;
-
         this._populateClassToggles();
     }
 
@@ -353,6 +348,9 @@
 
     _populateClassToggles()
     {
+        if (!this._classListContainer || this._classListContainer.hidden)
+            return;
+
         // Ensure that _addClassContainer is the first child of _classListContainer.
         while (this._classListContainer.children.length > 1)
             this._classListContainer.children[1].remove();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to