Title: [284076] trunk/Source
- Revision
- 284076
- Author
- [email protected]
- Date
- 2021-10-12 18:52:38 -0700 (Tue, 12 Oct 2021)
Log Message
Move some staged VisionKitCore SPI into VisionKitCoreSPI.h
https://bugs.webkit.org/show_bug.cgi?id=231648
Reviewed by Tim Horton.
Source/WebCore/PAL:
See WebKit/ChangeLog for more details.
* pal/spi/cocoa/VisionKitCoreSPI.h:
Source/WebKit:
Move these interface declarations out of this implementation file, and into PAL instead, but only if we're not
using the Apple internal SDK. Additionally, redefine VKWKDataDetectorInfo as a class instead of a protocol; this
workaround was only added to ensure source and binary compatibility with older versions of the internal macOS
Monterey/iOS 15 SDK.
No change in behavior.
* Platform/cocoa/TextRecognitionUtilities.mm:
(WebKit::makeTextRecognitionResult):
Modified Paths
Diff
Modified: trunk/Source/WebCore/PAL/ChangeLog (284075 => 284076)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-10-13 01:40:07 UTC (rev 284075)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-10-13 01:52:38 UTC (rev 284076)
@@ -1,3 +1,14 @@
+2021-10-12 Wenson Hsieh <[email protected]>
+
+ Move some staged VisionKitCore SPI into VisionKitCoreSPI.h
+ https://bugs.webkit.org/show_bug.cgi?id=231648
+
+ Reviewed by Tim Horton.
+
+ See WebKit/ChangeLog for more details.
+
+ * pal/spi/cocoa/VisionKitCoreSPI.h:
+
2021-10-12 Sihui Liu <[email protected]>
Implement FileSystemSyncAccessHandle read() and write()
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/VisionKitCoreSPI.h (284075 => 284076)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/VisionKitCoreSPI.h 2021-10-13 01:40:07 UTC (rev 284075)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/VisionKitCoreSPI.h 2021-10-13 01:52:38 UTC (rev 284076)
@@ -126,8 +126,16 @@
@property (nonatomic, readonly) NSArray<VKWKTextInfo *> *children;
@end
+@class DDScannerResult;
+
+@interface VKWKDataDetectorInfo : NSObject
+@property (nonatomic, readonly) DDScannerResult *result;
+@property (nonatomic, readonly) NSArray<VKQuad *> *boundingQuads;
+@end
+
@interface VKImageAnalysis (WebKitSPI)
@property (nonatomic, readonly) NSArray<VKWKLineInfo *> *allLines;
+@property (nonatomic, readonly) NSArray<VKWKDataDetectorInfo *> *textDataDetectors;
#if HAVE(VK_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES)
@property (nonatomic) UIMenu *mrcMenu;
@property (nonatomic, nullable, weak) UIViewController *presentingViewControllerForMrcAction;
Modified: trunk/Source/WebKit/ChangeLog (284075 => 284076)
--- trunk/Source/WebKit/ChangeLog 2021-10-13 01:40:07 UTC (rev 284075)
+++ trunk/Source/WebKit/ChangeLog 2021-10-13 01:52:38 UTC (rev 284076)
@@ -1,3 +1,20 @@
+2021-10-12 Wenson Hsieh <[email protected]>
+
+ Move some staged VisionKitCore SPI into VisionKitCoreSPI.h
+ https://bugs.webkit.org/show_bug.cgi?id=231648
+
+ Reviewed by Tim Horton.
+
+ Move these interface declarations out of this implementation file, and into PAL instead, but only if we're not
+ using the Apple internal SDK. Additionally, redefine VKWKDataDetectorInfo as a class instead of a protocol; this
+ workaround was only added to ensure source and binary compatibility with older versions of the internal macOS
+ Monterey/iOS 15 SDK.
+
+ No change in behavior.
+
+ * Platform/cocoa/TextRecognitionUtilities.mm:
+ (WebKit::makeTextRecognitionResult):
+
2021-10-12 Alex Christensen <[email protected]>
Use std::variant instead of WTF::Variant
Modified: trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm (284075 => 284076)
--- trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm 2021-10-13 01:40:07 UTC (rev 284075)
+++ trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm 2021-10-13 01:52:38 UTC (rev 284076)
@@ -32,21 +32,6 @@
#import <pal/cocoa/VisionKitCoreSoftLink.h>
#import <pal/spi/cocoa/FeatureFlagsSPI.h>
-// Note that this is actually declared as an Objective-C class in VisionKit headers.
-// However, for staging purposes, we define it as a protocol instead to avoid symbol
-// redefinition errors that would arise when compiling with an SDK that contains the
-// real definition of VKWKDataDetectorInfo.
-// Once the changes in rdar://77978745 have been in the SDK for a while, we can remove
-// this staging declaration and use the real Objective-C class.
-@protocol VKWKDataDetectorInfo
-@property (nonatomic, readonly) DDScannerResult *result;
-@property (nonatomic, readonly) NSArray<VKQuad *> *boundingQuads;
-@end
-
-@interface VKImageAnalysis (Staging_77978745)
-@property (nonatomic, readonly) NSArray<id <VKWKDataDetectorInfo>> *textDataDetectors;
-@end
-
namespace WebKit {
using namespace WebCore;
@@ -110,7 +95,7 @@
if ([analysis respondsToSelector:@selector(textDataDetectors)]) {
auto dataDetectors = retainPtr(analysis.textDataDetectors);
result.dataDetectors.reserveInitialCapacity([dataDetectors count]);
- for (id <VKWKDataDetectorInfo> info in dataDetectors.get())
+ for (VKWKDataDetectorInfo *info in dataDetectors.get())
result.dataDetectors.uncheckedAppend({ info.result, floatQuads(info.boundingQuads) });
}
#endif // ENABLE(DATA_DETECTION)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes