WebKit Bugzilla
Attachment 361423 Details for
Bug 194403
: Expose WKPreferences._shouldPrintBackgrounds on iOS and deprecate WKWebViewConfiguration._printsBackgrounds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194403-20190207113435.patch (text/plain), 6.95 KB, created by
Alex Christensen
on 2019-02-07 11:34:36 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-02-07 11:34:36 PST
Size:
6.95 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 241135) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-02-07 Alex Christensen <achristensen@webkit.org> >+ >+ Expose WKPreferences._shouldPrintBackgrounds on iOS and deprecate WKWebViewConfiguration._printsBackgrounds >+ https://bugs.webkit.org/show_bug.cgi?id=194403 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is a step towards fixing the FIXME added in r241131. >+ The preference to print backgrounds needs to be able to be changed at runtime after WKWebView instantiation, >+ and in the long term we don't want the setters in both WKWebViewConfiguration and WKPreferences. >+ >+ * UIProcess/API/Cocoa/WKPreferences.mm: >+ (-[WKPreferences _setShouldPrintBackgrounds:]): >+ (-[WKPreferences _shouldPrintBackgrounds]): >+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h: >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _initializeWithConfiguration:]): >+ * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: >+ > 2019-02-07 Keith Rollin <krollin@apple.com> > > Fix XCBuild issue related to codesigning WebContent process >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (revision 241028) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (working copy) >@@ -859,6 +859,16 @@ - (BOOL)_mediaSourceEnabled > return _preferences->mediaSourceEnabled(); > } > >+- (void)_setShouldPrintBackgrounds:(BOOL)enabled >+{ >+ _preferences->setShouldPrintBackgrounds(enabled); >+} >+ >+- (BOOL)_shouldPrintBackgrounds >+{ >+ return _preferences->shouldPrintBackgrounds(); >+} >+ > #if PLATFORM(MAC) > - (void)_setJavaEnabledForLocalFiles:(BOOL)enabled > { >@@ -960,16 +970,6 @@ - (BOOL)_pageCacheSupportsPlugins > return _preferences->pageCacheSupportsPlugins(); > } > >-- (void)_setShouldPrintBackgrounds:(BOOL)enabled >-{ >- _preferences->setShouldPrintBackgrounds(enabled); >-} >- >-- (BOOL)_shouldPrintBackgrounds >-{ >- return _preferences->shouldPrintBackgrounds(); >-} >- > - (void)_setWebSecurityEnabled:(BOOL)enabled > { > _preferences->setWebSecurityEnabled(enabled); >Index: Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (revision 241028) >+++ Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (working copy) >@@ -154,6 +154,7 @@ typedef NS_ENUM(NSInteger, _WKEditableLi > @property (nonatomic, setter=_setNeedsSiteSpecificQuirks:) BOOL _needsSiteSpecificQuirks WK_API_AVAILABLE(macosx(10.13.4), ios(WK_IOS_TBA)); > @property (nonatomic, setter=_setItpDebugModeEnabled:) BOOL _itpDebugModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); > @property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macosx(10.13.4), ios(WK_IOS_TBA)); >+@property (nonatomic, setter=_setShouldPrintBackgrounds:) BOOL _shouldPrintBackgrounds WK_API_AVAILABLE(macosx(10.13.4), ios(WK_IOS_TBA)); > > #if !TARGET_OS_IPHONE > @property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macosx(10.13.4)); >@@ -167,7 +168,6 @@ typedef NS_ENUM(NSInteger, _WKEditableLi > @property (nonatomic, setter=_setLocalFileContentSniffingEnabled:) BOOL _localFileContentSniffingEnabled WK_API_AVAILABLE(macosx(10.13.4)); > @property (nonatomic, setter=_setUsesPageCache:) BOOL _usesPageCache WK_API_AVAILABLE(macosx(10.13.4)); > @property (nonatomic, setter=_setPageCacheSupportsPlugins:) BOOL _pageCacheSupportsPlugins WK_API_AVAILABLE(macosx(10.13.4)); >-@property (nonatomic, setter=_setShouldPrintBackgrounds:) BOOL _shouldPrintBackgrounds WK_API_AVAILABLE(macosx(10.13.4)); > @property (nonatomic, setter=_setWebSecurityEnabled:) BOOL _webSecurityEnabled WK_API_AVAILABLE(macosx(10.13.4)); > @property (nonatomic, setter=_setUniversalAccessFromFileURLsAllowed:) BOOL _universalAccessFromFileURLsAllowed WK_API_AVAILABLE(macosx(10.13.4)); > @property (nonatomic, setter=_setSuppressesIncrementalRendering:) BOOL _suppressesIncrementalRendering WK_API_AVAILABLE(macosx(10.13.4)); >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (revision 241131) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (working copy) >@@ -590,7 +590,9 @@ - (void)_initializeWithConfiguration:(WK > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldRespectImageOrientationKey(), WebKit::WebPreferencesStore::Value(!![_configuration _respectsImageOrientation])); > #if !PLATFORM(MAC) > // FIXME: Expose WKPreferences._shouldPrintBackgrounds on iOS, adopt it in all iOS clients, and remove this and WKWebViewConfiguration._printsBackgrounds. >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldPrintBackgroundsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _printsBackgrounds])); >+ ALLOW_DEPRECATED_DECLARATIONS_END > #endif > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey(), WebKit::WebPreferencesStore::Value([_configuration _incrementalRenderingSuppressionTimeout])); > pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::javaScriptMarkupEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsJavaScriptMarkup])); >Index: Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h >=================================================================== >--- Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (revision 241028) >+++ Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (working copy) >@@ -54,7 +54,7 @@ typedef NS_ENUM(NSUInteger, _WKDragLiftD > @property (nonatomic, setter=_setTreatsSHA1SignedCertificatesAsInsecure:) BOOL _treatsSHA1SignedCertificatesAsInsecure WK_API_AVAILABLE(ios(9_0)); > > @property (nonatomic, setter=_setRespectsImageOrientation:) BOOL _respectsImageOrientation WK_API_AVAILABLE(macosx(10.12), ios(10.0)); >-@property (nonatomic, setter=_setPrintsBackgrounds:) BOOL _printsBackgrounds WK_API_AVAILABLE(macosx(10.12), ios(10.0)); >+@property (nonatomic, setter=_setPrintsBackgrounds:) BOOL _printsBackgrounds WK_API_DEPRECATED_WITH_REPLACEMENT("WKPreferences._shouldPrintBackgrounds", macosx(10.12, WK_MAC_TBA), ios(10.0, WK_IOS_TBA)); > @property (nonatomic, setter=_setIncrementalRenderingSuppressionTimeout:) NSTimeInterval _incrementalRenderingSuppressionTimeout WK_API_AVAILABLE(macosx(10.12), ios(10.0)); > @property (nonatomic, setter=_setAllowsJavaScriptMarkup:) BOOL _allowsJavaScriptMarkup WK_API_AVAILABLE(macosx(10.12), ios(10.0)); > @property (nonatomic, setter=_setConvertsPositionStyleOnCopy:) BOOL _convertsPositionStyleOnCopy WK_API_AVAILABLE(macosx(10.12), ios(10.0));
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:
darin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194403
: 361423