WebKit Bugzilla
Attachment 360084 Details for
Bug 193811
: iOS: inputmode="none" disables hardware keyboard's globe key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Unsupports inputmode=none for now
bug-193811-20190124225916.patch (text/plain), 13.21 KB, created by
Ryosuke Niwa
on 2019-01-24 22:59:17 PST
(
hide
)
Description:
Unsupports inputmode=none for now
Filename:
MIME Type:
Creator:
Ryosuke Niwa
Created:
2019-01-24 22:59:17 PST
Size:
13.21 KB
patch
obsolete
>Subversion Revision: 240366 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4402f2263ed20c369acf2637ee88a5c1c3e34f7b..eeb8be7b010b1994d9093d750b352218f1ae57d0 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-25 Ryosuke Niwa <rniwa@webkit.org> >+ >+ iOS: inputmode="none" disables hardware keyboard's globe key >+ https://bugs.webkit.org/show_bug.cgi?id=193811 >+ <rdar://problem/47406553> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Removed the support for inputmode="none" for now since we need a new SPI from UIKit >+ to properly implement this feature some time in the future. >+ >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _zoomToRevealFocusedElement]): >+ (-[WKContentView inputView]): >+ (-[WKContentView requiresAccessoryView]): >+ (-[WKContentView textInputTraits]): >+ > 2019-01-24 Ryosuke Niwa <rniwa@webkit.org> > > iOS: Split keyboard should not shrink visualViewport.height >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index bd1c6ba4f5fdc76b27e2b389fb4fc6a564b88ee8..a91573eaa1b072d1dc370c6e15000f0d8995940e 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1420,7 +1420,7 @@ - (void)_zoomToRevealFocusedElement > minimumScale:_focusedElementInformation.minimumScaleFactor > maximumScale:_focusedElementInformation.maximumScaleFactorIgnoringAlwaysScalable > allowScaling:_focusedElementInformation.allowsUserScalingIgnoringAlwaysScalable && !currentUserInterfaceIdiomIsPad() >- forceScroll:(_focusedElementInformation.inputMode == WebCore::InputMode::None) ? !currentUserInterfaceIdiomIsPad() : [self requiresAccessoryView]]; >+ forceScroll:[self requiresAccessoryView]]; > } > > - (UIView *)inputView >@@ -1428,9 +1428,6 @@ - (UIView *)inputView > if (!hasFocusedElement(_focusedElementInformation)) > return nil; > >- if (_focusedElementInformation.inputMode == WebCore::InputMode::None) >- return [[UIView new] autorelease]; >- > if (!_inputPeripheral) { > switch (_focusedElementInformation.elementType) { > case WebKit::InputType::Select: >@@ -2208,9 +2205,6 @@ - (BOOL)requiresAccessoryView > if ([_formInputSession customInputAccessoryView]) > return YES; > >- if (_focusedElementInformation.inputMode == WebCore::InputMode::None) >- return NO; >- > switch (_focusedElementInformation.elementType) { > case WebKit::InputType::None: > case WebKit::InputType::Drawing: >@@ -3812,6 +3806,7 @@ - (UITextInputTraits *)textInputTraits > } > > switch (_focusedElementInformation.inputMode) { >+ case WebCore::InputMode::None: > case WebCore::InputMode::Unspecified: > switch (_focusedElementInformation.elementType) { > case WebKit::InputType::Phone: >@@ -3849,8 +3844,6 @@ - (UITextInputTraits *)textInputTraits > [_traits setKeyboardType:UIKeyboardTypeDefault]; > } > break; >- case WebCore::InputMode::None: >- break; > case WebCore::InputMode::Text: > [_traits setKeyboardType:UIKeyboardTypeDefault]; > break; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2e64b30445627c82559a25f4fc465912458ccfb5..265c8869c48ab4cb7bd49fe1332e2b0b2ea2b28e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-24 Ryosuke Niwa <rniwa@webkit.org> >+ >+ iOS: inputmode="none" disables hardware keyboard's globe key >+ https://bugs.webkit.org/show_bug.cgi?id=193811 >+ <rdar://problem/47406553> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Updated and renamed the test expecting the keyboard to update upon inputmode content attribute changed >+ to use inputmode="decimal" instead of inputmode="none", and updated another test to expect inputmode="none" >+ has no effect instead of hiding the keyboard. >+ >+ * fast/forms/ios/inputmode-change-update-keyboard-expected.txt: Renamed from inputmode-none-removed-expected.txt. >+ * fast/forms/ios/inputmode-change-update-keyboard.html: Renamed from inputmode-none-removed.html. >+ * fast/forms/ios/inputmode-none-expected.txt: >+ * fast/forms/ios/inputmode-none.html: >+ > 2019-01-23 Oriol Brufau <obrufau@igalia.com> > > Allow failures in flaky tests from bug 193657 >diff --git a/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt b/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..767cfaff05bf0e0a3441efa2ed22fb1c7b2e3cbc >--- /dev/null >+++ b/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt >@@ -0,0 +1,16 @@ >+This tests updating inputmode of an input element from "none" to "text". The software keyboard should be updated. >+To manually test, focus the input element below. The software keyboard should show up after 3 seconds >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+inputmode="text" >+PASS textHeight = keyboardRect.height; keyboardRect.height > 0 is true >+ >+inputmode="number" >+PASS keyboardRect.height is not textHeight >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >+ >diff --git a/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html b/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9dee4b456ea46ffd1241cf3fd83f03947a4dbe86 >--- /dev/null >+++ b/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html >@@ -0,0 +1,68 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+</head> >+<body> >+<input inputmode="text"> >+<div id="countdown"></div> >+<script> >+jsTestIsAsync = true; >+ >+description('This tests updating inputmode of an input element from "none" to "text". The software keyboard should be updated.<br>' >+ + 'To manually test, focus the input element below. The software keyboard should show up after 3 seconds'); >+ >+const input = document.querySelector("input"); >+if (!window.testRunner) { >+ input.addEventListener('focus', () => { >+ let countdown = 3; >+ const id = setInterval(() => { >+ document.getElementById('countdown').textContent = countdown ? countdown : ''; >+ if (!countdown) { >+ clearInterval(id); >+ input.setAttribute('inputmode', 'decimal'); >+ } >+ countdown--; >+ }, 1000); >+ }); >+} >+ >+async function runTest() { >+ debug('inputmode="text"'); >+ >+ let didResize = () => { }; >+ window.visualViewport.addEventListener('resize', () => didResize()); >+ >+ if (window.testRunner) { >+ await UIHelper.activateFormControl(input); >+ window.keyboardRect = await UIHelper.inputViewBounds(); >+ shouldBeTrue('textHeight = keyboardRect.height; keyboardRect.height > 0'); >+ } else { >+ await new Promise((resolve) => { didResize = resolve; }); >+ shouldBeTrue('textHeight = document.documentElement.clientHeight - visualViewport.height; document.documentElement.clientHeight - visualViewport.height < 100'); >+ } >+ >+ if (window.testRunner) >+ input.setAttribute('inputmode', 'decimal'); >+ >+ await new Promise((resolve) => { didResize = resolve; }); >+ >+ debug(''); >+ debug('inputmode="number"'); >+ >+ if (window.testRunner) { >+ window.keyboardRect = await UIHelper.inputViewBounds(); >+ shouldNotBe('keyboardRect.height', 'textHeight'); >+ } else >+ shouldNotBe('document.documentElement.clientHeight - visualViewport.height', 'textHeight'); >+ >+ finishJSTest(); >+} >+ >+window.onload = () => setTimeout(runTest, 0); >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/fast/forms/ios/inputmode-none-expected.txt b/LayoutTests/fast/forms/ios/inputmode-none-expected.txt >index 646bf6bb92ffe30ffa311546dc87d054d968bf1c..b1c4c830fffe456a2be8ee69c9ca5a55cb6b7b84 100644 >--- a/LayoutTests/fast/forms/ios/inputmode-none-expected.txt >+++ b/LayoutTests/fast/forms/ios/inputmode-none-expected.txt >@@ -5,11 +5,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > ACTIVATE input with inputmode=text >-PASS systemKeyboardRect.height > 0 is true >+PASS textKeyboardHeight = systemKeyboardRect.height; systemKeyboardRect.height > 0 is true > PASS inputWithSystemKeyboard.value is "Text" > > ACTIVATE input with inputmode=none >-PASS systemKeyboardRect.height === 0 is true >+PASS systemKeyboardRect.height is textKeyboardHeight > > TEST enter text in input with inputmode=none > PASS inputWithoutSystemKeyboard.value is "None" >diff --git a/LayoutTests/fast/forms/ios/inputmode-none-removed-expected.txt b/LayoutTests/fast/forms/ios/inputmode-none-removed-expected.txt >deleted file mode 100644 >index 810967ab5f71d2a565c44ff4dbfc511c7e7c1fa1..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/inputmode-none-removed-expected.txt >+++ /dev/null >@@ -1,16 +0,0 @@ >-This tests updating inputmode of an input element from "none" to "text". The software keyboard should be updated. >-To manually test, focus the input element below. The software keyboard should show up after 3 seconds >- >-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >- >- >-Element has inputmode=none >-PASS keyboardRect.height is 0 >- >-inputmode has been removed >-PASS keyboardRect.height > 0 is true >-PASS successfullyParsed is true >- >-TEST COMPLETE >- >- >diff --git a/LayoutTests/fast/forms/ios/inputmode-none-removed.html b/LayoutTests/fast/forms/ios/inputmode-none-removed.html >deleted file mode 100644 >index 940197bc8faf8086f4f3c954742e4e2b7dfe6a0d..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/forms/ios/inputmode-none-removed.html >+++ /dev/null >@@ -1,68 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> >-<script src="../../../resources/js-test.js"></script> >-<script src="../../../resources/ui-helper.js"></script> >-</head> >-<body> >-<input inputmode="none"> >-<div id="countdown"></div> >-<script> >-jsTestIsAsync = true; >- >-description('This tests updating inputmode of an input element from "none" to "text". The software keyboard should be updated.<br>' >- + 'To manually test, focus the input element below. The software keyboard should show up after 3 seconds'); >- >-const input = document.querySelector("input"); >-if (!window.testRunner) { >- input.addEventListener('focus', () => { >- let countdown = 3; >- const id = setInterval(() => { >- document.getElementById('countdown').textContent = countdown ? countdown : ''; >- if (!countdown) { >- clearInterval(id); >- input.removeAttribute('inputmode'); >- } >- countdown--; >- }, 1000); >- }); >-} >- >-async function runTest() { >- debug('Element has inputmode=none'); >- >- let didResize = () => { }; >- window.visualViewport.addEventListener('resize', () => didResize()); >- >- if (window.testRunner) { >- await UIHelper.activateFormControl(input); >- window.keyboardRect = await UIHelper.inputViewBounds(); >- shouldBe('keyboardRect.height', '0'); >- } else { >- await new Promise((resolve) => { didResize = resolve; }); >- shouldBeTrue('document.documentElement.clientHeight - visualViewport.height < 100'); >- } >- >- if (window.testRunner) >- input.removeAttribute('inputmode'); >- >- await new Promise((resolve) => { didResize = resolve; }); >- >- debug(''); >- debug('inputmode has been removed'); >- >- if (window.testRunner) { >- window.keyboardRect = await UIHelper.inputViewBounds(); >- shouldBeTrue('keyboardRect.height > 0'); >- } else >- shouldBeTrue('document.documentElement.clientHeight - visualViewport.height > 300'); >- >- finishJSTest(); >-} >- >-window.onload = () => setTimeout(runTest, 0); >- >-</script> >-</body> >-</html> >diff --git a/LayoutTests/fast/forms/ios/inputmode-none.html b/LayoutTests/fast/forms/ios/inputmode-none.html >index f788565b89d12fa7131354f1630efc001ec5c0c3..f2f6a35c0060461b16e8eacdb8536d7ad2149c4a 100644 >--- a/LayoutTests/fast/forms/ios/inputmode-none.html >+++ b/LayoutTests/fast/forms/ios/inputmode-none.html >@@ -20,14 +20,14 @@ async function runTest() { > debug('\nACTIVATE input with inputmode=text'); > await UIHelper.activateFormControl(inputWithSystemKeyboard); > systemKeyboardRect = await UIHelper.inputViewBounds(); >- shouldBe('systemKeyboardRect.height > 0', 'true'); >+ shouldBe('textKeyboardHeight = systemKeyboardRect.height; systemKeyboardRect.height > 0', 'true'); > await UIHelper.enterText("Text"); > shouldBe('inputWithSystemKeyboard.value', '"Text"'); > > debug('\nACTIVATE input with inputmode=none'); > await UIHelper.activateFormControl(inputWithoutSystemKeyboard); > systemKeyboardRect = await UIHelper.inputViewBounds(); >- shouldBe('systemKeyboardRect.height === 0', 'true'); >+ shouldBe('systemKeyboardRect.height', 'textKeyboardHeight'); > > debug('\nTEST enter text in input with inputmode=none'); > await UIHelper.enterText("None");
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 193811
: 360084