Title: [231377] trunk/Source/WebInspectorUI
Revision
231377
Author
nvasil...@apple.com
Date
2018-05-04 13:51:47 -0700 (Fri, 04 May 2018)

Log Message

Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
https://bugs.webkit.org/show_bug.cgi?id=183097
<rdar://problem/37843816>

Reviewed by Matt Baker.

Update status of properties warnings every time focus moves.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (231376 => 231377)


--- trunk/Source/WebInspectorUI/ChangeLog	2018-05-04 20:48:23 UTC (rev 231376)
+++ trunk/Source/WebInspectorUI/ChangeLog	2018-05-04 20:51:47 UTC (rev 231377)
@@ -1,3 +1,21 @@
+2018-05-04  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
+        https://bugs.webkit.org/show_bug.cgi?id=183097
+        <rdar://problem/37843816>
+
+        Reviewed by Matt Baker.
+
+        Update status of properties warnings every time focus moves.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
+
 2018-05-04  Devin Rousso  <web...@devinrousso.com>
 
         Web Inspector: Styles Redesign: ensure that tabbing through the last section wraps back to the first

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (231376 => 231377)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-05-04 20:48:23 UTC (rev 231376)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-05-04 20:51:47 UTC (rev 231377)
@@ -232,6 +232,11 @@
 
     spreadsheetStylePropertyFocusMoved(propertyView, {direction, willRemoveProperty})
     {
+        this._updatePropertiesStatus();
+
+        if (!direction)
+            return;
+
         let movedFromIndex = this._propertyViews.indexOf(propertyView);
         console.assert(movedFromIndex !== -1, "Property doesn't exist, focusing on a selector as a fallback.");
         if (movedFromIndex === -1) {
@@ -351,13 +356,18 @@
 
     _propertiesChanged(event)
     {
-        if (this.editing && isNaN(this._pendingAddBlankPropertyIndexOffset)) {
-            for (let propertyView of this._propertyViews)
-                propertyView.updateStatus();
-        } else
+        if (this.editing && isNaN(this._pendingAddBlankPropertyIndexOffset))
+            this._updatePropertiesStatus();
+        else
             this.needsLayout();
     }
 
+    _updatePropertiesStatus()
+    {
+        for (let propertyView of this._propertyViews)
+            propertyView.updateStatus();
+    }
+
     _updateStyleLock()
     {
         this.style.locked = this._focused || this._inlineSwatchActive;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (231376 => 231377)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-05-04 20:48:23 UTC (rev 231376)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-05-04 20:51:47 UTC (rev 231377)
@@ -298,6 +298,9 @@
 
         if (textField === this._valueTextField)
             this._renderValue(this._valueElement.textContent);
+
+        if (typeof this._delegate.spreadsheetStylePropertyFocusMoved === "function")
+            this._delegate.spreadsheetStylePropertyFocusMoved(this, {direction: null});
     }
 
     spreadsheetTextFieldDidBackspace(textField)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to