Add credit card autofill button
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 20:08:43 +0000 (20:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 20:08:43 +0000 (20:08 +0000)
commitd6198de0427a5d90d985591330c3089991ee6bd8
tree716ea2c2a2f036817acb2a9076abd08e9badfa55
parent47d884aa7e1ad1b33e14794000704f71528c3baa
Add credit card autofill button
https://bugs.webkit.org/show_bug.cgi?id=191051
<rdar://problem/45657011>

Patch by Zach Li <zacharyli323@gmail.com> on 2018-10-31
Reviewed by Wenson Hsieh.

Source/WebCore:

Test: fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* css/html.css:
(input::-webkit-credit-card-auto-fill-button):
Add credit card autofill button.
(input::-webkit-credit-card-auto-fill-button:hover):
(input::-webkit-credit-card-auto-fill-button:active):
* html/HTMLTextFormControlElement.h:
* html/TextFieldInputType.cpp:
(WebCore::autoFillButtonTypeToAccessibilityLabel):
(WebCore::autoFillButtonTypeToAutoFillButtonText):
(WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
(WebCore::isAutoFillButtonTypeChanged):
* platform/LocalizedStrings.cpp:
(WebCore::AXAutoFillCreditCardLabel):
* platform/LocalizedStrings.h:
* testing/Internals.cpp:
(WebCore::toAutoFillButtonType):
(WebCore::toInternalsAutoFillButtonType):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(toAutoFillButtonType):
(toWKAutoFillButtonType):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h:
Introduce a new button type for credit card autofill.
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(toAutoFillButtonType):
(toWKAutoFillButtonType):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:

LayoutTests:

* fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added.
* fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html: Added.
* fast/forms/auto-fill-button/last-auto-fill-button-type-expected.txt:
* fast/forms/auto-fill-button/last-auto-fill-button-type.html:
* platform/ios-simulator/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added.
* platform/mac/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.png: Added.
* platform/win/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html [new file with mode: 0644]
LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type-expected.txt
LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type.html
LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.png [new file with mode: 0644]
LayoutTests/platform/win/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/css/html.css
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h