Title: [288034] trunk/Source/WebKit
- Revision
- 288034
- Author
- d...@apple.com
- Date
- 2022-01-14 14:58:18 -0800 (Fri, 14 Jan 2022)
Log Message
REGRESSION: ARKit example loads a page full of random symbols instead of a 3D model
https://bugs.webkit.org/show_bug.cgi?id=235254
Reviewed by Tim Horton.
When we enabled the ModelDocument support, we disabled the ContentProvider path.
This was a mistake - it has to be a runtime check.
* UIProcess/API/Cocoa/WKPreferences.mm: Expose the ModelDocumentEnabled WebPreference so that
it can be read from a WKWebViewConfiguration.
(-[WKPreferences _setModelDocumentEnabled:]):
(-[WKPreferences _modelDocumentEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Rather than the compile-time test, check the
WebPreferences to see if ModelDocument is disabled.
(-[WKWebViewContentProviderRegistry initWithConfiguration:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (288033 => 288034)
--- trunk/Source/WebKit/ChangeLog 2022-01-14 22:46:39 UTC (rev 288033)
+++ trunk/Source/WebKit/ChangeLog 2022-01-14 22:58:18 UTC (rev 288034)
@@ -1,3 +1,22 @@
+2022-01-14 Dean Jackson <d...@apple.com>
+
+ REGRESSION: ARKit example loads a page full of random symbols instead of a 3D model
+ https://bugs.webkit.org/show_bug.cgi?id=235254
+
+ Reviewed by Tim Horton.
+
+ When we enabled the ModelDocument support, we disabled the ContentProvider path.
+ This was a mistake - it has to be a runtime check.
+
+ * UIProcess/API/Cocoa/WKPreferences.mm: Expose the ModelDocumentEnabled WebPreference so that
+ it can be read from a WKWebViewConfiguration.
+ (-[WKPreferences _setModelDocumentEnabled:]):
+ (-[WKPreferences _modelDocumentEnabled]):
+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+ * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Rather than the compile-time test, check the
+ WebPreferences to see if ModelDocument is disabled.
+ (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
+
2022-01-14 Wenson Hsieh <wenson_hs...@apple.com>
Avoid redundant text analysis requests when long pressing inside an image that contains Live Text
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (288033 => 288034)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2022-01-14 22:46:39 UTC (rev 288033)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2022-01-14 22:58:18 UTC (rev 288034)
@@ -1560,9 +1560,18 @@
return _preferences->notificationsEnabled();
}
+- (void)_setModelDocumentEnabled:(BOOL)enabled
+{
+ _preferences->setModelDocumentEnabled(enabled);
+}
+
+- (BOOL)_modelDocumentEnabled
+{
+ return _preferences->modelDocumentEnabled();
+}
+
@end
-
@implementation WKPreferences (WKDeprecated)
#if !TARGET_OS_IPHONE
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (288033 => 288034)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2022-01-14 22:46:39 UTC (rev 288033)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2022-01-14 22:58:18 UTC (rev 288034)
@@ -177,6 +177,7 @@
@property (nonatomic, setter=_setStorageAPIEnabled:) BOOL _storageAPIEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, setter=_setAccessHandleEnabled:) BOOL _accessHandleEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, setter=_setNotificationsEnabled:) BOOL _notificationsEnabled WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setModelDocumentEnabled:) BOOL _modelDocumentEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
#if !TARGET_OS_IPHONE
@property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macos(10.13.4));
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm (288033 => 288034)
--- trunk/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm 2022-01-14 22:46:39 UTC (rev 288033)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm 2022-01-14 22:58:18 UTC (rev 288034)
@@ -30,10 +30,11 @@
#import "WKPDFView.h"
#import "WKUSDPreviewView.h"
-#import <WebKit/WKWebViewConfigurationPrivate.h>
#import "WKWebViewInternal.h"
#import "WebPageProxy.h"
#import <WebCore/MIMETypeRegistry.h>
+#import <WebKit/WKPreferencesPrivate.h>
+#import <WebKit/WKWebViewConfigurationPrivate.h>
#import <wtf/FixedVector.h>
#import <wtf/HashCountedSet.h>
#import <wtf/HashMap.h>
@@ -54,8 +55,8 @@
[self registerProvider:[WKPDFView class] forMIMEType:@(type)];
#endif
-#if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS) && !ENABLE(MODEL_ELEMENT)
- if (configuration._systemPreviewEnabled) {
+#if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS)
+ if (configuration._systemPreviewEnabled && !configuration.preferences._modelDocumentEnabled) {
for (auto& type : WebCore::MIMETypeRegistry::usdMIMETypes())
[self registerProvider:[WKUSDPreviewView class] forMIMEType:@(type)];
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes