| Differences between
and this patch
- a/Source/WebKit/ChangeLog +21 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2019-09-03  Jiewen Tan  <jiewen_tan@apple.com>
2
3
        [WebAuthn] Add a SPI to enable WebAuthentication in WKPreferences
4
        https://bugs.webkit.org/show_bug.cgi?id=201439
5
        <rdar://problem/54998154>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        This patch adds a SPI to enable WebAuthentication in WKPreferences and make it default off such that
10
        clients that have the right entitlements could turn it on and we don't risk at turning on a Web API
11
        that does nothing by default.
12
13
        * Shared/WebPreferences.yaml:
14
        * Shared/WebPreferencesDefaultValues.cpp:
15
        (WebKit::defaultWebAuthenticationEnabled): Deleted.
16
        * Shared/WebPreferencesDefaultValues.h:
17
        * UIProcess/API/Cocoa/WKPreferences.mm:
18
        (-[WKPreferences _webAuthenticationEnabled]):
19
        (-[WKPreferences _setWebAuthenticationEnabled:]):
20
        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
21
1
2019-09-03  Tim Horton  <timothy_horton@apple.com>
22
2019-09-03  Tim Horton  <timothy_horton@apple.com>
2
23
3
        Null deref under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]'s handler block
24
        Null deref under -[WKWebView _addUpdateVisibleContentRectPreCommitHandler]'s handler block
- a/Source/WebKit/Shared/WebPreferences.yaml -1 / +1 lines
Lines 767-773 InputEventsEnabled: a/Source/WebKit/Shared/WebPreferences.yaml_sec1
767
767
768
WebAuthenticationEnabled:
768
WebAuthenticationEnabled:
769
  type: bool
769
  type: bool
770
  defaultValue: defaultWebAuthenticationEnabled()
770
  defaultValue: false
771
  humanReadableName: "Web Authentication"
771
  humanReadableName: "Web Authentication"
772
  humanReadableDescription: "Enable Web Authentication support"
772
  humanReadableDescription: "Enable Web Authentication support"
773
  webcoreBinding: RuntimeEnabledFeatures
773
  webcoreBinding: RuntimeEnabledFeatures
- a/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp -11 lines
Lines 77-91 bool defaultTextAutosizingUsesIdempotentMode() a/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp_sec1
77
77
78
#endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
78
#endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
79
79
80
bool defaultWebAuthenticationEnabled()
81
{
82
#if PLATFORM(IOS_FAMILY)
83
    return WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isSafariViewService();
84
#elif PLATFORM(MAC)
85
    return true;
86
#else
87
    return false;
88
#endif
89
}
90
91
} // namespace WebKit
80
} // namespace WebKit
- a/Source/WebKit/Shared/WebPreferencesDefaultValues.h -2 lines
Lines 280-285 bool defaultCSSOMViewScrollingAPIEnabled(); a/Source/WebKit/Shared/WebPreferencesDefaultValues.h_sec1
280
bool defaultTextAutosizingUsesIdempotentMode();
280
bool defaultTextAutosizingUsesIdempotentMode();
281
#endif
281
#endif
282
282
283
bool defaultWebAuthenticationEnabled();
284
285
} // namespace WebKit
283
} // namespace WebKit
- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm +16 lines
Lines 861-866 - (void)_setSecureContextChecksEnabled:(BOOL)enabled a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm_sec1
861
    _preferences->setSecureContextChecksEnabled(enabled);
861
    _preferences->setSecureContextChecksEnabled(enabled);
862
}
862
}
863
863
864
- (BOOL)_webAuthenticationEnabled
865
{
866
#if ENABLE(WEB_AUTHN)
867
    return _preferences->webAuthenticationEnabled();
868
#else
869
    return NO;
870
#endif
871
}
872
873
- (void)_setWebAuthenticationEnabled:(BOOL)enabled
874
{
875
#if ENABLE(WEB_AUTHN)
876
    _preferences->setWebAuthenticationEnabled(enabled);
877
#endif
878
}
879
864
#if PLATFORM(MAC)
880
#if PLATFORM(MAC)
865
- (void)_setJavaEnabledForLocalFiles:(BOOL)enabled
881
- (void)_setJavaEnabledForLocalFiles:(BOOL)enabled
866
{
882
{
- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h +1 lines
Lines 157-162 typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) { a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h_sec1
157
@property (nonatomic, setter=_setItpDebugModeEnabled:) BOOL _itpDebugModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
157
@property (nonatomic, setter=_setItpDebugModeEnabled:) BOOL _itpDebugModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
158
@property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
158
@property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macos(10.13.4), ios(WK_IOS_TBA));
159
@property (nonatomic, setter=_setSecureContextChecksEnabled:) BOOL _secureContextChecksEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
159
@property (nonatomic, setter=_setSecureContextChecksEnabled:) BOOL _secureContextChecksEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
160
@property (nonatomic, setter=_setWebAuthenticationEnabled:) BOOL _webAuthenticationEnabled WK_API_AVAILABLE(macos(10.13), ios(13.0));
160
161
161
#if !TARGET_OS_IPHONE
162
#if !TARGET_OS_IPHONE
162
@property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macos(10.13.4));
163
@property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macos(10.13.4));
- a/Tools/ChangeLog +13 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2019-09-03  Jiewen Tan  <jiewen_tan@apple.com>
2
3
        [WebAuthn] Add a SPI to enable WebAuthentication in WKPreferences
4
        https://bugs.webkit.org/show_bug.cgi?id=201439
5
        <rdar://problem/54998154>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * MiniBrowser/mac/AppDelegate.m:
10
        (defaultConfiguration):
11
        Turn WebAuthentication on by default. This patch also moves other preference setting code
12
        below the code that set them to default values such that it can take effects.
13
1
2019-09-03  Jonathan Bedard  <jbedard@apple.com>
14
2019-09-03  Jonathan Bedard  <jbedard@apple.com>
2
15
3
        results.webkit.org: Move legend into sidebar
16
        results.webkit.org: Move legend into sidebar
- a/Tools/MiniBrowser/mac/AppDelegate.m -4 / +6 lines
Lines 84-93 - (void)awakeFromNib a/Tools/MiniBrowser/mac/AppDelegate.m_sec1
84
84
85
    if (!configuration) {
85
    if (!configuration) {
86
        configuration = [[WKWebViewConfiguration alloc] init];
86
        configuration = [[WKWebViewConfiguration alloc] init];
87
        configuration.preferences._fullScreenEnabled = YES;
88
        configuration.preferences._developerExtrasEnabled = YES;
89
        configuration.preferences._mediaDevicesEnabled = YES;
90
        configuration.preferences._mockCaptureDevicesEnabled = YES;
91
87
92
        _WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolConfiguration alloc] init] autorelease];
88
        _WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolConfiguration alloc] init] autorelease];
93
        processConfiguration.diskCacheSpeculativeValidationEnabled = ![SettingsController shared].networkCacheSpeculativeRevalidationDisabled;
89
        processConfiguration.diskCacheSpeculativeValidationEnabled = ![SettingsController shared].networkCacheSpeculativeRevalidationDisabled;
Lines 117-122 - (void)awakeFromNib a/Tools/MiniBrowser/mac/AppDelegate.m_sec2
117
                enabled = [feature defaultValue];
113
                enabled = [feature defaultValue];
118
            [configuration.preferences _setEnabled:enabled forInternalDebugFeature:feature];
114
            [configuration.preferences _setEnabled:enabled forInternalDebugFeature:feature];
119
        }
115
        }
116
117
        configuration.preferences._fullScreenEnabled = YES;
118
        configuration.preferences._developerExtrasEnabled = YES;
119
        configuration.preferences._mediaDevicesEnabled = YES;
120
        configuration.preferences._mockCaptureDevicesEnabled = YES;
121
        configuration.preferences._webAuthenticationEnabled = YES;
120
    }
122
    }
121
123
122
    configuration.suppressesIncrementalRendering = [SettingsController shared].incrementalRenderingSuppressed;
124
    configuration.suppressesIncrementalRendering = [SettingsController shared].incrementalRenderingSuppressed;

Return to Bug 201439