Title: [188725] trunk/Source/WebInspectorUI
Revision
188725
Author
[email protected]
Date
2015-08-20 18:31:51 -0700 (Thu, 20 Aug 2015)

Log Message

Web Inspector: visual style number inputs don't style the units correctly
https://bugs.webkit.org/show_bug.cgi?id=148222

Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
Added extra checks to see if the number input has a value when setting the value on the editor.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (188724 => 188725)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:04:51 UTC (rev 188724)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-08-21 01:31:51 UTC (rev 188725)
@@ -1,3 +1,14 @@
+2015-08-20  Devin Rousso  <[email protected]>
+
+        Web Inspector: visual style number inputs don't style the units correctly
+        https://bugs.webkit.org/show_bug.cgi?id=148222
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/VisualStyleNumberInputBox.js:
+        (WebInspector.VisualStyleNumberInputBox.prototype.set value):
+        Added extra checks to see if the number input has a value when setting the value on the editor.
+
 2015-08-20  Matt Baker  <[email protected]>
 
         Web Inspector: Filtered frames should be styled differently in the Rendering Frames overview graph

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js (188724 => 188725)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-21 01:04:51 UTC (rev 188724)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js	2015-08-21 01:31:51 UTC (rev 188725)
@@ -120,18 +120,20 @@
 
         this.specialPropertyPlaceholderElement.hidden = true;
 
+        if (!value) {
+            this._valueNumberInputElement.value = null;
+            this._markUnitsContainerIfInputHasValue();
+            return;
+        }
+
         if (!isNaN(value)) {
             this._numberInputIsEditable = true;
             this.contentElement.classList.add("number-input-editable");
             this._valueNumberInputElement.value = Math.round(value * 100) / 100;
+            this._markUnitsContainerIfInputHasValue();
             return;
         }
 
-        if (!value) {
-            this._valueNumberInputElement.value = null;
-            return;
-        }
-
         if (this.valueIsSupportedKeyword(value)) {
             this._numberInputIsEditable = false;
             this.contentElement.classList.remove("number-input-editable");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to