Diff
Modified: branches/safari-607-branch/LayoutTests/ChangeLog (240571 => 240572)
--- branches/safari-607-branch/LayoutTests/ChangeLog 2019-01-28 09:41:11 UTC (rev 240571)
+++ branches/safari-607-branch/LayoutTests/ChangeLog 2019-01-28 09:41:15 UTC (rev 240572)
@@ -1,3 +1,54 @@
+2019-01-28 Babak Shafiei <[email protected]>
+
+ Cherry-pick r240497. rdar://problem/47586863
+
+ iOS: inputmode="none" disables hardware keyboard's globe key
+ https://bugs.webkit.org/show_bug.cgi?id=193811
+ <rdar://problem/47406553>
+
+ Reviewed by Wenson Hsieh.
+
+ Source/WebKit:
+
+ 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]):
+
+ LayoutTests:
+
+ 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:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-25 Ryosuke Niwa <[email protected]>
+
+ iOS: inputmode="none" disables hardware keyboard's globe key
+ https://bugs.webkit.org/show_bug.cgi?id=193811
+ <rdar://problem/47406553>
+
+ Reviewed by Wenson Hsieh.
+
+ 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 Alan Coon <[email protected]>
Cherry-pick r239966. rdar://problem/47295366
Added: branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt (0 => 240572)
--- branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard-expected.txt 2019-01-28 09:41:15 UTC (rev 240572)
@@ -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
+
+
Added: branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html (0 => 240572)
--- branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-change-update-keyboard.html 2019-01-28 09:41:15 UTC (rev 240572)
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+<script src=""
+<script src=""
+</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>
Modified: branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none-expected.txt (240571 => 240572)
--- branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none-expected.txt 2019-01-28 09:41:11 UTC (rev 240571)
+++ branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none-expected.txt 2019-01-28 09:41:15 UTC (rev 240572)
@@ -5,11 +5,11 @@
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"
Modified: branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none.html (240571 => 240572)
--- branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none.html 2019-01-28 09:41:11 UTC (rev 240571)
+++ branches/safari-607-branch/LayoutTests/fast/forms/ios/inputmode-none.html 2019-01-28 09:41:15 UTC (rev 240572)
@@ -20,7 +20,7 @@
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"');
@@ -27,7 +27,7 @@
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");
Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (240571 => 240572)
--- branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-28 09:41:11 UTC (rev 240571)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-28 09:41:15 UTC (rev 240572)
@@ -1,5 +1,56 @@
2019-01-28 Babak Shafiei <[email protected]>
+ Cherry-pick r240497. rdar://problem/47586863
+
+ iOS: inputmode="none" disables hardware keyboard's globe key
+ https://bugs.webkit.org/show_bug.cgi?id=193811
+ <rdar://problem/47406553>
+
+ Reviewed by Wenson Hsieh.
+
+ Source/WebKit:
+
+ 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]):
+
+ LayoutTests:
+
+ 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:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-25 Ryosuke Niwa <[email protected]>
+
+ iOS: inputmode="none" disables hardware keyboard's globe key
+ https://bugs.webkit.org/show_bug.cgi?id=193811
+ <rdar://problem/47406553>
+
+ Reviewed by Wenson Hsieh.
+
+ 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-28 Babak Shafiei <[email protected]>
+
Cherry-pick r240493. rdar://problem/47586905
REGRESSION (PSON): After swipe back, first few attempts to swipe forward not recognized as swipe gestures
Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (240571 => 240572)
--- branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-01-28 09:41:11 UTC (rev 240571)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-01-28 09:41:15 UTC (rev 240572)
@@ -1415,7 +1415,7 @@
minimumScale:_focusedElementInformation.minimumScaleFactor
maximumScale:_focusedElementInformation.maximumScaleFactorIgnoringAlwaysScalable
allowScaling:_focusedElementInformation.allowsUserScalingIgnoringAlwaysScalable && !currentUserInterfaceIdiomIsPad()
- forceScroll:(_focusedElementInformation.inputMode == WebCore::InputMode::None) ? !currentUserInterfaceIdiomIsPad() : [self requiresAccessoryView]];
+ forceScroll:[self requiresAccessoryView]];
}
- (UIView *)inputView
@@ -1423,9 +1423,6 @@
if (!hasFocusedElement(_focusedElementInformation))
return nil;
- if (_focusedElementInformation.inputMode == WebCore::InputMode::None)
- return [[UIView new] autorelease];
-
if (!_inputPeripheral) {
switch (_focusedElementInformation.elementType) {
case WebKit::InputType::Select:
@@ -2200,9 +2197,6 @@
if ([_formInputSession customInputAccessoryView])
return YES;
- if (_focusedElementInformation.inputMode == WebCore::InputMode::None)
- return NO;
-
switch (_focusedElementInformation.elementType) {
case WebKit::InputType::None:
case WebKit::InputType::Drawing:
@@ -3836,6 +3830,7 @@
}
switch (_focusedElementInformation.inputMode) {
+ case WebCore::InputMode::None:
case WebCore::InputMode::Unspecified:
switch (_focusedElementInformation.elementType) {
case WebKit::InputType::Phone:
@@ -3873,8 +3868,6 @@
[_traits setKeyboardType:UIKeyboardTypeDefault];
}
break;
- case WebCore::InputMode::None:
- break;
case WebCore::InputMode::Text:
[_traits setKeyboardType:UIKeyboardTypeDefault];
break;