Title: [204490] trunk/Source/WebInspectorUI
Revision
204490
Author
[email protected]
Date
2016-08-15 18:34:36 -0700 (Mon, 15 Aug 2016)

Log Message

Web Inspector: Error/Warning icons are misplaced in the Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=160875

Patch by Devin Rousso <[email protected]> on 2016-08-15
Reviewed by Matt Baker.

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted.
Reworked to apply more generally to editors without titles.

* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning):
(.visual-style-property-container.invalid-value > .visual-style-property-editor-warning):
(.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)):
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder):
(.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted.
(.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted.
Reworked class names to be on the element container instead of the icon.

* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.update):
(WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
(WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (204489 => 204490)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-08-15 23:32:03 UTC (rev 204489)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-08-16 01:34:36 UTC (rev 204490)
@@ -1,3 +1,29 @@
+2016-08-15  Devin Rousso  <[email protected]>
+
+        Web Inspector: Error/Warning icons are misplaced in the Visual sidebar
+        https://bugs.webkit.org/show_bug.cgi?id=160875
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
+        (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted.
+        Reworked to apply more generally to editors without titles.
+
+        * UserInterface/Views/VisualStylePropertyEditor.css:
+        (.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning):
+        (.visual-style-property-container.invalid-value > .visual-style-property-editor-warning):
+        (.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)):
+        (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder):
+        (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted.
+        (.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted.
+        Reworked class names to be on the element container instead of the icon.
+
+        * UserInterface/Views/VisualStylePropertyEditor.js:
+        (WebInspector.VisualStylePropertyEditor.prototype.update):
+        (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
+        (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
+        (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
+
 2016-08-15  Saam Barati  <[email protected]>
 
         Web Inspector: Introduce a method to enable code coverage profiler without enabling type profiler

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css (204489 => 204490)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css	2016-08-15 23:32:03 UTC (rev 204489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css	2016-08-16 01:34:36 UTC (rev 204490)
@@ -32,10 +32,6 @@
     overflow: auto;
 }
 
-.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder {
-    display: none;
-}
-
 .visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list {
     min-height: 51px;
     max-height: 94px;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css (204489 => 204490)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2016-08-15 23:32:03 UTC (rev 204489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2016-08-16 01:34:36 UTC (rev 204490)
@@ -67,12 +67,12 @@
     margin-left: 4px;
 }
 
-.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency {
+.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning {
     display: block;
     content: url(../Images/Warning.svg);
 }
 
-.visual-style-property-container > .visual-style-property-editor-warning.invalid-value {
+.visual-style-property-container.invalid-value > .visual-style-property-editor-warning {
     display: block;
     content: url(../Images/Error.svg);
 }
@@ -92,6 +92,10 @@
     opacity: 0.4;
 }
 
+.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container) {
+    margin-left: 2px;
+}
+
 .visual-style-property-container > .visual-style-property-value-container select {
     width: 100%;
     margin: 1px 0;
@@ -124,6 +128,10 @@
     z-index: 1;
 }
 
+.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder {
+    display: none;
+}
+
 .visual-style-property-info-popover {
     width: 190px;
     margin: 0 5px 3px;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js (204489 => 204490)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2016-08-15 23:32:03 UTC (rev 204489)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js	2016-08-16 01:34:36 UTC (rev 204490)
@@ -291,7 +291,7 @@
                 this._representedProperty = property;
 
             if (!propertyMissing && property && !property.valid) {
-                this._warningElement.classList.add("invalid-value");
+                this._element.classList.add("invalid-value");
                 this._warningElement.title = WebInspector.UIString("The value ā€œ%sā€ is not supported for this property.").format(propertyText);
                 this.specialPropertyPlaceholderElementText = propertyText;
                 return;
@@ -326,7 +326,7 @@
         this._lastValue = this.synthesizedValue;
         this.disabled = false;
 
-        this._warningElement.classList.remove("invalid-value");
+        this._element.classList.remove("invalid-value");
         this._checkDependencies();
     }
 
@@ -501,7 +501,7 @@
         this._specialPropertyPlaceholderElement.hidden = true;
 
         this._checkDependencies();
-        this._warningElement.classList.remove("invalid-value");
+        this._element.classList.remove("invalid-value");
 
         this.dispatchEventToListeners(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange);
         return true;
@@ -532,7 +532,7 @@
     _checkDependencies()
     {
         if (!this._dependencies.size || !this._style || !this.synthesizedValue) {
-            this._warningElement.classList.remove("missing-dependency");
+            this._element.classList.remove("missing-dependency");
             return;
         }
 
@@ -548,7 +548,7 @@
                 title += "\n " + property.name + ": " + dependencyValues.join("/");
         }
 
-        this._warningElement.classList.toggle("missing-dependency", !!title.length);
+        this._element.classList.toggle("missing-dependency", !!title.length);
         this._warningElement.title = !!title.length ? WebInspector.UIString("Missing Dependencies:%s").format(title) : null;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to