- Revision
- 258379
- Author
- bfulg...@apple.com
- Date
- 2020-03-12 20:09:44 -0700 (Thu, 12 Mar 2020)
Log Message
Correct preference handling and naming conventions in AppBound browsing preferences
https://bugs.webkit.org/show_bug.cgi?id=209031
<rdar://problem/60396298>
Reviewed by John Wilander.
Source/WebKit:
I made a mistake in the handling of preferences related to the IsInAppBrowserPrivacyEnabled
and the quirk flag, which led to some code not executing when expected.
This patch does the following:
1. Uses the correct naming scheme for WebKit Internal Debug flags. They should be
'WebKitDebug', not 'WebKitInternal' or 'WebKitInternalDebug'.
2. Updates the local quirk state in WebPage when page settings change.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Source/WebKitLegacy/mac:
This patch consistently uses the correct naming scheme for WebKit Internal Debug flags.
They should be 'WebKitDebug', not 'WebKitInternal' or 'WebKitInternalDebug'.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences isInAppBrowserPrivacyEnabled]):
(-[WebPreferences setInAppBrowserPrivacyEnabled:]):
(-[WebPreferences needsInAppBrowserPrivacyQuirks]):
(-[WebPreferences setNeedsInAppBrowserPrivacyQuirks:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (258378 => 258379)
--- trunk/Source/WebKit/ChangeLog 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKit/ChangeLog 2020-03-13 03:09:44 UTC (rev 258379)
@@ -1,3 +1,25 @@
+2020-03-12 Brent Fulgham <bfulg...@apple.com>
+
+ Correct preference handling and naming conventions in AppBound browsing preferences
+ https://bugs.webkit.org/show_bug.cgi?id=209031
+ <rdar://problem/60396298>
+
+ Reviewed by John Wilander.
+
+ I made a mistake in the handling of preferences related to the IsInAppBrowserPrivacyEnabled
+ and the quirk flag, which led to some code not executing when expected.
+
+ This patch does the following:
+
+ 1. Uses the correct naming scheme for WebKit Internal Debug flags. They should be
+ 'WebKitDebug', not 'WebKitInternal' or 'WebKitInternalDebug'.
+ 2. Updates the local quirk state in WebPage when page settings change.
+
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2020-03-12 David Kilzer <ddkil...@apple.com>
WebPageProxy::SaveImageToLibrary should validate its `imageSize` parameter
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (258378 => 258379)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-03-13 03:09:44 UTC (rev 258379)
@@ -167,7 +167,7 @@
#endif
bool shouldIncludeLocalhostInResourceLoadStatistics = isSafari;
- bool isInAppBrowserPrivacyEnabled = [defaults boolForKey:[NSString stringWithFormat:@"InternalDebug%@", WebPreferencesKey::isInAppBrowserPrivacyEnabledKey().createCFString().get()]];
+ bool isInAppBrowserPrivacyEnabled = [defaults boolForKey:[NSString stringWithFormat:@"WebKitDebug%@", WebPreferencesKey::isInAppBrowserPrivacyEnabledKey().createCFString().get()]];
WebsiteDataStoreParameters parameters;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (258378 => 258379)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-03-13 03:09:44 UTC (rev 258379)
@@ -3704,6 +3704,8 @@
settings.setLayoutViewportHeightExpansionFactor(store.getDoubleValueForKey(WebPreferencesKey::layoutViewportHeightExpansionFactorKey()));
+ m_needsInAppBrowserPrivacyQuirks = store.getBoolValueForKey(WebPreferencesKey::needsInAppBrowserPrivacyQuirksKey());
+
if (m_drawingArea)
m_drawingArea->updatePreferences(store);
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (258378 => 258379)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-03-13 03:09:44 UTC (rev 258379)
@@ -1,3 +1,22 @@
+2020-03-12 Brent Fulgham <bfulg...@apple.com>
+
+ Correct preference handling and naming conventions in AppBound browsing preferences
+ https://bugs.webkit.org/show_bug.cgi?id=209031
+ <rdar://problem/60396298>
+
+ Reviewed by John Wilander.
+
+ This patch consistently uses the correct naming scheme for WebKit Internal Debug flags.
+ They should be 'WebKitDebug', not 'WebKitInternal' or 'WebKitInternalDebug'.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isInAppBrowserPrivacyEnabled]):
+ (-[WebPreferences setInAppBrowserPrivacyEnabled:]):
+ (-[WebPreferences needsInAppBrowserPrivacyQuirks]):
+ (-[WebPreferences setNeedsInAppBrowserPrivacyQuirks:]):
+
2020-03-12 youenn fablet <you...@apple.com>
FrameLoader should own its FrameLoaderClient
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h (258378 => 258379)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h 2020-03-13 03:09:44 UTC (rev 258379)
@@ -284,6 +284,6 @@
#define WebKitRequestIdleCallbackEnabledPreferenceKey @"WebKitRequestIdleCallbackEnabled"
#define WebKitAsyncClipboardAPIEnabledPreferenceKey @"WebKitAsyncClipboardAPIEnabled"
#define WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey @"WebKitLinkPreloadResponsiveImagesEnabled"
-#define WebKitInternalDebugInAppBrowserPrivacyEnabledPreferenceKey @"WebKitInternalDebugInAppBrowserPrivacyEnabled"
+#define WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey @"WebKitDebugInAppBrowserPrivacyEnabled"
#define WebKitAspectRatioOfImgFromWidthAndHeightEnabledPreferenceKey @"WebKitAspectRatioOfImgFromWidthAndHeightEnabled"
-#define WebKitInternalDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey @"WebKitInternalDebugNeedsInAppBrowserPrivacyQuirks"
+#define WebKitDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey @"WebKitNeedsInAppBrowserPrivacyQuirks"
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (258378 => 258379)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2020-03-13 00:51:46 UTC (rev 258378)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2020-03-13 03:09:44 UTC (rev 258379)
@@ -710,10 +710,10 @@
@NO, WebKitAsyncClipboardAPIEnabledPreferenceKey,
@NO, WebKitLinkPreloadResponsiveImagesEnabledPreferenceKey,
@YES, WebKitCSSShadowPartsEnabledPreferenceKey,
- @NO, WebKitInternalDebugInAppBrowserPrivacyEnabledPreferenceKey,
+ @NO, WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey,
@NO, WebKitAspectRatioOfImgFromWidthAndHeightEnabledPreferenceKey,
@NO, WebKitWebSQLEnabledPreferenceKey,
- @YES, WebKitInternalDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey,
+ @YES, WebKitDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey,
nil];
#if !PLATFORM(IOS_FAMILY)
@@ -3642,22 +3642,22 @@
- (BOOL)isInAppBrowserPrivacyEnabled
{
- return [self _boolValueForKey:WebKitInternalDebugInAppBrowserPrivacyEnabledPreferenceKey];
+ return [self _boolValueForKey:WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey];
}
- (void)setInAppBrowserPrivacyEnabled:(BOOL)flag
{
- [self _setBoolValue:flag forKey:WebKitInternalDebugInAppBrowserPrivacyEnabledPreferenceKey];
+ [self _setBoolValue:flag forKey:WebKitDebugInAppBrowserPrivacyEnabledPreferenceKey];
}
- (BOOL)needsInAppBrowserPrivacyQuirks
{
- return [self _boolValueForKey:WebKitInternalDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey];
+ return [self _boolValueForKey:WebKitDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey];
}
- (void)setNeedsInAppBrowserPrivacyQuirks:(BOOL)flag
{
- [self _setBoolValue:flag forKey:WebKitInternalDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey];
+ [self _setBoolValue:flag forKey:WebKitDebugNeedsInAppBrowserPrivacyQuirksPreferenceKey];
}
- (BOOL)aspectRatioOfImgFromWidthAndHeightEnabled