Title: [191417] trunk/Source/WebInspectorUI
Revision
191417
Author
[email protected]
Date
2015-10-21 17:26:29 -0700 (Wed, 21 Oct 2015)

Log Message

Web Inspector: Adjust usages of classList.toggle to ensure a true/false value instead of undefined
https://bugs.webkit.org/show_bug.cgi?id=150424

Patch by Devin Rousso <[email protected]> on 2015-10-21
Reviewed by Timothy Hatcher.

Adds "!!" in front of force parameters in classList.toggle calls that
could possibly be undefined (thereby breaking the UI).

* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (191416 => 191417)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-10-22 00:13:29 UTC (rev 191416)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-10-22 00:26:29 UTC (rev 191417)
@@ -1,5 +1,22 @@
 2015-10-21  Devin Rousso  <[email protected]>
 
+        Web Inspector: Adjust usages of classList.toggle to ensure a true/false value instead of undefined
+        https://bugs.webkit.org/show_bug.cgi?id=150424
+
+        Reviewed by Timothy Hatcher.
+
+        Adds "!!" in front of force parameters in classList.toggle calls that
+        could possibly be undefined (thereby breaking the UI).
+
+        * UserInterface/Views/ScopeBarItem.js:
+        (WebInspector.ScopeBarItem):
+        * UserInterface/Views/VisualStyleDetailsPanel.js:
+        (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
+        * UserInterface/Views/VisualStylePropertyEditor.js:
+        (WebInspector.VisualStylePropertyEditor):
+
+2015-10-21  Devin Rousso  <[email protected]>
+
         Web Inspector: Option-Up doesn't increment certain attribute values
         https://bugs.webkit.org/show_bug.cgi?id=149257
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBarItem.js (191416 => 191417)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBarItem.js	2015-10-22 00:13:29 UTC (rev 191416)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBarItem.js	2015-10-22 00:26:29 UTC (rev 191417)
@@ -30,7 +30,7 @@
         super();
 
         this._element = document.createElement("li");
-        this._element.classList.toggle("exclusive", exclusive);
+        this._element.classList.toggle("exclusive", !!exclusive);
         this._element.classList.add(className);
         this._element.textContent = label;
         this._element.addEventListener("click", this._clicked.bind(this));

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (191416 => 191417)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-10-22 00:13:29 UTC (rev 191416)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2015-10-22 00:26:29 UTC (rev 191417)
@@ -155,7 +155,7 @@
             return;
 
         let disabled = this._currentStyle[WebInspector.VisualStyleDetailsPanel.StyleDisabledSymbol];
-        this._element.classList.toggle("disabled", disabled);
+        this._element.classList.toggle("disabled", !!disabled);
         if (disabled)
             return;
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js (191416 => 191417)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2015-10-22 00:13:29 UTC (rev 191416)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2015-10-22 00:26:29 UTC (rev 191417)
@@ -65,7 +65,7 @@
 
         this._element = document.createElement("div");
         this._element.classList.add("visual-style-property-container", className);
-        this._element.classList.toggle("layout-reversed", layoutReversed);
+        this._element.classList.toggle("layout-reversed", !!layoutReversed);
 
         if (label && label.length) {
             let titleContainer = document.createElement("div");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to