Changeset 269805 in webkit
- Timestamp:
- Nov 13, 2020, 4:02:18 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/Scripts/Preferences/WebPreferences.yaml (modified) (4 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/page/Settings.yaml (modified) (4 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/Shared/WebPageCreationParameters.cpp (modified) (2 diffs)
-
WebKit/Shared/WebPageCreationParameters.h (modified) (1 diff)
-
WebKit/Shared/WebPreferencesDefaultValues.cpp (modified) (1 diff)
-
WebKit/Shared/WebPreferencesDefaultValues.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.h (modified) (1 diff)
-
WebKit/UIProcess/mac/WebPageProxyMac.mm (modified) (1 diff)
-
WebKit/WebProcess/WebPage/WebPage.cpp (modified) (6 diffs)
-
WebKit/WebProcess/WebPage/WebPage.h (modified) (2 diffs)
-
WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (modified) (3 diffs)
-
WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
WebKitLegacy/mac/WebView/WebView.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r269801 r269805 1 2020-11-13 Sam Weinig <weinig@apple.com> 2 3 Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml 4 https://bugs.webkit.org/show_bug.cgi?id=218914 5 6 Reviewed by Tim Horton. 7 8 Moves AppleMailPaginationQuirkEnabled, ContentDispositionAttachmentSandboxEnabled and 9 UseImageDocumentForSubframePDF from Settings.yaml to WebPreferences.yaml. Merges in 10 WebCore values from ScrollingPerformanceLoggingEnabled and removes binding override 11 since it can now be fully generated. 12 13 * Scripts/Preferences/WebPreferences.yaml: 14 1 15 2020-11-13 Xan López <xan@igalia.com> 2 16 -
trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml
r269785 r269805 253 253 default: true 254 254 255 AppleMailPaginationQuirkEnabled: 256 type: bool 257 defaultValue: 258 WebKitLegacy: 259 default: false 260 WebKit: 261 PLATFORM(MAC): WebKit::defaultAppleMailPaginationQuirkEnabled() 262 default: false 263 WebCore: 264 default: false 265 255 266 # 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). 256 267 ApplePayCapabilityDisclosureAllowed: … … 436 447 WebCore: 437 448 "PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)": true 449 default: false 450 451 ContentDispositionAttachmentSandboxEnabled: 452 comment: 'Some ports (e.g. iOS) might choose to display attachments inline, regardless 453 of whether the response includes the HTTP header \"Content-Disposition: attachment\". 454 This setting enables a sandbox around these attachments. The sandbox enforces 455 all frame sandbox flags (see enum SandboxFlag in SecurityContext.h), and also 456 disables <meta http-equiv> processing and subframe loading.' 457 type: bool 458 defaultValue: 459 WebKitLegacy: 460 default: true 461 WebKit: 462 PLATFORM(COCOA): true 463 default: false 464 WebCore: 438 465 default: false 439 466 … … 1824 1851 type: bool 1825 1852 webcoreOnChange: scrollingPerformanceLoggingEnabledChanged 1826 webcoreBinding: custom 1827 defaultValue: 1828 WebKitLegacy: 1829 default: false 1830 WebKit: 1853 defaultValue: 1854 WebKitLegacy: 1855 default: false 1856 WebKit: 1857 default: false 1858 WebCore: 1831 1859 default: false 1832 1860 … … 2279 2307 default: false 2280 2308 2309 UseImageDocumentForSubframePDF: 2310 type: bool 2311 defaultValue: 2312 WebKitLegacy: 2313 PLATFORM(IOS_FAMILY): true 2314 default: false 2315 WebKit: 2316 PLATFORM(IOS_FAMILY): true 2317 default: false 2318 WebCore: 2319 PLATFORM(IOS_FAMILY): true 2320 default: false 2321 2281 2322 UseLegacyBackgroundSizeShorthandBehavior: 2282 2323 type: bool -
trunk/Source/WebCore/ChangeLog
r269803 r269805 1 2020-11-13 Sam Weinig <weinig@apple.com> 2 3 Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml 4 https://bugs.webkit.org/show_bug.cgi?id=218914 5 6 Reviewed by Tim Horton. 7 8 Moves AppleMailPaginationQuirkEnabled, ContentDispositionAttachmentSandboxEnabled and 9 UseImageDocumentForSubframePDF from Settings.yaml to WebPreferences.yaml and merges in 10 WebCore values for ScrollingPerformanceLoggingEnabled. 11 12 * page/Settings.yaml: 13 1 14 2020-11-13 Ryan Haddad <ryanhaddad@apple.com> 2 15 -
trunk/Source/WebCore/page/Settings.yaml
r269785 r269805 42 42 default: false 43 43 44 AppleMailPaginationQuirkEnabled:45 type: bool46 defaultValue:47 WebCore:48 default: false49 50 44 AudioPlaybackRequiresUserGesture: 51 45 type: bool … … 88 82 WebCore: 89 83 default: ClipboardAccessPolicy::RequiresUserGesture 90 91 ContentDispositionAttachmentSandboxEnabled:92 comment: >-93 Some ports (e.g. iOS) might choose to display attachments inline, regardless of whether the94 response includes the HTTP header \"Content-Disposition: attachment\". This setting enables95 a sandbox around these attachments. The sandbox enforces all frame sandbox flags (see enum96 SandboxFlag in SecurityContext.h), and also disables <meta http-equiv> processing and subframe97 loading.98 type: bool99 defaultValue:100 WebCore:101 default: false102 84 103 85 CrossOriginCheckInGetMatchedCSSRulesDisabled: … … 460 442 default: false 461 443 462 ScrollingPerformanceLoggingEnabled:463 type: bool464 webcoreOnChange: scrollingPerformanceLoggingEnabledChanged465 defaultValue:466 WebCore:467 default: false468 469 444 ScrollingTreeIncludesFrames: 470 445 type: bool … … 590 565 WebCore: 591 566 default: true 592 593 UseImageDocumentForSubframePDF:594 type: bool595 defaultValue:596 WebCore:597 default: false598 567 599 568 UserInterfaceDirectionPolicy: -
trunk/Source/WebKit/ChangeLog
r269802 r269805 1 2020-11-13 Sam Weinig <weinig@apple.com> 2 3 Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml 4 https://bugs.webkit.org/show_bug.cgi?id=218914 5 6 Reviewed by Tim Horton. 7 8 * Shared/WebPageCreationParameters.cpp: 9 (WebKit::WebPageCreationParameters::encode const): 10 (WebKit::WebPageCreationParameters::decode): 11 * Shared/WebPageCreationParameters.h: 12 * UIProcess/WebPageProxy.cpp: 13 (WebKit::WebPageProxy::creationParameters): 14 * UIProcess/WebPageProxy.h: 15 * UIProcess/mac/WebPageProxyMac.mm: 16 (WebKit::WebPageProxy::appleMailPaginationQuirkEnabled): Deleted. 17 (WebKit::WebPageProxy::appleMailLinesClampEnabled): Deleted. 18 Removes appleMailPaginationQuirkEnabled and appleMailLinesClampEnabled. 19 appleMailPaginationQuirkEnabled is now handled via the preferences infrastructure 20 and appleMailLinesClampEnabled was unused. 21 22 * Shared/WebPreferencesDefaultValues.cpp: 23 (WebKit::defaultAppleMailPaginationQuirkEnabled): 24 * Shared/WebPreferencesDefaultValues.h: 25 Adds default value for AppleMailPaginationQuirkEnabled, which is now in WebPreferences.yaml. 26 Moved from WebPageProxyMac.mm 27 28 * WebProcess/WebPage/WebPage.cpp: 29 (WebKit::WebPage::updatePreferences): 30 Removes explicit setting of setAppleMailPaginationQuirkEnabled, setContentDispositionAttachmentSandboxEnabled, 31 setScrollingPerformanceLoggingEnabled and setUseImageDocumentForSubframePDF which are all generated now. 32 LayoutViewportHeightExpansionFactor was already generated so this call was just redundant. 33 34 * WebProcess/WebPage/WebPage.h: 35 (WebKit::WebPage::setScrollingPerformanceLoggingEnabled): Deleted. 36 It's also no longer necessary to store m_scrollingPerformanceLoggingEnabled as the value 37 can be extracted directly from the store in the one place it was read. setScrollingPerformanceLoggingEnabled 38 was never called, so has been removed. 39 40 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: 41 (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 42 Extract scrollingPerformanceLoggingEnabled directly from the store rather than having the page 43 set it just for this one place to read it. 44 1 45 2020-11-13 Geoffrey Garen <ggaren@apple.com> 2 46 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r269647 r269805 128 128 encoder << nativeWindowHandle; 129 129 #endif 130 encoder << appleMailPaginationQuirkEnabled;131 encoder << appleMailLinesClampEnabled;132 130 encoder << shouldScaleViewToFitDocument; 133 131 encoder << userInterfaceLayoutDirection; … … 397 395 #endif 398 396 399 if (!decoder.decode(parameters.appleMailPaginationQuirkEnabled))400 return WTF::nullopt;401 402 if (!decoder.decode(parameters.appleMailLinesClampEnabled))403 return WTF::nullopt;404 405 397 if (!decoder.decode(parameters.shouldScaleViewToFitDocument)) 406 398 return WTF::nullopt; -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r269647 r269805 187 187 uint64_t nativeWindowHandle; 188 188 #endif 189 bool appleMailPaginationQuirkEnabled;190 bool appleMailLinesClampEnabled;191 189 bool shouldScaleViewToFitDocument; 192 190 -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
r269780 r269805 83 83 #endif 84 84 85 #if PLATFORM(MAC) 86 87 bool defaultAppleMailPaginationQuirkEnabled() 88 { 89 return WebCore::MacApplication::isAppleMail(); 90 } 91 92 #endif 85 93 86 94 static bool defaultAsyncFrameAndOverflowScrollingEnabled() -
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h
r269780 r269805 56 56 #endif 57 57 58 #if PLATFORM(MAC) 59 bool defaultAppleMailPaginationQuirkEnabled(); 60 #endif 61 58 62 #if !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) 59 63 bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload(); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r269802 r269805 7838 7838 #endif 7839 7839 7840 #if PLATFORM(MAC)7841 parameters.appleMailPaginationQuirkEnabled = appleMailPaginationQuirkEnabled();7842 #else7843 parameters.appleMailPaginationQuirkEnabled = false;7844 #endif7845 7846 #if PLATFORM(MAC)7847 // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.7848 parameters.appleMailLinesClampEnabled = appleMailLinesClampEnabled();7849 #else7850 parameters.appleMailLinesClampEnabled = false;7851 #endif7852 7853 7840 #if PLATFORM(COCOA) 7854 7841 parameters.smartInsertDeleteEnabled = m_isSmartInsertDeleteEnabled; -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r269802 r269805 2104 2104 #endif 2105 2105 2106 #if PLATFORM(MAC)2107 bool appleMailPaginationQuirkEnabled();2108 #endif2109 2110 #if PLATFORM(MAC)2111 // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.2112 bool appleMailLinesClampEnabled();2113 #endif2114 2115 2106 // Spelling and grammar. 2116 2107 void checkSpellingOfString(const String& text, CompletionHandler<void(int32_t misspellingLocation, int32_t misspellingLength)>&&); -
trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
r267305 r269805 592 592 } 593 593 594 bool WebPageProxy::appleMailPaginationQuirkEnabled()595 {596 return MacApplication::isAppleMail();597 }598 599 bool WebPageProxy::appleMailLinesClampEnabled()600 {601 return MacApplication::isAppleMail();602 }603 604 594 void WebPageProxy::updateEditorState(const EditorState& editorState) 605 595 { -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r269785 r269805 725 725 m_page->settings().setMediaKeysStorageDirectory(manager->mediaKeyStorageDirectory()); 726 726 #endif 727 m_page->settings().setAppleMailPaginationQuirkEnabled(parameters.appleMailPaginationQuirkEnabled);728 727 729 728 if (parameters.viewScaleFactor != 1) … … 733 732 734 733 #if PLATFORM(COCOA) 735 m_page->settings().setContentDispositionAttachmentSandboxEnabled(true);736 734 setSmartInsertDeleteEnabled(parameters.smartInsertDeleteEnabled); 737 735 WebCore::setAdditionalSupportedImageTypes(parameters.additionalSupportedImageTypes); … … 3751 3749 m_artificialPluginInitializationDelayEnabled = store.getBoolValueForKey(WebPreferencesKey::artificialPluginInitializationDelayEnabledKey()); 3752 3750 3753 m_scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey());3754 settings.setScrollingPerformanceLoggingEnabled(m_scrollingPerformanceLoggingEnabled);3755 3756 3751 bool isAppNapEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey()); 3757 3752 if (m_isAppNapEnabled != isAppNapEnabled) { … … 3769 3764 #if PLATFORM(IOS_FAMILY) 3770 3765 setForceAlwaysUserScalable(m_forceAlwaysUserScalable || store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey())); 3771 3772 settings.setUseImageDocumentForSubframePDF(true);3773 3766 #if HAVE(AVKIT) 3774 3767 DeprecatedGlobalSettings::setAVKitEnabled(true); … … 3791 3784 } 3792 3785 #endif 3793 3794 settings.setLayoutViewportHeightExpansionFactor(store.getDoubleValueForKey(WebPreferencesKey::layoutViewportHeightExpansionFactorKey()));3795 3786 3796 3787 #if ENABLE(APP_BOUND_DOMAINS) … … 5389 5380 } 5390 5381 5391 void WebPage::setScrollingPerformanceLoggingEnabled(bool enabled)5392 {5393 m_scrollingPerformanceLoggingEnabled = enabled;5394 5395 FrameView* frameView = m_mainFrame->coreFrame()->view();5396 if (!frameView)5397 return;5398 5399 frameView->setScrollingPerformanceLoggingEnabled(enabled);5400 }5401 5402 5382 bool WebPage::canPluginHandleResponse(const ResourceResponse& response) 5403 5383 { -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r269785 r269805 1075 1075 void setArtificialPluginInitializationDelayEnabled(bool enabled) { m_artificialPluginInitializationDelayEnabled = enabled; } 1076 1076 1077 bool scrollingPerformanceLoggingEnabled() const { return m_scrollingPerformanceLoggingEnabled; }1078 void setScrollingPerformanceLoggingEnabled(bool);1079 1080 1077 #if PLATFORM(COCOA) 1081 1078 bool shouldUsePDFPlugin() const; … … 1814 1811 bool m_asynchronousPluginInitializationEnabledForAllPlugins { false }; 1815 1812 bool m_artificialPluginInitializationDelayEnabled { false }; 1816 bool m_scrollingPerformanceLoggingEnabled { false };1817 1813 bool m_mainFrameIsScrollable { true }; 1818 1814 -
trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
r268014 r269805 39 39 #import "WebPageCreationParameters.h" 40 40 #import "WebPageProxyMessages.h" 41 #import "WebPreferencesKeys.h" 42 #import "WebPreferencesStore.h" 41 43 #import "WebProcess.h" 42 44 #import <pal/spi/cocoa/QuartzCoreSPI.h> … … 214 216 } 215 217 216 void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore& )218 void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore& store) 217 219 { 218 220 Settings& settings = m_webPage.corePage()->settings(); … … 220 222 #if ENABLE(ASYNC_SCROLLING) 221 223 if (AsyncScrollingCoordinator* scrollingCoordinator = downcast<AsyncScrollingCoordinator>(m_webPage.corePage()->scrollingCoordinator())) { 222 bool scrollingPerformanceLoggingEnabled = m_webPage.scrollingPerformanceLoggingEnabled();224 bool scrollingPerformanceLoggingEnabled = store.getBoolValueForKey(WebPreferencesKey::scrollingPerformanceLoggingEnabledKey()); 223 225 224 226 RefPtr<ScrollingTree> scrollingTree = scrollingCoordinator->scrollingTree(); -
trunk/Source/WebKitLegacy/mac/ChangeLog
r269785 r269805 1 2020-11-13 Sam Weinig <weinig@apple.com> 2 3 Move some more WebKit and WebKitLegacy preferences bound to Settings to WebPreferences.yaml 4 https://bugs.webkit.org/show_bug.cgi?id=218914 5 6 Reviewed by Tim Horton. 7 8 * WebView/WebView.mm: 9 (-[WebView _commonInitializationWithFrameName:groupName:]): 10 Remove explicit setting of Settings::setContentDispositionAttachmentSandboxEnabled as 11 it is now handled by the generated code. Merge together a few sequential #ifdefs while 12 in the area. 13 1 14 2020-11-12 Darin Adler <darin@apple.com> 2 15 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r269760 r269805 1654 1654 WebInstallMemoryPressureHandler(); 1655 1655 1656 #if !PLATFORM(IOS_FAMILY)1656 #if PLATFORM(MAC) 1657 1657 if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) { 1658 1658 // Originally, we allowed all local loads. … … 1663 1663 WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData); 1664 1664 } 1665 #endif 1666 1667 #if PLATFORM(MAC) 1665 1668 1666 if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS)) 1669 1667 WebCore::ResourceHandle::forceContentSniffing(); 1670 1668 1671 1669 _private->page->setDeviceScaleFactor([self _deviceScaleFactor]); 1672 #endif 1673 1674 #if HAVE(OS_DARK_MODE_SUPPORT) && PLATFORM(MAC) 1670 1671 #if HAVE(OS_DARK_MODE_SUPPORT) 1675 1672 _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated); 1676 1673 #endif 1677 1674 1678 _private->page->settings().setContentDispositionAttachmentSandboxEnabled(true);1679 1680 #if PLATFORM(MAC)1681 1675 [WebViewVisualIdentificationOverlay installForWebViewIfNeeded:self kind:@"WebView" deprecated:YES]; 1682 1676 #endif
Note:
See TracChangeset
for help on using the changeset viewer.