WebKit Bugzilla
Attachment 345923 Details for
Bug 188095
: Transition more WKWebViewConfiguration ivars to API::PageConfiguration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188095-20180727103424.patch (text/plain), 9.32 KB, created by
Alex Christensen
on 2018-07-27 10:34:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-07-27 10:34:25 PDT
Size:
9.32 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234314) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2018-07-27 Alex Christensen <achristensen@webkit.org> >+ >+ Transition more WKWebViewConfiguration ivars to API::PageConfiguration >+ https://bugs.webkit.org/show_bug.cgi?id=188095 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _initializeWithConfiguration:]): >+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: >+ (-[WKWebViewConfiguration init]): >+ (-[WKWebViewConfiguration copyWithZone:]): >+ (-[WKWebViewConfiguration _printsBackgrounds]): >+ (-[WKWebViewConfiguration _setPrintsBackgrounds:]): >+ (-[WKWebViewConfiguration _setCPULimit:]): >+ (-[WKWebViewConfiguration _cpuLimit]): >+ (-[WKWebViewConfiguration _applePayEnabled]): >+ (-[WKWebViewConfiguration _setApplePayEnabled:]): >+ > 2018-07-27 Alex Christensen <achristensen@webkit.org> > > Remove unused WKNavigationDelegatePrivate decidePolicyForNavigationAction SPI >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 234313) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -535,7 +535,6 @@ - (void)_initializeWithConfiguration:(WK > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::suppressesIncrementalRenderingKey(), WebKit::WebPreferencesStore::Value(!![_configuration suppressesIncrementalRendering])); > > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldRespectImageOrientationKey(), WebKit::WebPreferencesStore::Value(!![_configuration _respectsImageOrientation])); >- pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldPrintBackgroundsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _printsBackgrounds])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey(), WebKit::WebPreferencesStore::Value([_configuration _incrementalRenderingSuppressionTimeout])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::javaScriptMarkupEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsJavaScriptMarkup])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy])); >@@ -553,8 +552,6 @@ - (void)_initializeWithConfiguration:(WK > #endif > > #if PLATFORM(MAC) >- if (auto cpuLimit = [_configuration _cpuLimit]) >- pageConfiguration->setCPULimit(cpuLimit); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::showsURLsInToolTipsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _showsURLsInToolTips])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::serviceControlsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _serviceControlsEnabled])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::imageControlsEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _imageControlsEnabled])); >@@ -597,10 +594,6 @@ // We are in the View's initializati > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowsAirPlayForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsAirPlayForMediaPlayback])); > #endif > >-#if ENABLE(APPLE_PAY) >- pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::applePayEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _applePayEnabled])); >-#endif >- > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::needsStorageAccessFromFileURLsQuirkKey(), WebKit::WebPreferencesStore::Value(!![_configuration _needsStorageAccessFromFileURLsQuirk])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::mediaContentTypesRequiringHardwareSupportKey(), WebKit::WebPreferencesStore::Value(String([_configuration _mediaContentTypesRequiringHardwareSupport]))); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::allowMediaContentTypesRequiringHardwareSupportAsFallbackKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowMediaContentTypesRequiringHardwareSupportAsFallback])); >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (revision 234313) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (working copy) >@@ -38,6 +38,8 @@ > #import "WKWebView.h" > #import "WKWebViewContentProviderRegistry.h" > #import "WebKit2Initialize.h" >+#import "WebPreferencesDefaultValues.h" >+#import "WebPreferencesKeys.h" > #import "WebURLSchemeHandlerCocoa.h" > #import "_WKVisitedLinkStore.h" > #import "_WKWebsiteDataStoreInternal.h" >@@ -117,7 +119,6 @@ static _WKDragLiftDelay toDragLiftDelay( > LazyInitialized<RetainPtr<NSString>> _applicationNameForUserAgent; > NSTimeInterval _incrementalRenderingSuppressionTimeout; > BOOL _respectsImageOrientation; >- BOOL _printsBackgrounds; > BOOL _allowsJavaScriptMarkup; > BOOL _convertsPositionStyleOnCopy; > BOOL _allowsMetaRefresh; >@@ -142,7 +143,6 @@ static _WKDragLiftDelay toDragLiftDelay( > > #if PLATFORM(MAC) > WKRetainPtr<WKPageGroupRef> _pageGroup; >- double _cpuLimit; > BOOL _showsURLsInToolTips; > BOOL _serviceControlsEnabled; > BOOL _imageControlsEnabled; >@@ -156,9 +156,6 @@ static _WKDragLiftDelay toDragLiftDelay( > RetainPtr<_WKApplicationManifest> _applicationManifest; > #endif > >-#if ENABLE(APPLE_PAY) >- BOOL _applePayEnabled; >-#endif > BOOL _needsStorageAccessFromFileURLsQuirk; > BOOL _legacyEncryptedMediaAPIEnabled; > BOOL _allowMediaContentTypesRequiringHardwareSupportAsFallback; >@@ -208,12 +205,9 @@ - (instancetype)init > > #if PLATFORM(IOS) > _respectsImageOrientation = YES; >- _printsBackgrounds = YES; > #endif > > #if PLATFORM(MAC) >- _cpuLimit = 0; >- _printsBackgrounds = NO; > _respectsImageOrientation = NO; > _showsURLsInToolTips = NO; > _serviceControlsEnabled = NO; >@@ -356,7 +350,6 @@ - (id)copyWithZone:(NSZone *)zone > configuration.applicationNameForUserAgent = self.applicationNameForUserAgent; > > configuration->_respectsImageOrientation = self->_respectsImageOrientation; >- configuration->_printsBackgrounds = self->_printsBackgrounds; > configuration->_incrementalRenderingSuppressionTimeout = self->_incrementalRenderingSuppressionTimeout; > configuration->_allowsJavaScriptMarkup = self->_allowsJavaScriptMarkup; > configuration->_convertsPositionStyleOnCopy = self->_convertsPositionStyleOnCopy; >@@ -386,7 +379,6 @@ - (id)copyWithZone:(NSZone *)zone > configuration->_systemPreviewEnabled = self->_systemPreviewEnabled; > #endif > #if PLATFORM(MAC) >- configuration->_cpuLimit = self->_cpuLimit; > configuration->_userInterfaceDirectionPolicy = self->_userInterfaceDirectionPolicy; > configuration->_showsURLsInToolTips = self->_showsURLsInToolTips; > configuration->_serviceControlsEnabled = self->_serviceControlsEnabled; >@@ -400,9 +392,6 @@ - (id)copyWithZone:(NSZone *)zone > #if ENABLE(WIRELESS_TARGET_PLAYBACK) > configuration->_allowsAirPlayForMediaPlayback = self->_allowsAirPlayForMediaPlayback; > #endif >-#if ENABLE(APPLE_PAY) >- configuration->_applePayEnabled = self->_applePayEnabled; >-#endif > #if ENABLE(APPLICATION_MANIFEST) > configuration->_applicationManifest = self->_applicationManifest; > #endif >@@ -604,12 +593,16 @@ - (void)_setRespectsImageOrientation:(BO > > - (BOOL)_printsBackgrounds > { >- return _printsBackgrounds; >+ auto& values = _pageConfiguration->preferenceValues(); >+ auto it = values.find(WebKit::WebPreferencesKey::shouldPrintBackgroundsKey()); >+ if (it != values.end()) >+ return it->value.asBool(); >+ return DEFAULT_SHOULD_PRINT_BACKGROUNDS; > } > > - (void)_setPrintsBackgrounds:(BOOL)printsBackgrounds > { >- _printsBackgrounds = printsBackgrounds; >+ _pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldPrintBackgroundsKey(), WebKit::WebPreferencesStore::Value(!!printsBackgrounds)); > } > > - (NSTimeInterval)_incrementalRenderingSuppressionTimeout >@@ -940,12 +933,12 @@ - (void)_setPageGroup:(WKPageGroupRef)pa > > - (void)_setCPULimit:(double)cpuLimit > { >- _cpuLimit = cpuLimit; >+ _pageConfiguration->setCPULimit(cpuLimit); > } > > - (double)_cpuLimit > { >- return _cpuLimit; >+ return _pageConfiguration->cpuLimit().value_or(0); > } > > #endif // PLATFORM(MAC) >@@ -953,16 +946,18 @@ - (double)_cpuLimit > - (BOOL)_applePayEnabled > { > #if ENABLE(APPLE_PAY) >- return _applePayEnabled; >-#else >- return NO; >+ auto& values = _pageConfiguration->preferenceValues(); >+ auto it = values.find(WebKit::WebPreferencesKey::applePayEnabledKey()); >+ if (it != values.end()) >+ return it->value.asBool(); > #endif >+ return NO; > } > > - (void)_setApplePayEnabled:(BOOL)applePayEnabled > { > #if ENABLE(APPLE_PAY) >- _applePayEnabled = applePayEnabled; >+ _pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::applePayEnabledKey(), WebKit::WebPreferencesStore::Value(!!applePayEnabled)); > #endif > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
sam
:
review-
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188095
: 345923 |
346008