Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e8a2ecbc49f8a65ccf25a725f51d6fda11c8d530
      
https://github.com/WebKit/WebKit/commit/e8a2ecbc49f8a65ccf25a725f51d6fda11c8d530
  Author: Wenson Hsieh <wenson_hs...@apple.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M LayoutTests/fast/text-extraction/basic-text-extraction.html
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
    M Source/WebKit/UIProcess/Cocoa/WKTextExtractionUtilities.h
    M Source/WebKit/UIProcess/Cocoa/WKTextExtractionUtilities.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/WebKitTestRunner/TestOptions.cpp
    M Tools/WebKitTestRunner/TestOptions.h
    M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

  Log Message:
  -----------
  Refactor the text extraction runtime feature flag
https://bugs.webkit.org/show_bug.cgi?id=270954
rdar://124557582

Reviewed by Aditya Keerthi.

Flip the text extraction embedder preference to being true by default; see 
below for more details.

* LayoutTests/fast/text-extraction/basic-text-extraction.html:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setTextExtractionEnabled:]):

Loading `libWebKitSwift` when the WebKit client enables text extraction no 
longer makes sense, now
that it's enabled by default; instead, defer loading this dylib to when the web 
view actually
commits a load for the first time.

* Source/WebKit/UIProcess/Cocoa/WKTextExtractionUtilities.h:
* Source/WebKit/UIProcess/Cocoa/WKTextExtractionUtilities.mm:
(WebKit::prepareTextExtractionSupportIfNeeded):
(WebKit::prepareTextExtractionSupport): Deleted.

Renamed from `prepareTextExtractionSupport()` to reflect that it only loads 
WebKitSwift the first
time it is called, assuming it hasn't already been loaded.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):

Call `prepareTextExtractionSupportIfNeeded` when committing a load.

* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* Tools/WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::textExtractionEnabled const): Deleted.
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues):

Remove the test option, now that it's no longer necessary.

Canonical link: https://commits.webkit.org/276091@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to