WebKit Bugzilla
Attachment 373336 Details for
Bug 196053
: [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
To land
bug-196053-20190702100821.patch (text/plain), 9.93 KB, created by
Daniel Bates
on 2019-07-02 10:08:21 PDT
(
hide
)
Description:
To land
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-07-02 10:08:21 PDT
Size:
9.93 KB
patch
obsolete
>Subversion Revision: 247055 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aed5be4cf4cfbbc7da9b678208d539d6912e18e3..8a4bf6d461af3c87be21594a9376769b47502fe5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-07-02 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page >+ https://bugs.webkit.org/show_bug.cgi?id=196053 >+ <rdar://problem/49093034> >+ >+ Reviewed by Wenson Hsieh. >+ >+ Remove the iOS override for isKeyboardFocusable() so that the focus controller allows >+ iframes to be keyboard focusable. >+ >+ Tests: fast/events/ios/tab-cycle.html >+ fast/events/ios/tab-into-text-field-inside-iframe.html >+ >+ * html/HTMLIFrameElement.h: >+ > 2019-07-02 Daniel Bates <dabates@apple.com> > > Left and right option key has Unidentified key identifier >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 64ba38a96a29dc6457993bca73a5b1015ecaf4ee..8ebb48ede93917f33998b049e9e2c4fb04abeafa 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,25 @@ >+2019-07-02 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page >+ https://bugs.webkit.org/show_bug.cgi?id=196053 >+ <rdar://problem/49093034> >+ >+ Reviewed by Wenson Hsieh. >+ >+ Allow iframes to be keyboard focusable when pressing the Tab key on the keyboard. This >+ also allow the that the focus controller to search their content document for other >+ editable elements. This makes iOS match the behavior on Mac. >+ >+ Although iframes can be focused by pressing the Tab key we maintain the current UI >+ restriction on iOS of not allowing iframes themselves to be focusable via the next and >+ previous accessory bar buttons. We do this because it's unclear what value supporting >+ such focusing brings, but it's clear that doing so makes tab cycling more confusing >+ since the default focus appearance for an iframe is indistinguishable from its non- >+ focused appearance. >+ >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::isAssistableElement): Do not consider an iframe as assistable. >+ > 2019-07-02 Alexander Mikhaylenko <exalm7659@gmail.com> > > [GTK] Support cancelling touchscreen back/forward gesture >diff --git a/Source/WebCore/html/HTMLIFrameElement.h b/Source/WebCore/html/HTMLIFrameElement.h >index 08d92c8362958c6ea91c7887683dcf3918c3e14e..8dbf068617d5cd103b8e87dca84162147364aa8a 100644 >--- a/Source/WebCore/html/HTMLIFrameElement.h >+++ b/Source/WebCore/html/HTMLIFrameElement.h >@@ -50,10 +50,6 @@ public: > private: > HTMLIFrameElement(const QualifiedName&, Document&); > >-#if PLATFORM(IOS_FAMILY) >- bool isKeyboardFocusable(KeyboardEvent*) const final { return false; } >-#endif >- > void parseAttribute(const QualifiedName&, const AtomString&) final; > bool isPresentationAttribute(const QualifiedName&) const final; > void collectStyleForPresentationAttribute(const QualifiedName&, const AtomString&, MutableStyleProperties&) final; >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index a5ab1b6b6123a0fd5469a93073ab074001224968..73b6108511433207772f38c2271c7b1a99a1b73f 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -86,6 +86,7 @@ > #import <WebCore/HTMLElement.h> > #import <WebCore/HTMLElementTypeHelpers.h> > #import <WebCore/HTMLFormElement.h> >+#import <WebCore/HTMLIFrameElement.h> > #import <WebCore/HTMLImageElement.h> > #import <WebCore/HTMLInputElement.h> > #import <WebCore/HTMLLabelElement.h> >@@ -2453,16 +2454,16 @@ static HTMLAnchorElement* containingLinkElement(Element* element) > return nullptr; > } > >-static inline bool isAssistableElement(Element& node) >+static inline bool isAssistableElement(Element& element) > { >- if (is<HTMLSelectElement>(node)) >+ if (is<HTMLSelectElement>(element)) > return true; >- if (is<HTMLTextAreaElement>(node)) >+ if (is<HTMLTextAreaElement>(element)) > return true; >- if (is<HTMLImageElement>(node) && downcast<HTMLImageElement>(node).hasEditableImageAttribute()) >+ if (is<HTMLImageElement>(element) && downcast<HTMLImageElement>(element).hasEditableImageAttribute()) > return true; >- if (is<HTMLInputElement>(node)) { >- HTMLInputElement& inputElement = downcast<HTMLInputElement>(node); >+ if (is<HTMLInputElement>(element)) { >+ HTMLInputElement& inputElement = downcast<HTMLInputElement>(element); > // FIXME: This laundry list of types is not a good way to factor this. Need a suitable function on HTMLInputElement itself. > #if ENABLE(INPUT_TYPE_COLOR) > if (inputElement.isColorControl()) >@@ -2470,7 +2471,9 @@ static inline bool isAssistableElement(Element& node) > #endif > return inputElement.isTextField() || inputElement.isDateField() || inputElement.isDateTimeLocalField() || inputElement.isMonthField() || inputElement.isTimeField(); > } >- return node.isContentEditable(); >+ if (is<HTMLIFrameElement>(element)) >+ return false; >+ return element.isContentEditable(); > } > > void WebPage::getPositionInformation(const InteractionInformationRequest& request, CompletionHandler<void(InteractionInformationAtPosition&&)>&& reply) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2beac57031de1b755c2e78fb3661f63166ac7ddb..248abd6845af5b70317aaeab46df4e88bb541f40 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2019-07-02 Daniel Bates <dabates@apple.com> >+ >+ [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page >+ https://bugs.webkit.org/show_bug.cgi?id=196053 >+ <rdar://problem/49093034> >+ >+ Reviewed by Wenson Hsieh. >+ >+ Add some tests. >+ >+ * fast/events/ios/tab-cycle-expected.txt: Added. >+ * fast/events/ios/tab-cycle.html: Added. >+ * fast/events/ios/tab-into-text-field-inside-iframe-expected.txt: Added. >+ * fast/events/ios/tab-into-text-field-inside-iframe.html: Added. >+ > 2019-07-02 Daniel Bates <dabates@apple.com> > > Left and right option key has Unidentified key identifier >diff --git a/LayoutTests/fast/events/ios/tab-cycle-expected.txt b/LayoutTests/fast/events/ios/tab-cycle-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0bad57f504d7614fd9116c479876d6698c228e50 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/tab-cycle-expected.txt >@@ -0,0 +1,12 @@ >+This tests tab cycling through editable elements on iOS. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS elementName is "A" >+PASS elementName is "B" >+PASS elementName is "C" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/events/ios/tab-cycle.html b/LayoutTests/fast/events/ios/tab-cycle.html >new file mode 100644 >index 0000000000000000000000000000000000000000..42850593e8d73d5a8b9bbec980c63ae3d036ede6 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/tab-cycle.html >@@ -0,0 +1,46 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+</head> >+<body> >+<div id="test-container"> >+ <input type="text" value="A" onfocus="checkResult(this.value)"> >+ <iframe srcdoc="<input value='B' onfocus='window.parent.checkResult(this.value)'>"></iframe> >+ <textarea onfocus="checkResult(this.value)">C</textarea> >+</div> >+<script> >+window.jsTestIsAsync = true; >+ >+let expectedOrder = ["A", "B", "C"]; >+let position = 0; >+let elementName = ""; >+ >+function checkResult(anElementName) >+{ >+ console.assert(position < expectedOrder.length); >+ elementName = anElementName; >+ shouldBeEqualToString("elementName", expectedOrder[position++]); >+ if (position >= expectedOrder.length) >+ done(); >+ tab(); >+} >+ >+function tab() >+{ >+ if (window.testRunner) >+ UIHelper.keyDown("\t"); >+} >+ >+function done() >+{ >+ document.body.removeChild(document.getElementById("test-container")); >+ finishJSTest(); >+} >+ >+description("This tests tab cycling through editable elements on iOS."); >+tab(); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe-expected.txt b/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0692807f4e599dffdb03d2c02bb5e7ddd55cd61a >--- /dev/null >+++ b/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe-expected.txt >@@ -0,0 +1,10 @@ >+This tests that you can tab cycle into a field inside an iframe. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS focused text field inside iframe >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe.html b/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe.html >new file mode 100644 >index 0000000000000000000000000000000000000000..81e2bcf47ffb1b15fd3738aff71b49a3f1a7c241 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/tab-into-text-field-inside-iframe.html >@@ -0,0 +1,30 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../../resources/js-test.js"></script> >+<script src="../../../resources/ui-helper.js"></script> >+</head> >+<body> >+<iframe id="test-container" srcdoc="<input onfocus='window.parent.passed()'>"></iframe> >+<script> >+window.jsTestIsAsync = true; >+ >+function passed() >+{ >+ testPassed("focused text field inside iframe"); >+ document.body.removeChild(document.getElementById("test-container")); >+ finishJSTest(); >+} >+ >+function runTest() >+{ >+ if (!window.testRunner) >+ return; >+ UIHelper.keyDown("\t"); >+} >+ >+description("This tests that you can tab cycle into a field inside an iframe."); >+runTest(); >+</script> >+</body> >+</html>
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 196053
:
373262
|
373270
| 373336