Web Inspector: Styles: remove harmless "property was unlocked" asserts
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 11:18:03 +0000 (11:18 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 11:18:03 +0000 (11:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194262

Reviewed by Matt Baker.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.remove):
(WI.SpreadsheetStyleProperty.prototype.update):
(WI.SpreadsheetStyleProperty.prototype._handleNameChange):
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

index db9d66d..d9f2480 100644 (file)
@@ -1,3 +1,16 @@
+2019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Styles: remove harmless "property was unlocked" asserts
+        https://bugs.webkit.org/show_bug.cgi?id=194262
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        (WI.SpreadsheetStyleProperty.prototype.remove):
+        (WI.SpreadsheetStyleProperty.prototype.update):
+        (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
+        (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
+
 2019-02-04  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'classes.includes')
index b5eb8d1..af6c069 100644 (file)
@@ -131,7 +131,6 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object
 
     remove(replacement = null)
     {
-        console.assert(this._property.ownerStyle.locked, `Removed property was unlocked (${this._property.name})`);
         this.element.remove();
 
         if (replacement)
@@ -156,7 +155,6 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object
             this._checkboxElement.checked = this._property.enabled;
             this._checkboxElement.tabIndex = -1;
             this._checkboxElement.addEventListener("click", (event) => {
-                console.assert(this._property.ownerStyle.locked, `Toggled property was unlocked (${this._property.name})`);
                 event.stopPropagation();
                 let disabled = !this._checkboxElement.checked;
                 this._property.commentOut(disabled);
@@ -676,15 +674,11 @@ WI.SpreadsheetStyleProperty = class SpreadsheetStyleProperty extends WI.Object
 
     _handleNameChange()
     {
-        console.assert(this._property.ownerStyle.locked, `Modified property was unlocked (${this._property.name})`);
-
         this._property.name = this._nameElement.textContent.trim();
     }
 
     _handleValueChange()
     {
-        console.assert(this._property.ownerStyle.locked, `Modified property was unlocked (${this._property.name})`);
-
         this._property.rawValue = this._valueElement.textContent.trim();
     }