Title: [288505] branches/safari-613-branch/Source/WebKit
Revision
288505
Author
[email protected]
Date
2022-01-24 17:55:17 -0800 (Mon, 24 Jan 2022)

Log Message

Cherry-pick r288034. rdar://problem/86341944

    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:]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (288504 => 288505)


--- branches/safari-613-branch/Source/WebKit/ChangeLog	2022-01-25 01:55:14 UTC (rev 288504)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog	2022-01-25 01:55:17 UTC (rev 288505)
@@ -1,5 +1,47 @@
 2022-01-24  Alan Coon  <[email protected]>
 
+        Cherry-pick r288034. rdar://problem/86341944
+
+    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:]):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-14  Dean Jackson  <[email protected]>
+
+            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-24  Alan Coon  <[email protected]>
+
         Cherry-pick r288010. rdar://problem/87557846
 
     Expose way to encode CTAP commands with only the hash of ClientDataJSON

Modified: branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (288504 => 288505)


--- branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm	2022-01-25 01:55:14 UTC (rev 288504)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm	2022-01-25 01:55:17 UTC (rev 288505)
@@ -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: branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (288504 => 288505)


--- branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h	2022-01-25 01:55:14 UTC (rev 288504)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h	2022-01-25 01:55:17 UTC (rev 288505)
@@ -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: branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm (288504 => 288505)


--- branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm	2022-01-25 01:55:14 UTC (rev 288504)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm	2022-01-25 01:55:17 UTC (rev 288505)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to