Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66195e98c7605c01ceea07a626f4122f33f14dfa
https://github.com/WebKit/WebKit/commit/66195e98c7605c01ceea07a626f4122f33f14dfa
Author: Wenson Hsieh <[email protected]>
Date: 2024-06-15 (Sat, 15 Jun 2024)
Changed paths:
M LayoutTests/fast/text-extraction/basic-text-extraction.html
M LayoutTests/fast/text-extraction/text-extraction-when-scrolled.html
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Configurations/WebKitSwift.xcconfig
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
A Source/WebKit/WebKitSwift/TextExtraction/WKWebView+TextExtraction.swift
M Tools/WebKitTestRunner/TestOptions.cpp
M Tools/WebKitTestRunner/TestOptions.h
M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
Log Message:
-----------
[Cocoa] Upstream support for system context retrieval through
UIIntelligenceSupport
https://bugs.webkit.org/show_bug.cgi?id=275510
Reviewed by Aditya Keerthi and Megan Gardner.
Upstream support for system context retrieval through the UIIntelligenceSupport
framework on iOS 18
and macOS Sequoia. See below for more comments.
* LayoutTests/fast/text-extraction/basic-text-extraction.html:
* LayoutTests/fast/text-extraction/text-extraction-when-scrolled.html:
Add an explicit `textExtractionEnabled=true` to enable use of the text
extraction SPI.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformHave.h:
Add a new compile-time flag: `HAVE(UIINTELLIGENCESUPPORT_FRAMEWORK)`. Use this
flag to enable the
runtime flag `TextExtractionEnabled` by default on supported platforms.
* Source/WebKit/Configurations/WebKitSwift.xcconfig:
Remove `WKWebView+TextExtraction.swift` as an excluded source, now that the
file is no longer in
WebKitAdditions.
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
Remove an unnecessary compile-time flag, `ENABLE(TEXT_EXTRACTION)`. This was
only used to avoid
eagerly loading `libWebKitSwift` on platforms where support for
UIIntelligenceSupport is missing;
it's a bit cleaner to just turn the runtime feature off by default when the
above compile-time flag,
`HAVE(UIINTELLIGENCESUPPORT_FRAMEWORK)`, is off.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebKitSwift/TextExtraction/WKWebView+TextExtraction.swift:
Added.
Move this source file to `WebKitSwift/`, from WebKitAdditions.
(createEditable(for:)):
(createElementContent(for:)):
(createIntelligenceElement(_:)):
(WKWebView._intelligenceBaseClass):
(WKWebView._intelligenceCollectContent(in:collector:)):
(WKWebView._intelligenceCollectRemoteContent(in:remoteContextWrapper:)):
(WKWebView._requestTextExtraction(in:completionHandler:)):
Upstream support code for converting `WKTextExtractionItem` →
`IntelligenceElement`.
* Tools/WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):
* Tools/WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::textExtractionEnabled const):
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues):
Reintroduce a test option to enable TextExtraction, since enablement is now
properly gated on
`HAVE(UIINTELLIGENCESUPPORT_FRAMEWORK)`. Prior to this upstreaming, it was
unconditionally (and
unnecessarily) enabled everywhere.
Canonical link: https://commits.webkit.org/280051@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes