Changeset 271414 in webkit
- Timestamp:
- Jan 12, 2021, 1:59:42 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
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/c/WKBundleNodeHandle.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (modified) (5 diffs)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheck.mm (added)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheckPlugIn.mm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r271405 r271414 1 2021-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com 4 https://bugs.webkit.org/show_bug.cgi?id=220556 5 <rdar://problem/71602937> 6 7 Reviewed by Darin Adler. 8 9 Add an internal testing hook to ask an input element whether it has disabled spellchecking (except for text 10 replacement). 11 12 * testing/Internals.cpp: 13 (WebCore::Internals::isSpellcheckDisabledExceptTextReplacement const): 14 * testing/Internals.h: 15 * testing/Internals.idl: 16 1 17 2021-01-12 Jer Noble <jer.noble@apple.com> 2 18 -
trunk/Source/WebCore/testing/Internals.cpp
r271401 r271414 2490 2490 } 2491 2491 2492 bool Internals::isSpellcheckDisabledExceptTextReplacement(const HTMLInputElement& element) const 2493 { 2494 return element.isSpellcheckDisabledExceptTextReplacement(); 2495 } 2496 2492 2497 void Internals::handleAcceptedCandidate(const String& candidate, unsigned location, unsigned length) 2493 2498 { -
trunk/Source/WebCore/testing/Internals.h
r270919 r271414 369 369 void setAutomaticSpellingCorrectionEnabled(bool); 370 370 371 bool isSpellcheckDisabledExceptTextReplacement(const HTMLInputElement&) const; 372 371 373 void handleAcceptedCandidate(const String& candidate, unsigned location, unsigned length); 372 374 void changeSelectionListType(); -
trunk/Source/WebCore/testing/Internals.idl
r270919 r271414 380 380 381 381 [MayThrowException] DOMString autofillFieldName(Element formControlElement); 382 boolean isSpellcheckDisabledExceptTextReplacement(HTMLInputElement inputElement); 382 383 383 384 [MayThrowException] undefined invalidateControlTints(); -
trunk/Source/WebKit/ChangeLog
r271408 r271414 1 2021-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com 4 https://bugs.webkit.org/show_bug.cgi?id=220556 5 <rdar://problem/71602937> 6 7 Reviewed by Darin Adler. 8 9 Restores the implementation of `WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled`, which was removed in 10 r265044, with the reasoning that the code was unused. However, Safari still uses this SPI on macOS to prevent 11 automatic spelling correction from triggering when editing form fields that are AutoFillable. 12 13 Test: WebKit.DisableSpellcheck 14 15 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: 16 (WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled): 17 1 18 2021-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 19 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
r265044 r271414 116 116 } 117 117 118 void WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled(WKBundleNodeHandleRef , bool)119 { 120 // FIXME: Would put ASSERT_NOT_REACHED() here but some compilers are warning the function is "noreturn".118 void WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled(WKBundleNodeHandleRef htmlInputElementHandleRef, bool enabled) 119 { 120 WebKit::toImpl(htmlInputElementHandleRef)->setHTMLInputElementSpellcheckEnabled(enabled); 121 121 } 122 122 -
trunk/Tools/ChangeLog
r271406 r271414 1 2021-01-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION (r265044): [macOS] Safari autocorrects text when typing in login field on amazon.com 4 https://bugs.webkit.org/show_bug.cgi?id=220556 5 <rdar://problem/71602937> 6 7 Reviewed by Darin Adler. 8 9 Add an API test that uses WebKit C API (`WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled`) to disable or 10 enable spellchecking on input elements. 11 12 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 13 * TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheck.mm: Added. 14 * TestWebKitAPI/Tests/WebKitCocoa/DisableSpellcheckPlugIn.mm: Added. 15 (-[DisableSpellcheckPlugIn webProcessPlugIn:didCreateBrowserContextController:]): 16 (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didClearWindowObjectForFrame:inScriptWorld:]): 17 (-[DisableSpellcheckPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]): 18 1 19 2021-01-12 Aakash Jain <aakash_jain@apple.com> 2 20 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r271245 r271414 1183 1183 F4A9202F1FEE34E900F59590 /* apple-data-url.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4A9202E1FEE34C800F59590 /* apple-data-url.html */; }; 1184 1184 F4AB578A1F65165400DB0DA1 /* custom-draggable-div.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4AB57891F65164B00DB0DA1 /* custom-draggable-div.html */; }; 1185 F4B0168325AE060F00E445C4 /* DisableSpellcheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = F4B0168225AE060F00E445C4 /* DisableSpellcheck.mm */; }; 1186 F4B0168425AE08F800E445C4 /* DisableSpellcheckPlugIn.mm in Sources */ = {isa = PBXBuildFile; fileRef = F4B0167F25AE02D600E445C4 /* DisableSpellcheckPlugIn.mm */; }; 1185 1187 F4B825D81EF4DBFB006E417F /* compressed-files.zip in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4B825D61EF4DBD4006E417F /* compressed-files.zip */; }; 1186 1188 F4B86D4F20BCD5B20099A7E6 /* paint-significant-area-milestone.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F4B86D4E20BCD5970099A7E6 /* paint-significant-area-milestone.html */; }; … … 2948 2950 F4A9202E1FEE34C800F59590 /* apple-data-url.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "apple-data-url.html"; sourceTree = "<group>"; }; 2949 2951 F4AB57891F65164B00DB0DA1 /* custom-draggable-div.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "custom-draggable-div.html"; sourceTree = "<group>"; }; 2952 F4B0167F25AE02D600E445C4 /* DisableSpellcheckPlugIn.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DisableSpellcheckPlugIn.mm; sourceTree = "<group>"; }; 2953 F4B0168225AE060F00E445C4 /* DisableSpellcheck.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DisableSpellcheck.mm; sourceTree = "<group>"; }; 2950 2954 F4B825D61EF4DBD4006E417F /* compressed-files.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = "compressed-files.zip"; sourceTree = "<group>"; }; 2951 2955 F4B86D4E20BCD5970099A7E6 /* paint-significant-area-milestone.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "paint-significant-area-milestone.html"; sourceTree = "<group>"; }; … … 3277 3281 46918EFB2237283500468DFE /* DeviceOrientation.mm */, 3278 3282 CEA7F57B20895F5B0078EF6E /* DidResignInputElementStrongPasswordAppearance.mm */, 3283 F4B0168225AE060F00E445C4 /* DisableSpellcheck.mm */, 3284 F4B0167F25AE02D600E445C4 /* DisableSpellcheckPlugIn.mm */, 3279 3285 73BD731723A846500020F450 /* DisplayName.mm */, 3280 3286 518EE51A20A78CFB00E024F3 /* DoAfterNextPresentationUpdateAfterCrash.mm */, … … 5515 5521 7CCE7ED01A411A7E00447C4C /* StringByEvaluatingJavaScriptFromString.mm in Sources */, 5516 5522 7CCE7ED11A411A7E00447C4C /* StringTruncator.mm in Sources */, 5523 F4B0168325AE060F00E445C4 /* DisableSpellcheck.mm in Sources */, 5517 5524 ECA680CE1E68CC0900731D20 /* StringUtilities.mm in Sources */, 5518 5525 CE4D5DE71F6743BA0072CFC6 /* StringWithDirection.cpp in Sources */, … … 5698 5705 374B7A611DF371CF00ACCB6C /* BundleEditingDelegatePlugIn.mm in Sources */, 5699 5706 7A89BB682331643A0042CB1E /* BundleFormDelegatePlugIn.mm in Sources */, 5707 F4B0168425AE08F800E445C4 /* DisableSpellcheckPlugIn.mm in Sources */, 5700 5708 A13EBBB01B87436F00097110 /* BundleParametersPlugIn.mm in Sources */, 5701 5709 37A709AF1E3EA97E00CA5969 /* BundleRangeHandlePlugIn.mm in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.