Web Inspector: text inputs should not spellcheck
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jun 2020 19:20:39 +0000 (19:20 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jun 2020 19:20:39 +0000 (19:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=213032
<rdar://problem/64195429>

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WI._handleDeviceSettingsTabBarButtonClicked.showUserAgentInput):
* UserInterface/Views/BoxShadowEditor.js:
(WI.BoxShadowEditor):
* UserInterface/Views/CookiePopover.js:
(WI.CookiePopover.prototype.show.createInputRow):
* UserInterface/Views/EditableDataGridNode.js:
(WI.EditableDataGridNode.prototype.createCellContent):
* UserInterface/Views/InputPopover.js:
(WI.InputPopover.prototype.show):
* UserInterface/Views/ProbeSetDetailsSection.js:
(WI.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createConsoleSettingsView):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Views/BoxShadowEditor.js
Source/WebInspectorUI/UserInterface/Views/CookiePopover.js
Source/WebInspectorUI/UserInterface/Views/EditableDataGridNode.js
Source/WebInspectorUI/UserInterface/Views/InputPopover.js
Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js
Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js

index 7fd35c2..01efe3d 100644 (file)
@@ -1,5 +1,28 @@
 2020-06-10  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: text inputs should not spellcheck
+        https://bugs.webkit.org/show_bug.cgi?id=213032
+        <rdar://problem/64195429>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Main.js:
+        (WI._handleDeviceSettingsTabBarButtonClicked.showUserAgentInput):
+        * UserInterface/Views/BoxShadowEditor.js:
+        (WI.BoxShadowEditor):
+        * UserInterface/Views/CookiePopover.js:
+        (WI.CookiePopover.prototype.show.createInputRow):
+        * UserInterface/Views/EditableDataGridNode.js:
+        (WI.EditableDataGridNode.prototype.createCellContent):
+        * UserInterface/Views/InputPopover.js:
+        (WI.InputPopover.prototype.show):
+        * UserInterface/Views/ProbeSetDetailsSection.js:
+        (WI.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.prototype._createConsoleSettingsView):
+
+2020-06-10  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: XHR request with same URL as main resource will hide the main resource request
         https://bugs.webkit.org/show_bug.cgi?id=212850
         <rdar://problem/33072149>
index 344af52..bc6129d 100644 (file)
@@ -2224,6 +2224,7 @@ WI._handleDeviceSettingsTabBarButtonClicked = function(event)
             return;
 
         userAgentValueInput = userAgentValue.appendChild(document.createElement("input"));
+        userAgentValueInput.spellcheck = false;
         userAgentValueInput.value = userAgentValueInput.placeholder = WI._overridenDeviceUserAgent || navigator.userAgent;
         userAgentValueInput.addEventListener("click", (clickEvent) => {
             clickEvent.preventDefault();
index 9fe9db7..b12f024 100644 (file)
@@ -66,7 +66,7 @@ WI.BoxShadowEditor = class BoxShadowEditor extends WI.Object
         let offsetXRow = createInputRow("offset-x", WI.UIString("Offset X", "Offset X @ Box Shadow Editor", "Input label for the x-axis of the offset of a CSS box shadow"));
 
         this._offsetXInput = offsetXRow.inputElement;
-        this._offsetXInput.type = "text"
+        this._offsetXInput.spellcheck = false;
         this._offsetXInput.addEventListener("input", this._handleOffsetXInputInput.bind(this));
         this._offsetXInput.addEventListener("keydown", this._handleOffsetXInputKeyDown.bind(this));
 
@@ -113,7 +113,7 @@ WI.BoxShadowEditor = class BoxShadowEditor extends WI.Object
         let offsetYRow = createInputRow("offset-y", WI.UIString("Offset Y", "Offset Y @ Box Shadow Editor", "Input label for the y-axis of the offset of a CSS box shadow"));
 
         this._offsetYInput = offsetYRow.inputElement;
-        this._offsetYInput.type = "text"
+        this._offsetYInput.spellcheck = false;
         this._offsetYInput.addEventListener("input", this._handleOffsetYInputInput.bind(this));
         this._offsetYInput.addEventListener("keydown", this._handleOffsetYInputKeyDown.bind(this));
 
@@ -126,7 +126,7 @@ WI.BoxShadowEditor = class BoxShadowEditor extends WI.Object
         let blurRadiusRow = createInputRow("blur-radius", WI.UIString("Blur", "Blur @ Box Shadow Editor", "Input label for the blur radius of a CSS box shadow"));
 
         this._blurRadiusInput = blurRadiusRow.inputElement;
-        this._blurRadiusInput.type = "text"
+        this._blurRadiusInput.spellcheck = false;
         this._blurRadiusInput.addEventListener("input", this._handleBlurRadiusInputInput.bind(this));
         this._blurRadiusInput.addEventListener("keydown", this._handleBlurRadiusInputKeyDown.bind(this));
         this._blurRadiusInput.min = 0;
@@ -137,7 +137,7 @@ WI.BoxShadowEditor = class BoxShadowEditor extends WI.Object
         let spreadRadiusRow = createInputRow("spread-radius", WI.UIString("Spread", "Spread @ Box Shadow Editor", "Input label for the spread radius of a CSS box shadow"));
 
         this._spreadRadiusInput = spreadRadiusRow.inputElement;
-        this._spreadRadiusInput.type = "text"
+        this._spreadRadiusInput.spellcheck = false;
         this._spreadRadiusInput.addEventListener("input", this._handleSpreadRadiusInputInput.bind(this));
         this._spreadRadiusInput.addEventListener("keydown", this._handleSpreadRadiusInputKeyDown.bind(this));
 
index 0352f94..4186634 100644 (file)
@@ -174,6 +174,7 @@ WI.CookiePopover = class CookiePopover extends WI.Popover
                 if (cookie)
                     inputElement.value = value;
                 inputElement.placeholder = value;
+                inputElement.spellcheck = false;
                 inputElement.addEventListener("keydown", boundHandleInputKeyDown);
             }
 
index 38ee5c2..2fbcf3c 100644 (file)
@@ -46,6 +46,7 @@ WI.EditableDataGridNode = class EditableDataGridNode extends WI.DataGridNode
             return content;
 
         let inputElement = document.createElement("input");
+        inputElement.spellcheck = false;
         inputElement.value = content;
         inputElement.addEventListener("keypress", this._handleKeyPress.bind(this, columnIdentifier));
         inputElement.addEventListener("blur", this._handleBlur.bind(this, columnIdentifier));
index 2f9d6d0..01a31ee 100644 (file)
@@ -58,7 +58,7 @@ WI.InputPopover = class InputPopover extends WI.Popover
         }
 
         this._inputElement = document.createElement("input");
-        this._inputElement.type = "text";
+        this._inputElement.spellcheck = false;
 
         this._inputElement.addEventListener("keydown", (event) => {
             if (!isEnterKey(event))
index efa1a9c..837737c 100644 (file)
@@ -129,7 +129,7 @@ WI.ProbeSetDetailsSection = class ProbeSetDetailsSection extends WI.DetailsSecti
         let textBox = content.createChild("input");
         textBox.addEventListener("keypress", createProbeFromEnteredExpression.bind(this, popover));
         textBox.addEventListener("click", function (event) { event.target.select(); });
-        textBox.type = "text";
+        textBox.spellcheck = false;
         textBox.placeholder = WI.UIString("Expression");
         popover.content = content;
         let target = WI.Rect.rectFromClientRect(event.target.element.getBoundingClientRect());
index 92df7af..02f43b0 100644 (file)
@@ -316,7 +316,7 @@ WI.SettingsTabContentView = class SettingsTabContentView extends WI.TabContentVi
             let consoleSavedResultAliasEditor = consoleSettingsView.addGroupWithCustomEditor(WI.UIString("Saved Result Alias:"));
 
             let consoleSavedResultAliasInput = consoleSavedResultAliasEditor.appendChild(document.createElement("input"));
-            consoleSavedResultAliasInput.type = "text";
+            consoleSavedResultAliasInput.spellcheck = false;
             consoleSavedResultAliasInput.value = WI.settings.consoleSavedResultAlias.value;
             consoleSavedResultAliasInput.placeholder = WI.unlocalizedString("$");
             consoleSavedResultAliasInput.addEventListener("keydown", (event) => {