Changeset 237647 in webkit
- Timestamp:
- Oct 31, 2018, 1:08:43 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 18 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt (added)
-
LayoutTests/fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html (added)
-
LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type.html (modified) (1 diff)
-
LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button (added)
-
LayoutTests/platform/ios-simulator/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt (added)
-
LayoutTests/platform/mac/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.png (added)
-
LayoutTests/platform/win/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (modified) (1 diff)
-
Source/WebCore/css/html.css (modified) (1 diff)
-
Source/WebCore/html/HTMLTextFormControlElement.h (modified) (1 diff)
-
Source/WebCore/html/TextFieldInputType.cpp (modified) (4 diffs)
-
Source/WebCore/platform/LocalizedStrings.cpp (modified) (1 diff)
-
Source/WebCore/platform/LocalizedStrings.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm (modified) (2 diffs)
-
Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h (modified) (1 diff)
-
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp (modified) (2 diffs)
-
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r237644 r237647 1 2018-10-31 Zach Li <zacharyli323@gmail.com> 2 3 Add credit card autofill button 4 https://bugs.webkit.org/show_bug.cgi?id=191051 5 <rdar://problem/45657011> 6 7 Reviewed by Wenson Hsieh. 8 9 * fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added. 10 * fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html: Added. 11 * fast/forms/auto-fill-button/last-auto-fill-button-type-expected.txt: 12 * fast/forms/auto-fill-button/last-auto-fill-button-type.html: 13 * platform/ios-simulator/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added. 14 * platform/mac/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.png: Added. 15 * platform/win/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: Added. 16 1 17 2018-10-31 Devin Rousso <drousso@apple.com> 2 18 -
trunk/LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type-expected.txt
r233578 r237647 17 17 PASS internals.autoFillButtonType(inputElement) is "Credentials" 18 18 PASS internals.lastAutoFillButtonType(inputElement) is "StrongPassword" 19 internals.setShowAutoFillButton(inputElement, 'CreditCard') 20 PASS internals.autoFillButtonType(inputElement) is "CreditCard" 21 PASS internals.lastAutoFillButtonType(inputElement) is "Credentials" 19 22 internals.setShowAutoFillButton(inputElement, 'None') 20 23 PASS internals.autoFillButtonType(inputElement) is "None" 21 PASS internals.lastAutoFillButtonType(inputElement) is "Cred entials"24 PASS internals.lastAutoFillButtonType(inputElement) is "CreditCard" 22 25 PASS successfullyParsed is true 23 26 -
trunk/LayoutTests/fast/forms/auto-fill-button/last-auto-fill-button-type.html
r233578 r237647 26 26 shouldBeEqualToString("internals.autoFillButtonType(inputElement)", "Credentials"); 27 27 shouldBeEqualToString("internals.lastAutoFillButtonType(inputElement)", "StrongPassword"); 28 evalAndLog("internals.setShowAutoFillButton(inputElement, 'CreditCard')"); 29 shouldBeEqualToString("internals.autoFillButtonType(inputElement)", "CreditCard"); 30 shouldBeEqualToString("internals.lastAutoFillButtonType(inputElement)", "Credentials"); 28 31 evalAndLog("internals.setShowAutoFillButton(inputElement, 'None')"); 29 32 shouldBeEqualToString("internals.autoFillButtonType(inputElement)", "None"); 30 shouldBeEqualToString("internals.lastAutoFillButtonType(inputElement)", "Cred entials");33 shouldBeEqualToString("internals.lastAutoFillButtonType(inputElement)", "CreditCard"); 31 34 } 32 35 </script> -
trunk/Source/WebCore/ChangeLog
r237643 r237647 1 2018-10-31 Zach Li <zacharyli323@gmail.com> 2 3 Add credit card autofill button 4 https://bugs.webkit.org/show_bug.cgi?id=191051 5 <rdar://problem/45657011> 6 7 Reviewed by Wenson Hsieh. 8 9 Test: fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html 10 11 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 12 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 13 * css/html.css: 14 (input::-webkit-credit-card-auto-fill-button): 15 Add credit card autofill button. 16 (input::-webkit-credit-card-auto-fill-button:hover): 17 (input::-webkit-credit-card-auto-fill-button:active): 18 * html/HTMLTextFormControlElement.h: 19 * html/TextFieldInputType.cpp: 20 (WebCore::autoFillButtonTypeToAccessibilityLabel): 21 (WebCore::autoFillButtonTypeToAutoFillButtonText): 22 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName): 23 (WebCore::isAutoFillButtonTypeChanged): 24 * platform/LocalizedStrings.cpp: 25 (WebCore::AXAutoFillCreditCardLabel): 26 * platform/LocalizedStrings.h: 27 * testing/Internals.cpp: 28 (WebCore::toAutoFillButtonType): 29 (WebCore::toInternalsAutoFillButtonType): 30 * testing/Internals.h: 31 * testing/Internals.idl: 32 1 33 2018-10-31 Eric Carlson <eric.carlson@apple.com> 2 34 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r236832 r237647 3111 3111 case AutoFillButtonType::StrongPassword: 3112 3112 return @"strong password"; 3113 case AutoFillButtonType::CreditCard: 3114 return @"credit card"; 3113 3115 } 3114 3116 } -
trunk/Source/WebCore/css/html.css
r237266 r237647 603 603 } 604 604 605 input::-webkit-credit-card-auto-fill-button { 606 -webkit-mask-image: -webkit-image-set(url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAYCAYAAAC1Ft6mAAAAAXNSR0IArs4c6QAAAYlJREFUWAntmD1OA0EMhQMFBBACCRqq5F4cANHDAZAoaBB00NAiDkSXggvQIAp+JH7eVziYkZddKTOzKPAka2yPx/aLN5NVBoM5xKo4XUmeJB8VhDrUo24RkLwGkbQGdbNjQRn5xIbZM7cnfFbISnvYH49gQjwKfYH6WbGYNdsvSPZPqNIQblTnRbLXsR5xXDKcK3Zlj5R7M5GtpJ7MEK/y2jW/H0Z8Odm3WM5NDXPmWiETweeP9vEdSHxcEykm4+MOOewdOfVZCNHXkevtXfouTgfsN4n1fGx75si9zkqI/k5cwzRvpFIyxE2Rm4jl4/uSYlkO22ftgpTUpQ75yXwjQ0JfoLbehRAxpw19nkUJapPw9aJ+Ih9vFBcSfxY7fNPwQbX1qPkmH80zEa7mc0lIBickDGMpD2ZoHUruJDvOh7ouuZWMMBy2pU+c3aaGTbUd+mk/ffXZSIL59eUTSW+sR/mWJGsSj3tv9KGnE6rdQ5EJMYU+UKQuj9x1H2xK1p27P0l6GlCZsp/oV3aRfWEA1gAAAABJRU5ErkJggg==") 2x); 607 -webkit-mask-size: 22px 12px; 608 width: 22px; 609 height: 12px; 610 margin-left: 3px; 611 margin-right: 2px; 612 background-color: black; 613 flex: none; 614 -webkit-user-select: none; 615 } 616 617 input::-webkit-credit-card-auto-fill-button:hover { 618 background-color: rgb(0, 122, 255); 619 } 620 621 input::-webkit-credit-card-auto-fill-button:active { 622 background-color: rgb(0, 60, 219); 623 } 624 605 625 input::-webkit-caps-lock-indicator { 606 626 -webkit-appearance: caps-lock-indicator; -
trunk/Source/WebCore/html/HTMLTextFormControlElement.h
r237266 r237647 34 34 class VisiblePosition; 35 35 36 enum class AutoFillButtonType : uint8_t { None, Credentials, Contacts, StrongPassword };36 enum class AutoFillButtonType : uint8_t { None, Credentials, Contacts, StrongPassword, CreditCard }; 37 37 enum TextFieldSelectionDirection { SelectionHasNoDirection, SelectionHasForwardDirection, SelectionHasBackwardDirection }; 38 38 enum TextFieldEventBehavior { DispatchNoEvent, DispatchChangeEvent, DispatchInputAndChangeEvent }; -
trunk/Source/WebCore/html/TextFieldInputType.cpp
r237266 r237647 481 481 case AutoFillButtonType::StrongPassword: 482 482 return AXAutoFillStrongPasswordLabel(); 483 case AutoFillButtonType::CreditCard: 484 return AXAutoFillCreditCardLabel(); 483 485 case AutoFillButtonType::None: 484 486 ASSERT_NOT_REACHED(); … … 494 496 case AutoFillButtonType::Contacts: 495 497 case AutoFillButtonType::Credentials: 498 case AutoFillButtonType::CreditCard: 496 499 return emptyString(); 497 500 case AutoFillButtonType::StrongPassword: … … 514 517 case AutoFillButtonType::StrongPassword: 515 518 return { "-webkit-strong-password-auto-fill-button", AtomicString::ConstructFromLiteral }; 519 case AutoFillButtonType::CreditCard: 520 return { "-webkit-credit-card-auto-fill-button", AtomicString::ConstructFromLiteral }; 516 521 case AutoFillButtonType::None: 517 522 ASSERT_NOT_REACHED(); … … 529 534 return true; 530 535 if (attribute == "-webkit-strong-password-auto-fill-button" && autoFillButtonType != AutoFillButtonType::StrongPassword) 536 return true; 537 if (attribute == "-webkit-credit-card-auto-fill-button" && autoFillButtonType != AutoFillButtonType::CreditCard) 531 538 return true; 532 539 return false; -
trunk/Source/WebCore/platform/LocalizedStrings.cpp
r237266 r237647 624 624 { 625 625 return WEB_UI_STRING("strong password auto fill", "Label for the strong password auto fill button inside a text field."); 626 } 627 628 String AXAutoFillCreditCardLabel() 629 { 630 return WEB_UI_STRING("credit card auto fill", "Label for the credit card auto fill button inside a text field."); 626 631 } 627 632 -
trunk/Source/WebCore/platform/LocalizedStrings.h
r237266 r237647 217 217 String AXAutoFillContactsLabel(); 218 218 String AXAutoFillStrongPasswordLabel(); 219 String AXAutoFillCreditCardLabel(); 219 220 String autoFillStrongPasswordLabel(); 220 221 -
trunk/Source/WebCore/testing/Internals.cpp
r237597 r237647 1779 1779 case Internals::AutoFillButtonType::StrongPassword: 1780 1780 return AutoFillButtonType::StrongPassword; 1781 case Internals::AutoFillButtonType::CreditCard: 1782 return AutoFillButtonType::CreditCard; 1781 1783 } 1782 1784 ASSERT_NOT_REACHED(); … … 1795 1797 case AutoFillButtonType::StrongPassword: 1796 1798 return Internals::AutoFillButtonType::StrongPassword; 1799 case AutoFillButtonType::CreditCard: 1800 return Internals::AutoFillButtonType::CreditCard; 1797 1801 } 1798 1802 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/testing/Internals.h
r237597 r237647 255 255 void setEditingValue(HTMLInputElement&, const String&); 256 256 void setAutofilled(HTMLInputElement&, bool enabled); 257 enum class AutoFillButtonType { None, Contacts, Credentials, StrongPassword };257 enum class AutoFillButtonType { None, Contacts, Credentials, StrongPassword, CreditCard }; 258 258 void setShowAutoFillButton(HTMLInputElement&, AutoFillButtonType); 259 259 AutoFillButtonType autoFillButtonType(const HTMLInputElement&); -
trunk/Source/WebCore/testing/Internals.idl
r237597 r237647 63 63 "Contacts", 64 64 "Credentials", 65 "StrongPassword" 65 "StrongPassword", 66 "CreditCard" 66 67 }; 67 68 -
trunk/Source/WebKit/ChangeLog
r237639 r237647 1 2018-10-31 Zach Li <zacharyli323@gmail.com> 2 3 Add credit card autofill button 4 https://bugs.webkit.org/show_bug.cgi?id=191051 5 <rdar://problem/45657011> 6 7 Reviewed by Wenson Hsieh. 8 9 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: 10 (toAutoFillButtonType): 11 (toWKAutoFillButtonType): 12 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h: 13 Introduce a new button type for credit card autofill. 14 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: 15 (toAutoFillButtonType): 16 (toWKAutoFillButtonType): 17 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: 18 1 19 2018-10-31 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
r237266 r237647 128 128 case _WKAutoFillButtonTypeStrongPassword: 129 129 return WebCore::AutoFillButtonType::StrongPassword; 130 case _WKAutoFillButtonTypeCreditCard: 131 return WebCore::AutoFillButtonType::CreditCard; 130 132 } 131 133 ASSERT_NOT_REACHED(); … … 144 146 case WebCore::AutoFillButtonType::StrongPassword: 145 147 return _WKAutoFillButtonTypeStrongPassword; 148 case WebCore::AutoFillButtonType::CreditCard: 149 return _WKAutoFillButtonTypeCreditCard; 146 150 } 147 151 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandlePrivate.h
r233578 r237647 33 33 _WKAutoFillButtonTypeContacts, 34 34 _WKAutoFillButtonTypeStrongPassword, 35 _WKAutoFillButtonTypeCreditCard WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)), 35 36 } WK_API_AVAILABLE(macosx(10.13.4), ios(11.3)); 36 37 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
r233578 r237647 49 49 case kWKAutoFillButtonTypeStrongPassword: 50 50 return WebCore::AutoFillButtonType::StrongPassword; 51 case kWKAutoFillButtonTypeCreditCard: 52 return WebCore::AutoFillButtonType::CreditCard; 51 53 } 52 54 ASSERT_NOT_REACHED(); … … 65 67 case WebCore::AutoFillButtonType::StrongPassword: 66 68 return kWKAutoFillButtonTypeStrongPassword; 69 case WebCore::AutoFillButtonType::CreditCard: 70 return kWKAutoFillButtonTypeCreditCard; 67 71 } 68 72 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
r233578 r237647 41 41 kWKAutoFillButtonTypeContacts, 42 42 kWKAutoFillButtonTypeStrongPassword, 43 kWKAutoFillButtonTypeCreditCard, 43 44 }; 44 45 typedef uint8_t WKAutoFillButtonType;
Note:
See TracChangeset
for help on using the changeset viewer.