WebKit Bugzilla
Attachment 347943 Details for
Bug 188878
: [iOS] Support the inputmode attribute on contenteditable elements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188878-20180823114903.patch (text/plain), 74.96 KB, created by
Aditya Keerthi
on 2018-08-23 11:49:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aditya Keerthi
Created:
2018-08-23 11:49:04 PDT
Size:
74.96 KB
patch
obsolete
>Subversion Revision: 235210 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 552c69fa9884a3b9cd5979d16bd5c9150ac5efc0..a5b26301178db0cbec60bc287d22e25ab0535d74 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,44 @@ >+2018-08-23 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Support the inputmode attribute on contenteditable elements >+ https://bugs.webkit.org/show_bug.cgi?id=188878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The inputmode attribute should apply to contenteditable elements, in addition to >+ textfield inputs and textareas. >+ >+ Moved the inputmode attribute from HTMLInputElement.idl and >+ HTMLTextAreaElement.idl to HTMLElement.idl to reflect the specification. >+ >+ Also moved all logic to convert between the InputMode enum and string values >+ into InputMode.cpp to avoid exposing unnecessary details to WebKit. Furthermore, >+ InputMode::Auto was renamed to InputMode::Unspecified to avoid confusion with the >+ specification. >+ >+ Spec: https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute >+ >+ Tests: fast/forms/inputmode-attribute-contenteditable.html >+ fast/forms/inputmode-attribute-input.html >+ fast/forms/inputmode-attribute-textarea.html >+ >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * html/HTMLElement.cpp: >+ (WebCore::HTMLElement::canonicalInputMode const): >+ (WebCore::HTMLElement::inputMode const): >+ (WebCore::HTMLElement::setInputMode): >+ * html/HTMLElement.h: >+ * html/HTMLElement.idl: >+ * html/HTMLInputElement.idl: >+ * html/HTMLTextAreaElement.idl: >+ * html/HTMLTextFormControlElement.cpp: >+ * html/HTMLTextFormControlElement.h: >+ * html/InputMode.cpp: Renamed from Source/WebCore/html/InputModeNames.cpp. >+ (WebCore::inputModeForAttributeValue): >+ (WebCore::stringForInputMode): >+ * html/InputMode.h: Renamed from Source/WebCore/html/InputModeNames.h. >+ > 2018-08-22 Jiewen Tan <jiewen_tan@apple.com> > > Unreviewed, update "Web Authentication" from "Under Consideration" to "In Development" >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e857b72aa61132c923759670008bc2529f8deb25..da920774d35642b85a7c546e7d9ceeb5423d14a1 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-08-23 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Support the inputmode attribute on contenteditable elements >+ https://bugs.webkit.org/show_bug.cgi?id=188878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Ensured that the assistedNodeInformation for a contenteditable element reflects >+ the value of the element's inputmode attribute. >+ >+ Moved logic to obtain the InputMode from the attribute value into WebCore. >+ >+ * Shared/AssistedNodeInformation.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::getAssistedNodeInformation): >+ > 2018-08-22 John Wilander <wilander@apple.com> > > The Storage Access API prompt should show the eTLD+1s, not the full host names >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 819a5d298aab733f6795d67b606cb08417669a18..5ea1925d8aa19207d31a7a4e4f8df928ac5b5ca6 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1056,7 +1056,7 @@ html/ImageBitmap.cpp > html/ImageData.cpp > html/ImageDocument.cpp > html/ImageInputType.cpp >-html/InputModeNames.cpp >+html/InputMode.cpp > html/InputType.cpp > html/InputTypeNames.cpp > html/LabelableElement.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index b0c2b0cd15a0f224cb09906b2290cae16eda4b6c..d306a6394054fa4a50b998685c09a41b9694ef68 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -4790,7 +4790,7 @@ > E517670320B88C1400D41167 /* DataListSuggestionInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = E517670220B88C1400D41167 /* DataListSuggestionInformation.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E52CF54D20A268AC00DADA27 /* DataListSuggestionsClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E52CF54C20A268AC00DADA27 /* DataListSuggestionsClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E52CF54F20A35A2800DADA27 /* DataListSuggestionPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = E52CF54E20A35A2800DADA27 /* DataListSuggestionPicker.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- E52EFDF42112875A00AD282A /* InputModeNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E52EFDF22112875A00AD282A /* InputModeNames.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ E52EFDF42112875A00AD282A /* InputMode.h in Headers */ = {isa = PBXBuildFile; fileRef = E52EFDF22112875A00AD282A /* InputMode.h */; settings = {ATTRIBUTES = (Private, ); }; }; > E58B45BA20AD07DD00991025 /* DataListButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E58B45B820AD07DD00991025 /* DataListButtonElement.h */; }; > E58B45BB20AD07DD00991025 /* DataListButtonElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E58B45B920AD07DD00991025 /* DataListButtonElement.cpp */; }; > E59DD4B821098287003C8B47 /* ListButtonArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = E59DD4B721098285003C8B47 /* ListButtonArrow.png */; }; >@@ -14435,8 +14435,8 @@ > E526AF3E1727F8F200E41781 /* Performance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Performance.cpp; sourceTree = "<group>"; }; > E52CF54C20A268AC00DADA27 /* DataListSuggestionsClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListSuggestionsClient.h; sourceTree = "<group>"; }; > E52CF54E20A35A2800DADA27 /* DataListSuggestionPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListSuggestionPicker.h; sourceTree = "<group>"; }; >- E52EFDF22112875A00AD282A /* InputModeNames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputModeNames.h; sourceTree = "<group>"; }; >- E52EFDF32112875A00AD282A /* InputModeNames.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InputModeNames.cpp; sourceTree = "<group>"; }; >+ E52EFDF22112875A00AD282A /* InputMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputMode.h; sourceTree = "<group>"; }; >+ E52EFDF32112875A00AD282A /* InputMode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InputMode.cpp; sourceTree = "<group>"; }; > E55F4979151B888000BB67DB /* LengthFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthFunctions.cpp; sourceTree = "<group>"; }; > E58B45B820AD07DD00991025 /* DataListButtonElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListButtonElement.h; sourceTree = "<group>"; }; > E58B45B920AD07DD00991025 /* DataListButtonElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DataListButtonElement.cpp; sourceTree = "<group>"; }; >@@ -20636,8 +20636,8 @@ > 97205AB21239291000B17380 /* ImageDocument.h */, > F55B3D8D1251F12D003EF269 /* ImageInputType.cpp */, > F55B3D8E1251F12D003EF269 /* ImageInputType.h */, >- E52EFDF32112875A00AD282A /* InputModeNames.cpp */, >- E52EFDF22112875A00AD282A /* InputModeNames.h */, >+ E52EFDF32112875A00AD282A /* InputMode.cpp */, >+ E52EFDF22112875A00AD282A /* InputMode.h */, > 37E3524A12450C5200BAF5D9 /* InputType.cpp */, > 37E3524C12450C6600BAF5D9 /* InputType.h */, > C348612115FDE21E007A1CC9 /* InputTypeNames.cpp */, >@@ -28269,7 +28269,7 @@ > 1C010701192594DF008A4201 /* InlineTextBoxStyle.h in Headers */, > 510A58E51BAA40B100C19282 /* InProcessIDBServer.h in Headers */, > 2EB767571DA19BDF003E23B5 /* InputEvent.h in Headers */, >- E52EFDF42112875A00AD282A /* InputModeNames.h in Headers */, >+ E52EFDF42112875A00AD282A /* InputMode.h in Headers */, > 37E3524D12450C6600BAF5D9 /* InputType.h in Headers */, > C348612415FDE21E007A1CC9 /* InputTypeNames.h in Headers */, > 93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */, >diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp >index 0934b1285bc646c08033f3dd7799c3c568309693..8336576bb473121264649bd7dfb2c9bc9efc051a 100644 >--- a/Source/WebCore/html/HTMLElement.cpp >+++ b/Source/WebCore/html/HTMLElement.cpp >@@ -1086,6 +1086,21 @@ void HTMLElement::setAutocorrect(bool autocorrect) > > #endif > >+InputMode HTMLElement::canonicalInputMode() const >+{ >+ return inputModeForAttributeValue(attributeWithoutSynchronization(inputmodeAttr)); >+} >+ >+const AtomicString& HTMLElement::inputMode() const >+{ >+ return stringForInputMode(canonicalInputMode()); >+} >+ >+void HTMLElement::setInputMode(const AtomicString& value) >+{ >+ setAttributeWithoutSynchronization(inputmodeAttr, value); >+} >+ > } // namespace WebCore > > #ifndef NDEBUG >diff --git a/Source/WebCore/html/HTMLElement.h b/Source/WebCore/html/HTMLElement.h >index e598c7890cfc101cb46190407b5e2421a5f90418..b851909f8aaf5da927fc2ddce7d6dfc0705287b9 100644 >--- a/Source/WebCore/html/HTMLElement.h >+++ b/Source/WebCore/html/HTMLElement.h >@@ -26,6 +26,7 @@ > #include "Autocapitalize.h" > #endif > >+#include "InputMode.h" > #include "StyledElement.h" > > namespace WebCore { >@@ -107,6 +108,10 @@ public: > WEBCORE_EXPORT void setAutocorrect(bool); > #endif > >+ WEBCORE_EXPORT InputMode canonicalInputMode() const; >+ const AtomicString& inputMode() const; >+ void setInputMode(const AtomicString& value); >+ > protected: > HTMLElement(const QualifiedName& tagName, Document&, ConstructionType); > >diff --git a/Source/WebCore/html/HTMLElement.idl b/Source/WebCore/html/HTMLElement.idl >index c94e9eb694ea7abb3f0164e8ee6c527525cbdcef..077e6ac3dfc943d97270292c3bfd5b214497ca19 100644 >--- a/Source/WebCore/html/HTMLElement.idl >+++ b/Source/WebCore/html/HTMLElement.idl >@@ -67,6 +67,8 @@ > > // FIXME: We are the only browser to support this now that Blink dropped it (http://crbug.com/688943). > [CEReactions, Reflect] attribute DOMString webkitdropzone; >+ >+ attribute DOMString inputMode; > }; > > HTMLElement implements ElementCSSInlineStyle; >diff --git a/Source/WebCore/html/HTMLInputElement.idl b/Source/WebCore/html/HTMLInputElement.idl >index b06f9c4756f7d515533073447409f7b7beff52a9..e9658294f101badd4b744105e1d1d2dd6e29a150 100644 >--- a/Source/WebCore/html/HTMLInputElement.idl >+++ b/Source/WebCore/html/HTMLInputElement.idl >@@ -42,7 +42,6 @@ > [Reflect] attribute DOMString formTarget; > attribute unsigned long height; > attribute boolean indeterminate; >- attribute DOMString inputMode; > [Conditional=DATALIST_ELEMENT] readonly attribute HTMLElement list; > [Reflect] attribute DOMString max; > attribute long minLength; >diff --git a/Source/WebCore/html/HTMLTextAreaElement.idl b/Source/WebCore/html/HTMLTextAreaElement.idl >index bda362abf3e9b399783d4ce389545e266dff82a5..b8540165275e1cd3774583a4b7c7a67d81b22b93 100644 >--- a/Source/WebCore/html/HTMLTextAreaElement.idl >+++ b/Source/WebCore/html/HTMLTextAreaElement.idl >@@ -59,5 +59,4 @@ interface HTMLTextAreaElement : HTMLElement { > void setSelectionRange(optional long start = 0, optional long end = 0, optional DOMString direction); > > attribute DOMString autocomplete; >- attribute DOMString inputMode; > }; >diff --git a/Source/WebCore/html/HTMLTextFormControlElement.cpp b/Source/WebCore/html/HTMLTextFormControlElement.cpp >index 033268a39e3d66bf0f02ce9c6efc64a7fc7be694..94eab766e26785999adf1d200841dd88b9ef6cbb 100644 >--- a/Source/WebCore/html/HTMLTextFormControlElement.cpp >+++ b/Source/WebCore/html/HTMLTextFormControlElement.cpp >@@ -39,7 +39,6 @@ > #include "HTMLInputElement.h" > #include "HTMLNames.h" > #include "HTMLParserIdioms.h" >-#include "InputModeNames.h" > #include "LayoutDisallowedScope.h" > #include "Logging.h" > #include "NodeTraversal.h" >@@ -675,32 +674,6 @@ void HTMLTextFormControlElement::showPlaceholderIfNecessary() > } > #endif > >-String HTMLTextFormControlElement::inputMode() const >-{ >- const AtomicString& inputMode = attributeWithoutSynchronization(inputmodeAttr); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::text())) >- return InputModeNames::text(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::tel())) >- return InputModeNames::tel(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::url())) >- return InputModeNames::url(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::email())) >- return InputModeNames::email(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::numeric())) >- return InputModeNames::numeric(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::decimal())) >- return InputModeNames::decimal(); >- if (equalIgnoringASCIICase(inputMode, InputModeNames::search())) >- return InputModeNames::search(); >- >- return emptyString(); >-} >- >-void HTMLTextFormControlElement::setInputMode(const String& value) >-{ >- setAttributeWithoutSynchronization(inputmodeAttr, value); >-} >- > static void getNextSoftBreak(RootInlineBox*& line, Node*& breakNode, unsigned& breakOffset) > { > RootInlineBox* next; >diff --git a/Source/WebCore/html/HTMLTextFormControlElement.h b/Source/WebCore/html/HTMLTextFormControlElement.h >index 7eac0b6c1478062b8ed70b8a136b4d874c0791af..c320f2fe993d81a423cc599363fb3b33d1cc05fc 100644 >--- a/Source/WebCore/html/HTMLTextFormControlElement.h >+++ b/Source/WebCore/html/HTMLTextFormControlElement.h >@@ -98,9 +98,6 @@ public: > WEBCORE_EXPORT void showPlaceholderIfNecessary(); > #endif > >- WEBCORE_EXPORT String inputMode() const; >- void setInputMode(const String&); >- > protected: > HTMLTextFormControlElement(const QualifiedName&, Document&, HTMLFormElement*); > bool isPlaceholderEmpty() const; >diff --git a/Source/WebCore/html/InputMode.cpp b/Source/WebCore/html/InputMode.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..39d67eef071fbcbfcedb0d883940e7007c4369f4 >--- /dev/null >+++ b/Source/WebCore/html/InputMode.cpp >@@ -0,0 +1,121 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "InputMode.h" >+ >+#include <wtf/NeverDestroyed.h> >+ >+namespace WebCore { >+ >+InputMode inputModeForAttributeValue(const AtomicString& value) >+{ >+ if (equalIgnoringASCIICase(value, InputModeNames::text())) >+ return InputMode::Text; >+ if (equalIgnoringASCIICase(value, InputModeNames::tel())) >+ return InputMode::Telephone; >+ if (equalIgnoringASCIICase(value, InputModeNames::url())) >+ return InputMode::Url; >+ if (equalIgnoringASCIICase(value, InputModeNames::email())) >+ return InputMode::Email; >+ if (equalIgnoringASCIICase(value, InputModeNames::numeric())) >+ return InputMode::Numeric; >+ if (equalIgnoringASCIICase(value, InputModeNames::decimal())) >+ return InputMode::Decimal; >+ if (equalIgnoringASCIICase(value, InputModeNames::search())) >+ return InputMode::Search; >+ >+ return InputMode::Unspecified; >+} >+ >+const AtomicString& stringForInputMode(InputMode mode) >+{ >+ switch (mode) { >+ case InputMode::Unspecified: >+ return emptyAtom(); >+ case InputMode::Text: >+ return InputModeNames::text(); >+ case InputMode::Telephone: >+ return InputModeNames::tel(); >+ case InputMode::Url: >+ return InputModeNames::url(); >+ case InputMode::Email: >+ return InputModeNames::email(); >+ case InputMode::Numeric: >+ return InputModeNames::numeric(); >+ case InputMode::Decimal: >+ return InputModeNames::decimal(); >+ case InputMode::Search: >+ return InputModeNames::search(); >+ } >+} >+ >+namespace InputModeNames { >+ >+const AtomicString& text() >+{ >+ static NeverDestroyed<AtomicString> mode("text", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& tel() >+{ >+ static NeverDestroyed<AtomicString> mode("tel", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& url() >+{ >+ static NeverDestroyed<AtomicString> mode("url", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& email() >+{ >+ static NeverDestroyed<AtomicString> mode("email", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& numeric() >+{ >+ static NeverDestroyed<AtomicString> mode("numeric", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& decimal() >+{ >+ static NeverDestroyed<AtomicString> mode("decimal", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+const AtomicString& search() >+{ >+ static NeverDestroyed<AtomicString> mode("search", AtomicString::ConstructFromLiteral); >+ return mode; >+} >+ >+} // namespace InputModeNames >+ >+} // namespace WebCore >diff --git a/Source/WebCore/html/InputMode.h b/Source/WebCore/html/InputMode.h >new file mode 100644 >index 0000000000000000000000000000000000000000..0455594245adf1aeeaf8a18879ee9286dfde7b6c >--- /dev/null >+++ b/Source/WebCore/html/InputMode.h >@@ -0,0 +1,58 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <wtf/text/AtomicString.h> >+ >+namespace WebCore { >+ >+enum class InputMode : uint8_t { >+ Unspecified, >+ Text, >+ Telephone, >+ Url, >+ Email, >+ Numeric, >+ Decimal, >+ Search >+}; >+ >+InputMode inputModeForAttributeValue(const AtomicString&); >+const AtomicString& stringForInputMode(InputMode); >+ >+namespace InputModeNames { >+ >+const AtomicString& text(); >+const AtomicString& tel(); >+const AtomicString& url(); >+const AtomicString& email(); >+const AtomicString& numeric(); >+const AtomicString& decimal(); >+const AtomicString& search(); >+ >+} // namespace InputModeNames >+ >+} // namespace WebCore >diff --git a/Source/WebCore/html/InputModeNames.cpp b/Source/WebCore/html/InputModeNames.cpp >deleted file mode 100644 >index 61c9870773fa741ea6b065476838431681a5319d..0000000000000000000000000000000000000000 >--- a/Source/WebCore/html/InputModeNames.cpp >+++ /dev/null >@@ -1,79 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "InputModeNames.h" >- >-#include <wtf/NeverDestroyed.h> >- >-namespace WebCore { >- >-namespace InputModeNames { >- >-const AtomicString& text() >-{ >- static NeverDestroyed<AtomicString> mode("text", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& tel() >-{ >- static NeverDestroyed<AtomicString> mode("tel", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& url() >-{ >- static NeverDestroyed<AtomicString> mode("url", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& email() >-{ >- static NeverDestroyed<AtomicString> mode("email", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& numeric() >-{ >- static NeverDestroyed<AtomicString> mode("numeric", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& decimal() >-{ >- static NeverDestroyed<AtomicString> mode("decimal", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-const AtomicString& search() >-{ >- static NeverDestroyed<AtomicString> mode("search", AtomicString::ConstructFromLiteral); >- return mode; >-} >- >-} // namespace InputModeNames >- >-} // namespace WebCore >diff --git a/Source/WebCore/html/InputModeNames.h b/Source/WebCore/html/InputModeNames.h >deleted file mode 100644 >index caa259dc3859a35fd72af1b0394d9eb222523e61..0000000000000000000000000000000000000000 >--- a/Source/WebCore/html/InputModeNames.h >+++ /dev/null >@@ -1,44 +0,0 @@ >-/* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#include <wtf/text/AtomicString.h> >- >-namespace WebCore { >- >-namespace InputModeNames { >- >-WEBCORE_EXPORT const AtomicString& text(); >-WEBCORE_EXPORT const AtomicString& tel(); >-WEBCORE_EXPORT const AtomicString& url(); >-WEBCORE_EXPORT const AtomicString& email(); >-WEBCORE_EXPORT const AtomicString& numeric(); >-WEBCORE_EXPORT const AtomicString& decimal(); >-WEBCORE_EXPORT const AtomicString& search(); >- >-} // namespace InputModeNames >- >-} // namespace WebCore >diff --git a/Source/WebKit/Shared/AssistedNodeInformation.h b/Source/WebKit/Shared/AssistedNodeInformation.h >index 0bc8fd3537b03a9eb2774ae6bc63da8183f1bcb7..66716d4032911e1f1d73a039859a9663712248dd 100644 >--- a/Source/WebKit/Shared/AssistedNodeInformation.h >+++ b/Source/WebKit/Shared/AssistedNodeInformation.h >@@ -29,6 +29,7 @@ > #include <WebCore/AutocapitalizeTypes.h> > #include <WebCore/Autofill.h> > #include <WebCore/Color.h> >+#include <WebCore/InputMode.h> > #include <WebCore/IntRect.h> > #include <WebCore/URL.h> > #include <wtf/text/WTFString.h> >@@ -59,17 +60,6 @@ enum class InputType { > #endif > }; > >-enum class InputMode : uint8_t { >- Auto, >- Text, >- Telephone, >- Url, >- Email, >- Numeric, >- Decimal, >- Search >-}; >- > #if PLATFORM(IOS) > struct OptionItem { > OptionItem() { } >@@ -121,7 +111,7 @@ struct AssistedNodeInformation { > bool insideFixedPosition { false }; > AutocapitalizeType autocapitalizeType { AutocapitalizeTypeDefault }; > InputType elementType { InputType::None }; >- InputMode inputMode { InputMode::Auto }; >+ WebCore::InputMode inputMode { WebCore::InputMode::Unspecified }; > String formAction; > Vector<OptionItem> selectOptions; > int selectedIndex { -1 }; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index d68f8b7eacfde092169a9dde1c00e5b1b17e7b80..f75c13b04515024fd689eaabe6de44e0a830766d 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -75,6 +75,7 @@ > #import <WebCore/Color.h> > #import <WebCore/DataDetection.h> > #import <WebCore/FloatQuad.h> >+#import <WebCore/InputMode.h> > #import <WebCore/LocalizedStrings.h> > #import <WebCore/NotImplemented.h> > #import <WebCore/Pasteboard.h> >@@ -3548,7 +3549,7 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName) > } > > switch (_assistedNodeInformation.inputMode) { >- case InputMode::Auto: >+ case InputMode::Unspecified: > switch (_assistedNodeInformation.elementType) { > case InputType::Phone: > [_traits setKeyboardType:UIKeyboardTypePhonePad]; >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 973a04a65c4dd8c226d354248a2d07e1f575379b..ae58e0904e8d4db9a95856d623f00205e5d8e12e 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -87,7 +87,7 @@ > #import <WebCore/HTMLTextFormControlElement.h> > #import <WebCore/HistoryItem.h> > #import <WebCore/HitTestResult.h> >-#import <WebCore/InputModeNames.h> >+#import <WebCore/InputMode.h> > #import <WebCore/KeyboardEvent.h> > #import <WebCore/LibWebRTCProvider.h> > #import <WebCore/MediaSessionManagerIOS.h> >@@ -2314,27 +2314,6 @@ static IntRect elementRectInRootViewCoordinates(const Node& node, const Frame& f > return view->contentsToRootView(renderer->absoluteBoundingBoxRect()); > } > >-static InputMode inputModeForAssistedNode(const Node& node) >-{ >- const AtomicString& inputMode = downcast<HTMLTextFormControlElement>(node).inputMode(); >- if (inputMode == InputModeNames::text()) >- return InputMode::Text; >- if (inputMode == InputModeNames::tel()) >- return InputMode::Telephone; >- if (inputMode == InputModeNames::url()) >- return InputMode::Url; >- if (inputMode == InputModeNames::email()) >- return InputMode::Email; >- if (inputMode == InputModeNames::numeric()) >- return InputMode::Numeric; >- if (inputMode == InputModeNames::decimal()) >- return InputMode::Decimal; >- if (inputMode == InputModeNames::search()) >- return InputMode::Search; >- >- return InputMode::Auto; >-} >- > void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) > { > layoutIfNeeded(); >@@ -2440,7 +2419,7 @@ void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) > information.value = element.value(); > information.autofillFieldName = WebCore::toAutofillFieldName(element.autofillData().fieldName); > information.placeholder = element.attributeWithoutSynchronization(HTMLNames::placeholderAttr); >- information.inputMode = inputModeForAssistedNode(element); >+ information.inputMode = element.canonicalInputMode(); > } else if (is<HTMLInputElement>(*m_assistedNode)) { > HTMLInputElement& element = downcast<HTMLInputElement>(*m_assistedNode); > HTMLFormElement* form = element.form(); >@@ -2498,7 +2477,7 @@ void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) > } > #endif > >- information.inputMode = inputModeForAssistedNode(element); >+ information.inputMode = element.canonicalInputMode(); > information.isReadOnly = element.isReadOnly(); > information.value = element.value(); > information.valueAsNumber = element.valueAsNumber(); >@@ -2509,6 +2488,7 @@ void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information) > auto& assistedElement = downcast<HTMLElement>(*m_assistedNode); > information.isAutocorrect = assistedElement.shouldAutocorrect(); > information.autocapitalizeType = assistedElement.autocapitalizeType(); >+ information.inputMode = assistedElement.canonicalInputMode(); > } else { > information.isAutocorrect = true; > information.autocapitalizeType = AutocapitalizeTypeDefault; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 51bfbdad17960e9460893fc02de1c30da096a6be..b8fd31c16b6ce67758ae2848e7a09eeec1e0ff97 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,21 @@ >+2018-08-23 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Support the inputmode attribute on contenteditable elements >+ https://bugs.webkit.org/show_bug.cgi?id=188878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added additional tests to verify the inputmode attribute is accessible on >+ HTMLElements. >+ >+ * fast/forms/inputmode-attribute-contenteditable-expected.txt: Added. >+ * fast/forms/inputmode-attribute-contenteditable.html: Added. >+ * fast/forms/inputmode-attribute-input-expected.txt: Renamed from LayoutTests/fast/forms/inputmode-attribute-expected.txt. >+ * fast/forms/inputmode-attribute-input.html: Renamed from LayoutTests/fast/forms/inputmode-attribute.html. >+ * fast/forms/inputmode-attribute-textarea-expected.txt: Added. >+ * fast/forms/inputmode-attribute-textarea.html: Added. >+ * js/dom/dom-static-property-for-in-iteration-expected.txt: Rebaseline. >+ > 2018-08-22 John Wilander <wilander@apple.com> > > Further adjustments to http/tests/websocket/connection-refusal-in-frame-resource-load-statistics.html >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 1d3d3707bbca0f57f27c3ca2588a9532e84c66f0..26e1a4d46204864628d6ec4ce46c2e9305b42c81 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,12 @@ >+2018-08-23 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Support the inputmode attribute on contenteditable elements >+ https://bugs.webkit.org/show_bug.cgi?id=188878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * web-platform-tests/html/dom/reflection-misc-expected.txt: Rebaseline. >+ > 2018-08-22 Rob Buis <rbuis@igalia.com> > > Fetch: Stop checking Request.integrity's value in no-cors mode >diff --git a/LayoutTests/fast/forms/inputmode-attribute-contenteditable-expected.txt b/LayoutTests/fast/forms/inputmode-attribute-contenteditable-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0cfb945c9809936f0288379c55d55617e68a1522 >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-contenteditable-expected.txt >@@ -0,0 +1,43 @@ >+Test inputmode attribute on contenteditable element >+ >+Missing value default: >+PASS editor.inputMode is "" >+PASS editor.getAttribute("inputmode") is null >+ >+Invalid value default: >+PASS editor.inputMode = "foobar"; editor.inputMode is "" >+PASS editor.getAttribute("inputmode") is "foobar" >+PASS editor.setAttribute("inputmode", "baz"); editor.inputMode is "" >+ >+Valid values: >+PASS editor.inputMode = "text"; editor.inputMode is "text" >+PASS editor.getAttribute("inputmode") is "text" >+PASS editor.setAttribute("inputmode", "text"); editor.inputMode is "text" >+PASS editor.inputMode = "tel"; editor.inputMode is "tel" >+PASS editor.getAttribute("inputmode") is "tel" >+PASS editor.setAttribute("inputmode", "tel"); editor.inputMode is "tel" >+PASS editor.inputMode = "url"; editor.inputMode is "url" >+PASS editor.getAttribute("inputmode") is "url" >+PASS editor.setAttribute("inputmode", "url"); editor.inputMode is "url" >+PASS editor.inputMode = "email"; editor.inputMode is "email" >+PASS editor.getAttribute("inputmode") is "email" >+PASS editor.setAttribute("inputmode", "email"); editor.inputMode is "email" >+PASS editor.inputMode = "numeric"; editor.inputMode is "numeric" >+PASS editor.getAttribute("inputmode") is "numeric" >+PASS editor.setAttribute("inputmode", "numeric"); editor.inputMode is "numeric" >+PASS editor.inputMode = "decimal"; editor.inputMode is "decimal" >+PASS editor.getAttribute("inputmode") is "decimal" >+PASS editor.setAttribute("inputmode", "decimal"); editor.inputMode is "decimal" >+PASS editor.inputMode = "search"; editor.inputMode is "search" >+PASS editor.getAttribute("inputmode") is "search" >+PASS editor.setAttribute("inputmode", "search"); editor.inputMode is "search" >+ >+Valid case-insensitive values: >+PASS editor.inputMode = "tExt"; editor.inputMode is "text" >+PASS editor.getAttribute("inputmode") is "tExt" >+PASS editor.setAttribute("inputmode", "tExt"); editor.inputMode is "text" >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/inputmode-attribute-contenteditable.html b/LayoutTests/fast/forms/inputmode-attribute-contenteditable.html >new file mode 100644 >index 0000000000000000000000000000000000000000..12a6a4963a9915551de22373f6c21811a06d567f >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-contenteditable.html >@@ -0,0 +1,53 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<script src="../../resources/js-test-pre.js"></script> >+<p>Test inputmode attribute on contenteditable element</p> >+<div id=editor contenteditable></div> >+<div id=console></div> >+<script> >+debug('Missing value default:'); >+shouldBe('editor.inputMode', '""'); >+shouldBeNull('editor.getAttribute("inputmode")'); >+ >+debug(''); >+debug('Invalid value default:'); >+shouldBe('editor.inputMode = "foobar"; editor.inputMode', '""'); >+shouldBe('editor.getAttribute("inputmode")', '"foobar"'); >+shouldBe('editor.setAttribute("inputmode", "baz"); editor.inputMode', '""'); >+ >+debug(''); >+debug('Valid values:'); >+shouldBe('editor.inputMode = "text"; editor.inputMode', '"text"'); >+shouldBe('editor.getAttribute("inputmode")', '"text"'); >+shouldBe('editor.setAttribute("inputmode", "text"); editor.inputMode', '"text"'); >+shouldBe('editor.inputMode = "tel"; editor.inputMode', '"tel"'); >+shouldBe('editor.getAttribute("inputmode")', '"tel"'); >+shouldBe('editor.setAttribute("inputmode", "tel"); editor.inputMode', '"tel"'); >+shouldBe('editor.inputMode = "url"; editor.inputMode', '"url"'); >+shouldBe('editor.getAttribute("inputmode")', '"url"'); >+shouldBe('editor.setAttribute("inputmode", "url"); editor.inputMode', '"url"'); >+shouldBe('editor.inputMode = "email"; editor.inputMode', '"email"'); >+shouldBe('editor.getAttribute("inputmode")', '"email"'); >+shouldBe('editor.setAttribute("inputmode", "email"); editor.inputMode', '"email"'); >+shouldBe('editor.inputMode = "numeric"; editor.inputMode', '"numeric"'); >+shouldBe('editor.getAttribute("inputmode")', '"numeric"'); >+shouldBe('editor.setAttribute("inputmode", "numeric"); editor.inputMode', '"numeric"'); >+shouldBe('editor.inputMode = "decimal"; editor.inputMode', '"decimal"'); >+shouldBe('editor.getAttribute("inputmode")', '"decimal"'); >+shouldBe('editor.setAttribute("inputmode", "decimal"); editor.inputMode', '"decimal"'); >+shouldBe('editor.inputMode = "search"; editor.inputMode', '"search"'); >+shouldBe('editor.getAttribute("inputmode")', '"search"'); >+shouldBe('editor.setAttribute("inputmode", "search"); editor.inputMode', '"search"'); >+ >+debug(''); >+debug('Valid case-insensitive values:'); >+shouldBe('editor.inputMode = "tExt"; editor.inputMode', '"text"'); >+shouldBe('editor.getAttribute("inputmode")', '"tExt"'); >+shouldBe('editor.setAttribute("inputmode", "tExt"); editor.inputMode', '"text"'); >+ >+debug(''); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/inputmode-attribute-expected.txt b/LayoutTests/fast/forms/inputmode-attribute-expected.txt >deleted file mode 100644 >index ff2daef1dd5fdd89008e773c1f811cdcf1920f38..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/inputmode-attribute-expected.txt >+++ /dev/null >@@ -1,44 +0,0 @@ >-Test inputmode attribute >- >- >-Missing value default: >-PASS input.inputMode is "" >-PASS input.getAttribute("inputmode") is null >- >-Invalid value default: >-PASS input.inputMode = "foobar"; input.inputMode is "" >-PASS input.getAttribute("inputmode") is "foobar" >-PASS input.setAttribute("inputmode", "baz"); input.inputMode is "" >- >-Valid values: >-PASS input.inputMode = "text"; input.inputMode is "text" >-PASS input.getAttribute("inputmode") is "text" >-PASS input.setAttribute("inputmode", "text"); input.inputMode is "text" >-PASS input.inputMode = "tel"; input.inputMode is "tel" >-PASS input.getAttribute("inputmode") is "tel" >-PASS input.setAttribute("inputmode", "tel"); input.inputMode is "tel" >-PASS input.inputMode = "url"; input.inputMode is "url" >-PASS input.getAttribute("inputmode") is "url" >-PASS input.setAttribute("inputmode", "url"); input.inputMode is "url" >-PASS input.inputMode = "email"; input.inputMode is "email" >-PASS input.getAttribute("inputmode") is "email" >-PASS input.setAttribute("inputmode", "email"); input.inputMode is "email" >-PASS input.inputMode = "numeric"; input.inputMode is "numeric" >-PASS input.getAttribute("inputmode") is "numeric" >-PASS input.setAttribute("inputmode", "numeric"); input.inputMode is "numeric" >-PASS input.inputMode = "decimal"; input.inputMode is "decimal" >-PASS input.getAttribute("inputmode") is "decimal" >-PASS input.setAttribute("inputmode", "decimal"); input.inputMode is "decimal" >-PASS input.inputMode = "search"; input.inputMode is "search" >-PASS input.getAttribute("inputmode") is "search" >-PASS input.setAttribute("inputmode", "search"); input.inputMode is "search" >- >-Valid case-insensitive values: >-PASS input.inputMode = "tExt"; input.inputMode is "text" >-PASS input.getAttribute("inputmode") is "tExt" >-PASS input.setAttribute("inputmode", "tExt"); input.inputMode is "text" >- >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >diff --git a/LayoutTests/fast/forms/inputmode-attribute-input-expected.txt b/LayoutTests/fast/forms/inputmode-attribute-input-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..fcb65c29b7f651eae4ddc69b89856e0589c0be97 >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-input-expected.txt >@@ -0,0 +1,44 @@ >+Test inputmode attribute on input >+ >+ >+Missing value default: >+PASS input.inputMode is "" >+PASS input.getAttribute("inputmode") is null >+ >+Invalid value default: >+PASS input.inputMode = "foobar"; input.inputMode is "" >+PASS input.getAttribute("inputmode") is "foobar" >+PASS input.setAttribute("inputmode", "baz"); input.inputMode is "" >+ >+Valid values: >+PASS input.inputMode = "text"; input.inputMode is "text" >+PASS input.getAttribute("inputmode") is "text" >+PASS input.setAttribute("inputmode", "text"); input.inputMode is "text" >+PASS input.inputMode = "tel"; input.inputMode is "tel" >+PASS input.getAttribute("inputmode") is "tel" >+PASS input.setAttribute("inputmode", "tel"); input.inputMode is "tel" >+PASS input.inputMode = "url"; input.inputMode is "url" >+PASS input.getAttribute("inputmode") is "url" >+PASS input.setAttribute("inputmode", "url"); input.inputMode is "url" >+PASS input.inputMode = "email"; input.inputMode is "email" >+PASS input.getAttribute("inputmode") is "email" >+PASS input.setAttribute("inputmode", "email"); input.inputMode is "email" >+PASS input.inputMode = "numeric"; input.inputMode is "numeric" >+PASS input.getAttribute("inputmode") is "numeric" >+PASS input.setAttribute("inputmode", "numeric"); input.inputMode is "numeric" >+PASS input.inputMode = "decimal"; input.inputMode is "decimal" >+PASS input.getAttribute("inputmode") is "decimal" >+PASS input.setAttribute("inputmode", "decimal"); input.inputMode is "decimal" >+PASS input.inputMode = "search"; input.inputMode is "search" >+PASS input.getAttribute("inputmode") is "search" >+PASS input.setAttribute("inputmode", "search"); input.inputMode is "search" >+ >+Valid case-insensitive values: >+PASS input.inputMode = "tExt"; input.inputMode is "text" >+PASS input.getAttribute("inputmode") is "tExt" >+PASS input.setAttribute("inputmode", "tExt"); input.inputMode is "text" >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/inputmode-attribute-input.html b/LayoutTests/fast/forms/inputmode-attribute-input.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f9ee50630b006e560fa9c7d64e6d5fa731210b61 >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-input.html >@@ -0,0 +1,53 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<script src="../../resources/js-test-pre.js"></script> >+<p>Test inputmode attribute on input</p> >+<input id="input"> >+<div id=console></div> >+<script> >+debug('Missing value default:'); >+shouldBe('input.inputMode', '""'); >+shouldBeNull('input.getAttribute("inputmode")'); >+ >+debug(''); >+debug('Invalid value default:'); >+shouldBe('input.inputMode = "foobar"; input.inputMode', '""'); >+shouldBe('input.getAttribute("inputmode")', '"foobar"'); >+shouldBe('input.setAttribute("inputmode", "baz"); input.inputMode', '""'); >+ >+debug(''); >+debug('Valid values:'); >+shouldBe('input.inputMode = "text"; input.inputMode', '"text"'); >+shouldBe('input.getAttribute("inputmode")', '"text"'); >+shouldBe('input.setAttribute("inputmode", "text"); input.inputMode', '"text"'); >+shouldBe('input.inputMode = "tel"; input.inputMode', '"tel"'); >+shouldBe('input.getAttribute("inputmode")', '"tel"'); >+shouldBe('input.setAttribute("inputmode", "tel"); input.inputMode', '"tel"'); >+shouldBe('input.inputMode = "url"; input.inputMode', '"url"'); >+shouldBe('input.getAttribute("inputmode")', '"url"'); >+shouldBe('input.setAttribute("inputmode", "url"); input.inputMode', '"url"'); >+shouldBe('input.inputMode = "email"; input.inputMode', '"email"'); >+shouldBe('input.getAttribute("inputmode")', '"email"'); >+shouldBe('input.setAttribute("inputmode", "email"); input.inputMode', '"email"'); >+shouldBe('input.inputMode = "numeric"; input.inputMode', '"numeric"'); >+shouldBe('input.getAttribute("inputmode")', '"numeric"'); >+shouldBe('input.setAttribute("inputmode", "numeric"); input.inputMode', '"numeric"'); >+shouldBe('input.inputMode = "decimal"; input.inputMode', '"decimal"'); >+shouldBe('input.getAttribute("inputmode")', '"decimal"'); >+shouldBe('input.setAttribute("inputmode", "decimal"); input.inputMode', '"decimal"'); >+shouldBe('input.inputMode = "search"; input.inputMode', '"search"'); >+shouldBe('input.getAttribute("inputmode")', '"search"'); >+shouldBe('input.setAttribute("inputmode", "search"); input.inputMode', '"search"'); >+ >+debug(''); >+debug('Valid case-insensitive values:'); >+shouldBe('input.inputMode = "tExt"; input.inputMode', '"text"'); >+shouldBe('input.getAttribute("inputmode")', '"tExt"'); >+shouldBe('input.setAttribute("inputmode", "tExt"); input.inputMode', '"text"'); >+ >+debug(''); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/inputmode-attribute-textarea-expected.txt b/LayoutTests/fast/forms/inputmode-attribute-textarea-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..66bc9429e4ac57545c516898ec97d53c3a43a8de >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-textarea-expected.txt >@@ -0,0 +1,44 @@ >+Test inputmode attribute on textarea >+ >+ >+Missing value default: >+PASS textarea.inputMode is "" >+PASS textarea.getAttribute("inputmode") is null >+ >+Invalid value default: >+PASS textarea.inputMode = "foobar"; textarea.inputMode is "" >+PASS textarea.getAttribute("inputmode") is "foobar" >+PASS textarea.setAttribute("inputmode", "baz"); textarea.inputMode is "" >+ >+Valid values: >+PASS textarea.inputMode = "text"; textarea.inputMode is "text" >+PASS textarea.getAttribute("inputmode") is "text" >+PASS textarea.setAttribute("inputmode", "text"); textarea.inputMode is "text" >+PASS textarea.inputMode = "tel"; textarea.inputMode is "tel" >+PASS textarea.getAttribute("inputmode") is "tel" >+PASS textarea.setAttribute("inputmode", "tel"); textarea.inputMode is "tel" >+PASS textarea.inputMode = "url"; textarea.inputMode is "url" >+PASS textarea.getAttribute("inputmode") is "url" >+PASS textarea.setAttribute("inputmode", "url"); textarea.inputMode is "url" >+PASS textarea.inputMode = "email"; textarea.inputMode is "email" >+PASS textarea.getAttribute("inputmode") is "email" >+PASS textarea.setAttribute("inputmode", "email"); textarea.inputMode is "email" >+PASS textarea.inputMode = "numeric"; textarea.inputMode is "numeric" >+PASS textarea.getAttribute("inputmode") is "numeric" >+PASS textarea.setAttribute("inputmode", "numeric"); textarea.inputMode is "numeric" >+PASS textarea.inputMode = "decimal"; textarea.inputMode is "decimal" >+PASS textarea.getAttribute("inputmode") is "decimal" >+PASS textarea.setAttribute("inputmode", "decimal"); textarea.inputMode is "decimal" >+PASS textarea.inputMode = "search"; textarea.inputMode is "search" >+PASS textarea.getAttribute("inputmode") is "search" >+PASS textarea.setAttribute("inputmode", "search"); textarea.inputMode is "search" >+ >+Valid case-insensitive values: >+PASS textarea.inputMode = "tExt"; textarea.inputMode is "text" >+PASS textarea.getAttribute("inputmode") is "tExt" >+PASS textarea.setAttribute("inputmode", "tExt"); textarea.inputMode is "text" >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/forms/inputmode-attribute-textarea.html b/LayoutTests/fast/forms/inputmode-attribute-textarea.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ba1f3ed0ab670c84cb3ba6e134a25bea3182757e >--- /dev/null >+++ b/LayoutTests/fast/forms/inputmode-attribute-textarea.html >@@ -0,0 +1,53 @@ >+<!DOCTYPE html> >+<html> >+<body> >+<script src="../../resources/js-test-pre.js"></script> >+<p>Test inputmode attribute on textarea</p> >+<textarea id="textarea"></textarea> >+<div id=console></div> >+<script> >+debug('Missing value default:'); >+shouldBe('textarea.inputMode', '""'); >+shouldBeNull('textarea.getAttribute("inputmode")'); >+ >+debug(''); >+debug('Invalid value default:'); >+shouldBe('textarea.inputMode = "foobar"; textarea.inputMode', '""'); >+shouldBe('textarea.getAttribute("inputmode")', '"foobar"'); >+shouldBe('textarea.setAttribute("inputmode", "baz"); textarea.inputMode', '""'); >+ >+debug(''); >+debug('Valid values:'); >+shouldBe('textarea.inputMode = "text"; textarea.inputMode', '"text"'); >+shouldBe('textarea.getAttribute("inputmode")', '"text"'); >+shouldBe('textarea.setAttribute("inputmode", "text"); textarea.inputMode', '"text"'); >+shouldBe('textarea.inputMode = "tel"; textarea.inputMode', '"tel"'); >+shouldBe('textarea.getAttribute("inputmode")', '"tel"'); >+shouldBe('textarea.setAttribute("inputmode", "tel"); textarea.inputMode', '"tel"'); >+shouldBe('textarea.inputMode = "url"; textarea.inputMode', '"url"'); >+shouldBe('textarea.getAttribute("inputmode")', '"url"'); >+shouldBe('textarea.setAttribute("inputmode", "url"); textarea.inputMode', '"url"'); >+shouldBe('textarea.inputMode = "email"; textarea.inputMode', '"email"'); >+shouldBe('textarea.getAttribute("inputmode")', '"email"'); >+shouldBe('textarea.setAttribute("inputmode", "email"); textarea.inputMode', '"email"'); >+shouldBe('textarea.inputMode = "numeric"; textarea.inputMode', '"numeric"'); >+shouldBe('textarea.getAttribute("inputmode")', '"numeric"'); >+shouldBe('textarea.setAttribute("inputmode", "numeric"); textarea.inputMode', '"numeric"'); >+shouldBe('textarea.inputMode = "decimal"; textarea.inputMode', '"decimal"'); >+shouldBe('textarea.getAttribute("inputmode")', '"decimal"'); >+shouldBe('textarea.setAttribute("inputmode", "decimal"); textarea.inputMode', '"decimal"'); >+shouldBe('textarea.inputMode = "search"; textarea.inputMode', '"search"'); >+shouldBe('textarea.getAttribute("inputmode")', '"search"'); >+shouldBe('textarea.setAttribute("inputmode", "search"); textarea.inputMode', '"search"'); >+ >+debug(''); >+debug('Valid case-insensitive values:'); >+shouldBe('textarea.inputMode = "tExt"; textarea.inputMode', '"text"'); >+shouldBe('textarea.getAttribute("inputmode")', '"tExt"'); >+shouldBe('textarea.setAttribute("inputmode", "tExt"); textarea.inputMode', '"text"'); >+ >+debug(''); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/inputmode-attribute.html b/LayoutTests/fast/forms/inputmode-attribute.html >deleted file mode 100644 >index 3dd408dcfe0fdfd7303becc58e1f751e3c0cd56a..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/inputmode-attribute.html >+++ /dev/null >@@ -1,53 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<body> >-<script src="../../resources/js-test-pre.js"></script> >-<p>Test inputmode attribute</p> >-<input id="input"> >-<div id=console></div> >-<script> >-debug('Missing value default:'); >-shouldBe('input.inputMode', '""'); >-shouldBeNull('input.getAttribute("inputmode")'); >- >-debug(''); >-debug('Invalid value default:'); >-shouldBe('input.inputMode = "foobar"; input.inputMode', '""'); >-shouldBe('input.getAttribute("inputmode")', '"foobar"'); >-shouldBe('input.setAttribute("inputmode", "baz"); input.inputMode', '""'); >- >-debug(''); >-debug('Valid values:'); >-shouldBe('input.inputMode = "text"; input.inputMode', '"text"'); >-shouldBe('input.getAttribute("inputmode")', '"text"'); >-shouldBe('input.setAttribute("inputmode", "text"); input.inputMode', '"text"'); >-shouldBe('input.inputMode = "tel"; input.inputMode', '"tel"'); >-shouldBe('input.getAttribute("inputmode")', '"tel"'); >-shouldBe('input.setAttribute("inputmode", "tel"); input.inputMode', '"tel"'); >-shouldBe('input.inputMode = "url"; input.inputMode', '"url"'); >-shouldBe('input.getAttribute("inputmode")', '"url"'); >-shouldBe('input.setAttribute("inputmode", "url"); input.inputMode', '"url"'); >-shouldBe('input.inputMode = "email"; input.inputMode', '"email"'); >-shouldBe('input.getAttribute("inputmode")', '"email"'); >-shouldBe('input.setAttribute("inputmode", "email"); input.inputMode', '"email"'); >-shouldBe('input.inputMode = "numeric"; input.inputMode', '"numeric"'); >-shouldBe('input.getAttribute("inputmode")', '"numeric"'); >-shouldBe('input.setAttribute("inputmode", "numeric"); input.inputMode', '"numeric"'); >-shouldBe('input.inputMode = "decimal"; input.inputMode', '"decimal"'); >-shouldBe('input.getAttribute("inputmode")', '"decimal"'); >-shouldBe('input.setAttribute("inputmode", "decimal"); input.inputMode', '"decimal"'); >-shouldBe('input.inputMode = "search"; input.inputMode', '"search"'); >-shouldBe('input.getAttribute("inputmode")', '"search"'); >-shouldBe('input.setAttribute("inputmode", "search"); input.inputMode', '"search"'); >- >-debug(''); >-debug('Valid case-insensitive values:'); >-shouldBe('input.inputMode = "tExt"; input.inputMode', '"text"'); >-shouldBe('input.getAttribute("inputmode")', '"tExt"'); >-shouldBe('input.setAttribute("inputmode", "tExt"); input.inputMode', '"text"'); >- >-debug(''); >-</script> >-<script src="../../resources/js-test-post.js"></script> >-</body> >-</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt >index a3a5485f5cf4c240751c3eccbb17c9d7933ebed8..b2646b850fe503d43f13a758c0087bb578bcc664 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt >@@ -3616,116 +3616,116 @@ PASS undefinedelement.tabIndex: IDL set to 0 > PASS undefinedelement.tabIndex: IDL set to 1 > PASS undefinedelement.tabIndex: IDL set to 2147483647 > PASS undefinedelement.tabIndex: IDL set to -2147483648 >-FAIL undefinedelement.inputMode: typeof IDL attribute assert_equals: expected "string" but got "undefined" >-FAIL undefinedelement.inputMode: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to undefined assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to 7 assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to 1.5 assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to true assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to false assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to object "[object Object]" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to NaN assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to Infinity assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to -Infinity assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to null assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to object "test-toString" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to object "test-valueOf" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "none" assert_equals: IDL get expected (string) "none" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xnone" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "none\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "one" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "NONE" assert_equals: IDL get expected (string) "none" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "text" assert_equals: IDL get expected (string) "text" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xtext" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "text\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "ext" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "TEXT" assert_equals: IDL get expected (string) "text" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "tel" assert_equals: IDL get expected (string) "tel" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xtel" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "tel\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "el" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "TEL" assert_equals: IDL get expected (string) "tel" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "url" assert_equals: IDL get expected (string) "url" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xurl" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "url\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "rl" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "URL" assert_equals: IDL get expected (string) "url" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "email" assert_equals: IDL get expected (string) "email" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xemail" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "email\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "mail" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "EMAIL" assert_equals: IDL get expected (string) "email" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "numeric" assert_equals: IDL get expected (string) "numeric" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xnumeric" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "numeric\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "umeric" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "NUMERIC" assert_equals: IDL get expected (string) "numeric" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "decimal" assert_equals: IDL get expected (string) "decimal" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xdecimal" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "decimal\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "ecimal" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "DECIMAL" assert_equals: IDL get expected (string) "decimal" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "search" assert_equals: IDL get expected (string) "search" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "xsearch" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "search\0" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "earch" assert_equals: IDL get expected (string) "" but got (undefined) undefined >-FAIL undefinedelement.inputMode: setAttribute() to "SEARCH" assert_equals: IDL get expected (string) "search" but got (undefined) undefined >-FAIL undefinedelement.inputMode: IDL set to "" assert_equals: getAttribute() expected "" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " assert_equals: getAttribute() expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to undefined assert_equals: getAttribute() expected "undefined" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to 7 assert_equals: getAttribute() expected "7" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to 1.5 assert_equals: getAttribute() expected "1.5" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to true assert_equals: getAttribute() expected "true" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to false assert_equals: getAttribute() expected "false" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to object "[object Object]" assert_equals: getAttribute() expected "[object Object]" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to NaN assert_equals: getAttribute() expected "NaN" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to Infinity assert_equals: getAttribute() expected "Infinity" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to -Infinity assert_equals: getAttribute() expected "-Infinity" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "\0" assert_equals: getAttribute() expected "\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to null assert_equals: IDL get expected (string) "" but got (object) null >-FAIL undefinedelement.inputMode: IDL set to object "test-toString" assert_equals: getAttribute() expected "test-toString" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to object "test-valueOf" assert_equals: getAttribute() expected "test-valueOf" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "none" assert_equals: getAttribute() expected "none" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xnone" assert_equals: getAttribute() expected "xnone" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "none\0" assert_equals: getAttribute() expected "none\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "one" assert_equals: getAttribute() expected "one" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "NONE" assert_equals: getAttribute() expected "NONE" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "text" assert_equals: getAttribute() expected "text" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xtext" assert_equals: getAttribute() expected "xtext" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "text\0" assert_equals: getAttribute() expected "text\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "ext" assert_equals: getAttribute() expected "ext" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "TEXT" assert_equals: getAttribute() expected "TEXT" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "tel" assert_equals: getAttribute() expected "tel" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xtel" assert_equals: getAttribute() expected "xtel" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "tel\0" assert_equals: getAttribute() expected "tel\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "el" assert_equals: getAttribute() expected "el" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "TEL" assert_equals: getAttribute() expected "TEL" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "url" assert_equals: getAttribute() expected "url" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xurl" assert_equals: getAttribute() expected "xurl" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "url\0" assert_equals: getAttribute() expected "url\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "rl" assert_equals: getAttribute() expected "rl" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "URL" assert_equals: getAttribute() expected "URL" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "email" assert_equals: getAttribute() expected "email" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xemail" assert_equals: getAttribute() expected "xemail" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "email\0" assert_equals: getAttribute() expected "email\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "mail" assert_equals: getAttribute() expected "mail" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "EMAIL" assert_equals: getAttribute() expected "EMAIL" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "numeric" assert_equals: getAttribute() expected "numeric" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xnumeric" assert_equals: getAttribute() expected "xnumeric" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "numeric\0" assert_equals: getAttribute() expected "numeric\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "umeric" assert_equals: getAttribute() expected "umeric" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "NUMERIC" assert_equals: getAttribute() expected "NUMERIC" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "decimal" assert_equals: getAttribute() expected "decimal" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xdecimal" assert_equals: getAttribute() expected "xdecimal" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "decimal\0" assert_equals: getAttribute() expected "decimal\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "ecimal" assert_equals: getAttribute() expected "ecimal" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "DECIMAL" assert_equals: getAttribute() expected "DECIMAL" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "search" assert_equals: getAttribute() expected "search" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "xsearch" assert_equals: getAttribute() expected "xsearch" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "search\0" assert_equals: getAttribute() expected "search\0" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "earch" assert_equals: getAttribute() expected "earch" but got "SEARCH" >-FAIL undefinedelement.inputMode: IDL set to "SEARCH" assert_equals: IDL get expected "search" but got "SEARCH" >+PASS undefinedelement.inputMode: typeof IDL attribute >+PASS undefinedelement.inputMode: IDL get with DOM attribute unset >+PASS undefinedelement.inputMode: setAttribute() to "" >+PASS undefinedelement.inputMode: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " >+PASS undefinedelement.inputMode: setAttribute() to undefined >+PASS undefinedelement.inputMode: setAttribute() to 7 >+PASS undefinedelement.inputMode: setAttribute() to 1.5 >+PASS undefinedelement.inputMode: setAttribute() to true >+PASS undefinedelement.inputMode: setAttribute() to false >+PASS undefinedelement.inputMode: setAttribute() to object "[object Object]" >+PASS undefinedelement.inputMode: setAttribute() to NaN >+PASS undefinedelement.inputMode: setAttribute() to Infinity >+PASS undefinedelement.inputMode: setAttribute() to -Infinity >+PASS undefinedelement.inputMode: setAttribute() to "\0" >+PASS undefinedelement.inputMode: setAttribute() to null >+PASS undefinedelement.inputMode: setAttribute() to object "test-toString" >+PASS undefinedelement.inputMode: setAttribute() to object "test-valueOf" >+FAIL undefinedelement.inputMode: setAttribute() to "none" assert_equals: IDL get expected "none" but got "" >+PASS undefinedelement.inputMode: setAttribute() to "xnone" >+PASS undefinedelement.inputMode: setAttribute() to "none\0" >+PASS undefinedelement.inputMode: setAttribute() to "one" >+FAIL undefinedelement.inputMode: setAttribute() to "NONE" assert_equals: IDL get expected "none" but got "" >+PASS undefinedelement.inputMode: setAttribute() to "text" >+PASS undefinedelement.inputMode: setAttribute() to "xtext" >+PASS undefinedelement.inputMode: setAttribute() to "text\0" >+PASS undefinedelement.inputMode: setAttribute() to "ext" >+PASS undefinedelement.inputMode: setAttribute() to "TEXT" >+PASS undefinedelement.inputMode: setAttribute() to "tel" >+PASS undefinedelement.inputMode: setAttribute() to "xtel" >+PASS undefinedelement.inputMode: setAttribute() to "tel\0" >+PASS undefinedelement.inputMode: setAttribute() to "el" >+PASS undefinedelement.inputMode: setAttribute() to "TEL" >+PASS undefinedelement.inputMode: setAttribute() to "url" >+PASS undefinedelement.inputMode: setAttribute() to "xurl" >+PASS undefinedelement.inputMode: setAttribute() to "url\0" >+PASS undefinedelement.inputMode: setAttribute() to "rl" >+PASS undefinedelement.inputMode: setAttribute() to "URL" >+PASS undefinedelement.inputMode: setAttribute() to "email" >+PASS undefinedelement.inputMode: setAttribute() to "xemail" >+PASS undefinedelement.inputMode: setAttribute() to "email\0" >+PASS undefinedelement.inputMode: setAttribute() to "mail" >+PASS undefinedelement.inputMode: setAttribute() to "EMAIL" >+PASS undefinedelement.inputMode: setAttribute() to "numeric" >+PASS undefinedelement.inputMode: setAttribute() to "xnumeric" >+PASS undefinedelement.inputMode: setAttribute() to "numeric\0" >+PASS undefinedelement.inputMode: setAttribute() to "umeric" >+PASS undefinedelement.inputMode: setAttribute() to "NUMERIC" >+PASS undefinedelement.inputMode: setAttribute() to "decimal" >+PASS undefinedelement.inputMode: setAttribute() to "xdecimal" >+PASS undefinedelement.inputMode: setAttribute() to "decimal\0" >+PASS undefinedelement.inputMode: setAttribute() to "ecimal" >+PASS undefinedelement.inputMode: setAttribute() to "DECIMAL" >+PASS undefinedelement.inputMode: setAttribute() to "search" >+PASS undefinedelement.inputMode: setAttribute() to "xsearch" >+PASS undefinedelement.inputMode: setAttribute() to "search\0" >+PASS undefinedelement.inputMode: setAttribute() to "earch" >+PASS undefinedelement.inputMode: setAttribute() to "SEARCH" >+PASS undefinedelement.inputMode: IDL set to "" >+PASS undefinedelement.inputMode: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " >+PASS undefinedelement.inputMode: IDL set to undefined >+PASS undefinedelement.inputMode: IDL set to 7 >+PASS undefinedelement.inputMode: IDL set to 1.5 >+PASS undefinedelement.inputMode: IDL set to true >+PASS undefinedelement.inputMode: IDL set to false >+PASS undefinedelement.inputMode: IDL set to object "[object Object]" >+PASS undefinedelement.inputMode: IDL set to NaN >+PASS undefinedelement.inputMode: IDL set to Infinity >+PASS undefinedelement.inputMode: IDL set to -Infinity >+PASS undefinedelement.inputMode: IDL set to "\0" >+PASS undefinedelement.inputMode: IDL set to null >+PASS undefinedelement.inputMode: IDL set to object "test-toString" >+PASS undefinedelement.inputMode: IDL set to object "test-valueOf" >+FAIL undefinedelement.inputMode: IDL set to "none" assert_equals: IDL get expected "none" but got "" >+PASS undefinedelement.inputMode: IDL set to "xnone" >+PASS undefinedelement.inputMode: IDL set to "none\0" >+PASS undefinedelement.inputMode: IDL set to "one" >+FAIL undefinedelement.inputMode: IDL set to "NONE" assert_equals: IDL get expected "none" but got "" >+PASS undefinedelement.inputMode: IDL set to "text" >+PASS undefinedelement.inputMode: IDL set to "xtext" >+PASS undefinedelement.inputMode: IDL set to "text\0" >+PASS undefinedelement.inputMode: IDL set to "ext" >+PASS undefinedelement.inputMode: IDL set to "TEXT" >+PASS undefinedelement.inputMode: IDL set to "tel" >+PASS undefinedelement.inputMode: IDL set to "xtel" >+PASS undefinedelement.inputMode: IDL set to "tel\0" >+PASS undefinedelement.inputMode: IDL set to "el" >+PASS undefinedelement.inputMode: IDL set to "TEL" >+PASS undefinedelement.inputMode: IDL set to "url" >+PASS undefinedelement.inputMode: IDL set to "xurl" >+PASS undefinedelement.inputMode: IDL set to "url\0" >+PASS undefinedelement.inputMode: IDL set to "rl" >+PASS undefinedelement.inputMode: IDL set to "URL" >+PASS undefinedelement.inputMode: IDL set to "email" >+PASS undefinedelement.inputMode: IDL set to "xemail" >+PASS undefinedelement.inputMode: IDL set to "email\0" >+PASS undefinedelement.inputMode: IDL set to "mail" >+PASS undefinedelement.inputMode: IDL set to "EMAIL" >+PASS undefinedelement.inputMode: IDL set to "numeric" >+PASS undefinedelement.inputMode: IDL set to "xnumeric" >+PASS undefinedelement.inputMode: IDL set to "numeric\0" >+PASS undefinedelement.inputMode: IDL set to "umeric" >+PASS undefinedelement.inputMode: IDL set to "NUMERIC" >+PASS undefinedelement.inputMode: IDL set to "decimal" >+PASS undefinedelement.inputMode: IDL set to "xdecimal" >+PASS undefinedelement.inputMode: IDL set to "decimal\0" >+PASS undefinedelement.inputMode: IDL set to "ecimal" >+PASS undefinedelement.inputMode: IDL set to "DECIMAL" >+PASS undefinedelement.inputMode: IDL set to "search" >+PASS undefinedelement.inputMode: IDL set to "xsearch" >+PASS undefinedelement.inputMode: IDL set to "search\0" >+PASS undefinedelement.inputMode: IDL set to "earch" >+PASS undefinedelement.inputMode: IDL set to "SEARCH" > (Note: missing tests for types tokenlist.) >diff --git a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt b/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt >index 6f2a798e2516530409307991e4e550bf79bf3642..0c28206d85ad57997823c989aa6addccd6d708e9 100644 >--- a/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt >+++ b/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt >@@ -51,6 +51,7 @@ PASS a["offsetWidth"] is 40 > PASS a["offsetHeight"] is 18 > PASS a["outerText"] is nerget > PASS a["webkitdropzone"] is >+PASS a["inputMode"] is > PASS a["style"] is [object CSSStyleDeclaration] > PASS a["onabort"] is null > PASS a["onblur"] is null
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188878
:
347898
|
347906
|
347909
|
347912
|
347914
| 347943