Diff
Modified: trunk/Source/WTF/ChangeLog (269804 => 269805)
--- trunk/Source/WTF/ChangeLog 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WTF/ChangeLog 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1,3 +1,17 @@
+2020-11-13 Sam Weinig <[email protected]>
+
+ Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218914
+
+ Reviewed by Tim Horton.
+
+ Moves AppleMailPaginationQuirkEnabled, ContentDispositionAttachmentSandboxEnabled and
+ UseImageDocumentForSubframePDF from Settings.yaml to WebPreferences.yaml. Merges in
+ WebCore values from ScrollingPerformanceLoggingEnabled and removes binding override
+ since it can now be fully generated.
+
+ * Scripts/Preferences/WebPreferences.yaml:
+
2020-11-13 Xan López <[email protected]>
[JSC] Use symbols as identifiers for class fields computed names storage
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (269804 => 269805)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2020-11-14 00:02:18 UTC (rev 269805)
@@ -252,6 +252,17 @@
WebCore:
default: true
+AppleMailPaginationQuirkEnabled:
+ type: bool
+ defaultValue:
+ WebKitLegacy:
+ default: false
+ WebKit:
+ PLATFORM(MAC): WebKit::defaultAppleMailPaginationQuirkEnabled()
+ default: false
+ WebCore:
+ default: false
+
# FIXME: Is this implemented for WebKitLegacy? If not, this should be excluded from WebKitLegacy entirely (though we should still set the default value to false when initializing settings).
ApplePayCapabilityDisclosureAllowed:
type: bool
@@ -437,6 +448,22 @@
"PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)": true
default: false
+ContentDispositionAttachmentSandboxEnabled:
+ comment: 'Some ports (e.g. iOS) might choose to display attachments inline, regardless
+ of whether the response includes the HTTP header \"Content-Disposition: attachment\".
+ This setting enables a sandbox around these attachments. The sandbox enforces
+ all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also
+ disables <meta http-equiv> processing and subframe loading.'
+ type: bool
+ defaultValue:
+ WebKitLegacy:
+ default: true
+ WebKit:
+ PLATFORM(COCOA): true
+ default: false
+ WebCore:
+ default: false
+
# FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
CookieEnabled:
type: bool
@@ -1823,12 +1850,13 @@
ScrollingPerformanceLoggingEnabled:
type: bool
webcoreOnChange: scrollingPerformanceLoggingEnabledChanged
- webcoreBinding: custom
defaultValue:
WebKitLegacy:
default: false
WebKit:
default: false
+ WebCore:
+ default: false
# FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
SelectTrailingWhitespaceEnabled:
@@ -2278,6 +2306,19 @@
WebCore:
default: false
+UseImageDocumentForSubframePDF:
+ type: bool
+ defaultValue:
+ WebKitLegacy:
+ PLATFORM(IOS_FAMILY): true
+ default: false
+ WebKit:
+ PLATFORM(IOS_FAMILY): true
+ default: false
+ WebCore:
+ PLATFORM(IOS_FAMILY): true
+ default: false
+
UseLegacyBackgroundSizeShorthandBehavior:
type: bool
defaultValue:
Modified: trunk/Source/WebCore/ChangeLog (269804 => 269805)
--- trunk/Source/WebCore/ChangeLog 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebCore/ChangeLog 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1,3 +1,16 @@
+2020-11-13 Sam Weinig <[email protected]>
+
+ Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218914
+
+ Reviewed by Tim Horton.
+
+ Moves AppleMailPaginationQuirkEnabled, ContentDispositionAttachmentSandboxEnabled and
+ UseImageDocumentForSubframePDF from Settings.yaml to WebPreferences.yaml and merges in
+ WebCore values for ScrollingPerformanceLoggingEnabled.
+
+ * page/Settings.yaml:
+
2020-11-13 Ryan Haddad <[email protected]>
Unreviewed, reverting r269776.
Modified: trunk/Source/WebCore/page/Settings.yaml (269804 => 269805)
--- trunk/Source/WebCore/page/Settings.yaml 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebCore/page/Settings.yaml 2020-11-14 00:02:18 UTC (rev 269805)
@@ -41,12 +41,6 @@
WebCore:
default: false
-AppleMailPaginationQuirkEnabled:
- type: bool
- defaultValue:
- WebCore:
- default: false
-
AudioPlaybackRequiresUserGesture:
type: bool
defaultValue:
@@ -88,18 +82,6 @@
WebCore:
default: ClipboardAccessPolicy::RequiresUserGesture
-ContentDispositionAttachmentSandboxEnabled:
- comment: >-
- Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the
- response includes the HTTP header \"Content-Disposition: attachment\". This setting enables
- a sandbox around these attachments. The sandbox enforces all frame sandbox flags (see enum
- SandboxFlag in SecurityContext.h), and also disables <meta http-equiv> processing and subframe
- loading.
- type: bool
- defaultValue:
- WebCore:
- default: false
-
CrossOriginCheckInGetMatchedCSSRulesDisabled:
type: bool
defaultValue:
@@ -459,13 +441,6 @@
WebCore:
default: false
-ScrollingPerformanceLoggingEnabled:
- type: bool
- webcoreOnChange: scrollingPerformanceLoggingEnabledChanged
- defaultValue:
- WebCore:
- default: false
-
ScrollingTreeIncludesFrames:
type: bool
defaultValue:
@@ -590,12 +565,6 @@
WebCore:
default: true
-UseImageDocumentForSubframePDF:
- type: bool
- defaultValue:
- WebCore:
- default: false
-
UserInterfaceDirectionPolicy:
type: uint32_t
refinedType: UserInterfaceDirectionPolicy
Modified: trunk/Source/WebKit/ChangeLog (269804 => 269805)
--- trunk/Source/WebKit/ChangeLog 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/ChangeLog 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1,3 +1,47 @@
+2020-11-13 Sam Weinig <[email protected]>
+
+ Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218914
+
+ Reviewed by Tim Horton.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode const):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::WebPageProxy::appleMailPaginationQuirkEnabled): Deleted.
+ (WebKit::WebPageProxy::appleMailLinesClampEnabled): Deleted.
+ Removes appleMailPaginationQuirkEnabled and appleMailLinesClampEnabled.
+ appleMailPaginationQuirkEnabled is now handled via the preferences infrastructure
+ and appleMailLinesClampEnabled was unused.
+
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultAppleMailPaginationQuirkEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+ Adds default value for AppleMailPaginationQuirkEnabled, which is now in WebPreferences.yaml.
+ Moved from WebPageProxyMac.mm
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ Removes explicit setting of setAppleMailPaginationQuirkEnabled, setContentDispositionAttachmentSandboxEnabled,
+ setScrollingPerformanceLoggingEnabled and setUseImageDocumentForSubframePDF which are all generated now.
+ LayoutViewportHeightExpansionFactor was already generated so this call was just redundant.
+
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::setScrollingPerformanceLoggingEnabled): Deleted.
+ It's also no longer necessary to store m_scrollingPerformanceLoggingEnabled as the value
+ can be extracted directly from the store in the one place it was read. setScrollingPerformanceLoggingEnabled
+ was never called, so has been removed.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+ Extract scrollingPerformanceLoggingEnabled directly from the store rather than having the page
+ set it just for this one place to read it.
+
2020-11-13 Geoffrey Garen <[email protected]>
Removed DeferrableTaskTimer
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (269804 => 269805)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2020-11-14 00:02:18 UTC (rev 269805)
@@ -127,8 +127,6 @@
#if PLATFORM(WIN)
encoder << nativeWindowHandle;
#endif
- encoder << appleMailPaginationQuirkEnabled;
- encoder << appleMailLinesClampEnabled;
encoder << shouldScaleViewToFitDocument;
encoder << userInterfaceLayoutDirection;
encoder << observedLayoutMilestones;
@@ -396,12 +394,6 @@
return WTF::nullopt;
#endif
- if (!decoder.decode(parameters.appleMailPaginationQuirkEnabled))
- return WTF::nullopt;
-
- if (!decoder.decode(parameters.appleMailLinesClampEnabled))
- return WTF::nullopt;
-
if (!decoder.decode(parameters.shouldScaleViewToFitDocument))
return WTF::nullopt;
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (269804 => 269805)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2020-11-14 00:02:18 UTC (rev 269805)
@@ -186,8 +186,6 @@
#if PLATFORM(WIN)
uint64_t nativeWindowHandle;
#endif
- bool appleMailPaginationQuirkEnabled;
- bool appleMailLinesClampEnabled;
bool shouldScaleViewToFitDocument;
WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection;
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (269804 => 269805)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-11-14 00:02:18 UTC (rev 269805)
@@ -82,7 +82,15 @@
#endif
+#if PLATFORM(MAC)
+bool defaultAppleMailPaginationQuirkEnabled()
+{
+ return WebCore::MacApplication::isAppleMail();
+}
+
+#endif
+
static bool defaultAsyncFrameAndOverflowScrollingEnabled()
{
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (269804 => 269805)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2020-11-14 00:02:18 UTC (rev 269805)
@@ -55,6 +55,10 @@
bool defaultDisallowSyncXHRDuringPageDismissalEnabled();
#endif
+#if PLATFORM(MAC)
+bool defaultAppleMailPaginationQuirkEnabled();
+#endif
+
#if !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS)
bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (269804 => 269805)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-11-14 00:02:18 UTC (rev 269805)
@@ -7837,19 +7837,6 @@
parameters.canShowWhileLocked = m_configuration->canShowWhileLocked();
#endif
-#if PLATFORM(MAC)
- parameters.appleMailPaginationQuirkEnabled = appleMailPaginationQuirkEnabled();
-#else
- parameters.appleMailPaginationQuirkEnabled = false;
-#endif
-
-#if PLATFORM(MAC)
- // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.
- parameters.appleMailLinesClampEnabled = appleMailLinesClampEnabled();
-#else
- parameters.appleMailLinesClampEnabled = false;
-#endif
-
#if PLATFORM(COCOA)
parameters.smartInsertDeleteEnabled = m_isSmartInsertDeleteEnabled;
parameters.additionalSupportedImageTypes = m_configuration->additionalSupportedImageTypes();
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (269804 => 269805)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2020-11-14 00:02:18 UTC (rev 269805)
@@ -2103,15 +2103,6 @@
void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&);
#endif
-#if PLATFORM(MAC)
- bool appleMailPaginationQuirkEnabled();
-#endif
-
-#if PLATFORM(MAC)
- // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.
- bool appleMailLinesClampEnabled();
-#endif
-
// Spelling and grammar.
void checkSpellingOfString(const String& text, CompletionHandler<void(int32_t misspellingLocation, int32_t misspellingLength)>&&);
void checkGrammarOfString(const String& text, CompletionHandler<void(Vector<WebCore::GrammarDetail>&&, int32_t badGrammarLocation, int32_t badGrammarLength)>&&);
Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (269804 => 269805)
--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2020-11-14 00:02:18 UTC (rev 269805)
@@ -591,16 +591,6 @@
return pageClient().boundsOfLayerInLayerBackedWindowCoordinates(layer);
}
-bool WebPageProxy::appleMailPaginationQuirkEnabled()
-{
- return MacApplication::isAppleMail();
-}
-
-bool WebPageProxy::appleMailLinesClampEnabled()
-{
- return MacApplication::isAppleMail();
-}
-
void WebPageProxy::updateEditorState(const EditorState& editorState)
{
bool couldChangeSecureInputState = m_editorState.isInPasswordField != editorState.isInPasswordField || m_editorState.selectionIsNone;
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (269804 => 269805)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-11-14 00:02:18 UTC (rev 269805)
@@ -724,7 +724,6 @@
if (WebMediaKeyStorageManager* manager = webProcess.supplement<WebMediaKeyStorageManager>())
m_page->settings().setMediaKeysStorageDirectory(manager->mediaKeyStorageDirectory());
#endif
- m_page->settings().setAppleMailPaginationQuirkEnabled(parameters.appleMailPaginationQuirkEnabled);
if (parameters.viewScaleFactor != 1)
scaleView(parameters.viewScaleFactor);
@@ -732,7 +731,6 @@
m_page->addLayoutMilestones(parameters.observedLayoutMilestones);
#if PLATFORM(COCOA)
- m_page->settings().setContentDispositionAttachmentSandboxEnabled(true);
setSmartInsertDeleteEnabled(parameters.smartInsertDeleteEnabled);
WebCore::setAdditionalSupportedImageTypes(parameters.additionalSupportedImageTypes);
@@ -3750,9 +3748,6 @@
m_asynchronousPluginInitializationEnabledForAllPlugins = store.getBoolValueForKey(WebPreferencesKey::asynchronousPluginInitializationEnabledForAllPluginsKey());
m_artificialPluginInitializationDelayEnabled = store.getBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey());
- m_scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());
- settings.setScrollingPerformanceLoggingEnabled(m_scrollingPerformanceLoggingEnabled);
-
bool isAppNapEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
if (m_isAppNapEnabled != isAppNapEnabled) {
m_isAppNapEnabled = isAppNapEnabled;
@@ -3768,8 +3763,6 @@
#if PLATFORM(IOS_FAMILY)
setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
-
- settings.setUseImageDocumentForSubframePDF(true);
#if HAVE(AVKIT)
DeprecatedGlobalSettings::setAVKitEnabled(true);
#endif
@@ -3791,8 +3784,6 @@
}
#endif
- settings.setLayoutViewportHeightExpansionFactor(store.getDoubleValueForKey(WebPreferencesKey::layoutViewportHeightExpansionFactorKey()));
-
#if ENABLE(APP_BOUND_DOMAINS)
m_needsInAppBrowserPrivacyQuirks = store.getBoolValueForKey(WebPreferencesKey::needsInAppBrowserPrivacyQuirksKey());
#endif
@@ -5388,17 +5379,6 @@
return nullptr;
}
-void WebPage::setScrollingPerformanceLoggingEnabled(bool enabled)
-{
- m_scrollingPerformanceLoggingEnabled = enabled;
-
- FrameView* frameView = m_mainFrame->coreFrame()->view();
- if (!frameView)
- return;
-
- frameView->setScrollingPerformanceLoggingEnabled(enabled);
-}
-
bool WebPage::canPluginHandleResponse(const ResourceResponse& response)
{
#if ENABLE(NETSCAPE_PLUGIN_API)
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (269804 => 269805)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1074,9 +1074,6 @@
bool artificialPluginInitializationDelayEnabled() const { return m_artificialPluginInitializationDelayEnabled; }
void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; }
- bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }
- void setScrollingPerformanceLoggingEnabled(bool);
-
#if PLATFORM(COCOA)
bool shouldUsePDFPlugin() const;
bool pdfPluginEnabled() const { return m_pdfPluginEnabled; }
@@ -1813,7 +1810,6 @@
bool m_asynchronousPluginInitializationEnabled { false };
bool m_asynchronousPluginInitializationEnabledForAllPlugins { false };
bool m_artificialPluginInitializationDelayEnabled { false };
- bool m_scrollingPerformanceLoggingEnabled { false };
bool m_mainFrameIsScrollable { true };
bool m_alwaysShowsHorizontalScroller { false };
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (269804 => 269805)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2020-11-14 00:02:18 UTC (rev 269805)
@@ -38,6 +38,8 @@
#import "WebPage.h"
#import "WebPageCreationParameters.h"
#import "WebPageProxyMessages.h"
+#import "WebPreferencesKeys.h"
+#import "WebPreferencesStore.h"
#import "WebProcess.h"
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <QuartzCore/QuartzCore.h>
@@ -213,13 +215,13 @@
scheduleRenderingUpdateRunLoopObserver();
}
-void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&)
+void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore& store)
{
Settings& settings = m_webPage.corePage()->settings();
#if ENABLE(ASYNC_SCROLLING)
if (AsyncScrollingCoordinator* scrollingCoordinator = downcast<AsyncScrollingCoordinator>(m_webPage.corePage()->scrollingCoordinator())) {
- bool scrollingPerformanceLoggingEnabled = m_webPage.scrollingPerformanceLoggingEnabled();
+ bool scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());
RefPtr<ScrollingTree> scrollingTree = scrollingCoordinator->scrollingTree();
ScrollingThread::dispatch([scrollingTree, scrollingPerformanceLoggingEnabled] {
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (269804 => 269805)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1,3 +1,16 @@
+2020-11-13 Sam Weinig <[email protected]>
+
+ Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218914
+
+ Reviewed by Tim Horton.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ Remove explicit setting of Settings::setContentDispositionAttachmentSandboxEnabled as
+ it is now handled by the generated code. Merge together a few sequential #ifdefs while
+ in the area.
+
2020-11-12 Darin Adler <[email protected]>
Remove unused advanced plug-in features: snapshotting and plug-in load policy
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (269804 => 269805)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-11-13 23:46:07 UTC (rev 269804)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-11-14 00:02:18 UTC (rev 269805)
@@ -1653,7 +1653,7 @@
WebInstallMemoryPressureHandler();
-#if !PLATFORM(IOS_FAMILY)
+#if PLATFORM(MAC)
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
// Originally, we allowed all local loads.
WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForAll);
@@ -1662,22 +1662,16 @@
// with substitute data.
WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
}
-#endif
-#if PLATFORM(MAC)
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
WebCore::ResourceHandle::forceContentSniffing();
_private->page->setDeviceScaleFactor([self _deviceScaleFactor]);
-#endif
-#if HAVE(OS_DARK_MODE_SUPPORT) && PLATFORM(MAC)
+#if HAVE(OS_DARK_MODE_SUPPORT)
_private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated);
#endif
- _private->page->settings().setContentDispositionAttachmentSandboxEnabled(true);
-
-#if PLATFORM(MAC)
[WebViewVisualIdentificationOverlay installForWebViewIfNeeded:self kind:@"WebView" deprecated:YES];
#endif
}