WebKit Bugzilla
Attachment 373270 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]
Patch
bug-196053-20190701145659.patch (text/plain), 8.77 KB, created by
Daniel Bates
on 2019-07-01 14:56:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2019-07-01 14:56:59 PDT
Size:
8.77 KB
patch
obsolete
>Subversion Revision: 246884 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e715c4e3911f3b01e34301324b93183cab044814..68aa9b0cd034a63e96745d43b9eeaa6ff9a95e2d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-07-01 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 NOBODY (OOPS!). >+ >+ 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-06-27 Antti Koivisto <antti@apple.com> > > REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 22ecd94f2237cc896f794c325c8811765ee0122c..574dfd24241c644b30e54205c8982286f0c0d213 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,25 @@ >+2019-07-01 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 NOBODY (OOPS!). >+ >+ 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-06-27 Daniel Bates <dabates@apple.com> > > [iOS] Select all with existing range selection replaces range instead of selecting all text >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 bf8c2d98e792aa1688bc9e235691f7ac6f36607e..2c227fd7d03c8253b5a7ea3066101ddecf2dbf17 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> >@@ -2452,6 +2453,8 @@ static inline bool isAssistableElement(Element& node) > #endif > return inputElement.isTextField() || inputElement.isDateField() || inputElement.isDateTimeLocalField() || inputElement.isMonthField() || inputElement.isTimeField(); > } >+ if (is<HTMLIFrameElement>(node)) >+ return false; > return node.isContentEditable(); > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 9fe8680e00971af4be0f669969f9f0b7e67557c4..4bf3b19598734d8ebf2bccc4947d102a718a5aaa 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2019-07-01 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 NOBODY (OOPS!). >+ >+ 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-06-27 Daniel Bates <dabates@apple.com> > > [iOS] Select all with existing range selection replaces range instead of selecting all text >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