⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 288505 in webkit


Ignore:
Timestamp:
Jan 24, 2022, 5:55:17 PM (5 years ago)
Author:
Russell Epstein
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

Location:
branches/safari-613-branch/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613-branch/Source/WebKit/ChangeLog

    r288501 r288505  
     12022-01-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r288034. rdar://problem/86341944
     4
     5    REGRESSION:  ARKit example loads a page full of random symbols instead of a 3D model
     6    https://bugs.webkit.org/show_bug.cgi?id=235254
     7   
     8    Reviewed by Tim Horton.
     9   
     10    When we enabled the ModelDocument support, we disabled the ContentProvider path.
     11    This was a mistake - it has to be a runtime check.
     12   
     13    * UIProcess/API/Cocoa/WKPreferences.mm: Expose the ModelDocumentEnabled WebPreference so that
     14    it can be read from a WKWebViewConfiguration.
     15    (-[WKPreferences _setModelDocumentEnabled:]):
     16    (-[WKPreferences _modelDocumentEnabled]):
     17    * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
     18    * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Rather than the compile-time test, check the
     19    WebPreferences to see if ModelDocument is disabled.
     20    (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
     21   
     22    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     23
     24    2022-01-14  Dean Jackson  <dino@apple.com>
     25
     26            REGRESSION:  ARKit example loads a page full of random symbols instead of a 3D model
     27            https://bugs.webkit.org/show_bug.cgi?id=235254
     28
     29            Reviewed by Tim Horton.
     30
     31            When we enabled the ModelDocument support, we disabled the ContentProvider path.
     32            This was a mistake - it has to be a runtime check.
     33
     34            * UIProcess/API/Cocoa/WKPreferences.mm: Expose the ModelDocumentEnabled WebPreference so that
     35            it can be read from a WKWebViewConfiguration.
     36            (-[WKPreferences _setModelDocumentEnabled:]):
     37            (-[WKPreferences _modelDocumentEnabled]):
     38            * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
     39            * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Rather than the compile-time test, check the
     40            WebPreferences to see if ModelDocument is disabled.
     41            (-[WKWebViewContentProviderRegistry initWithConfiguration:]):
     42
    1432022-01-24  Alan Coon  <alancoon@apple.com>
    244
  • branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm

    r287121 r288505  
    15611561}
    15621562
     1563- (void)_setModelDocumentEnabled:(BOOL)enabled
     1564{
     1565    _preferences->setModelDocumentEnabled(enabled);
     1566}
     1567
     1568- (BOOL)_modelDocumentEnabled
     1569{
     1570    return _preferences->modelDocumentEnabled();
     1571}
     1572
    15631573@end
    1564 
    15651574
    15661575@implementation WKPreferences (WKDeprecated)
  • branches/safari-613-branch/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h

    r286911 r288505  
    178178@property (nonatomic, setter=_setAccessHandleEnabled:) BOOL _accessHandleEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    179179@property (nonatomic, setter=_setNotificationsEnabled:) BOOL _notificationsEnabled WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
     180@property (nonatomic, setter=_setModelDocumentEnabled:) BOOL _modelDocumentEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    180181
    181182#if !TARGET_OS_IPHONE
  • branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm

    r285936 r288505  
    3131#import "WKPDFView.h"
    3232#import "WKUSDPreviewView.h"
    33 #import <WebKit/WKWebViewConfigurationPrivate.h>
    3433#import "WKWebViewInternal.h"
    3534#import "WebPageProxy.h"
    3635#import <WebCore/MIMETypeRegistry.h>
     36#import <WebKit/WKPreferencesPrivate.h>
     37#import <WebKit/WKWebViewConfigurationPrivate.h>
    3738#import <wtf/FixedVector.h>
    3839#import <wtf/HashCountedSet.h>
    … …  
    5556#endif
    5657
    57 #if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS) && !ENABLE(MODEL_ELEMENT)
    58     if (configuration._systemPreviewEnabled) {
     58#if USE(SYSTEM_PREVIEW) && !HAVE(UIKIT_WEBKIT_INTERNALS)
     59    if (configuration._systemPreviewEnabled && !configuration.preferences._modelDocumentEnabled) {
    5960        for (auto& type : WebCore::MIMETypeRegistry::usdMIMETypes())
    6061            [self registerProvider:[WKUSDPreviewView class] forMIMEType:@(type)];
Note: See TracChangeset for help on using the changeset viewer.