Diff
Modified: trunk/Source/WTF/ChangeLog (269544 => 269545)
--- trunk/Source/WTF/ChangeLog 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WTF/ChangeLog 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1,3 +1,14 @@
+2020-11-06 Sam Weinig <wei...@apple.com>
+
+ Further progress towards merging Settings.yaml into WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218663
+
+ Reviewed by Tim Horton.
+
+ * Scripts/Preferences/WebPreferences.yaml:
+ Replace some use of WebCore constants with the inlined values of those constants
+ as this was the only user and it is clearer for the values to be here too.
+
2020-11-06 Yusuke Suzuki <ysuz...@apple.com>
Re-enable SharedArrayBuffer for JSC shell and Testers
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (269544 => 269545)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2020-11-06 23:27:49 UTC (rev 269545)
@@ -162,9 +162,8 @@
"PLATFORM(IOS_FAMILY)": false
default: true
WebCore:
+ "PLATFORM(IOS_FAMILY)": false
default: true
- WebCore:
- default: defaultAllowsInlineMediaPlayback
AllowsInlineMediaPlaybackAfterFullscreen:
type: bool
@@ -234,7 +233,8 @@
"ENABLE(APPLE_PAY_REMOTE_UI)": true
default: false
WebCore:
- default: defaultApplePayEnabled
+ "ENABLE(APPLE_PAY_REMOTE_UI)": true
+ default: false
ArtificialPluginInitializationDelayEnabled:
type: bool
@@ -401,7 +401,8 @@
WebKit:
default: true
WebCore:
- default: defaultContentChangeObserverEnabled()
+ "PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)": true
+ 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:
@@ -882,7 +883,8 @@
"PLATFORM(IOS_FAMILY)": true
default: false
WebCore:
- default: defaultInlineMediaPlaybackRequiresPlaysInlineAttribute
+ "PLATFORM(IOS_FAMILY)": true
+ default: false
InputEventsEnabled:
type: bool
@@ -1289,7 +1291,8 @@
"PLATFORM(IOS_FAMILY)": false
default: true
WebCore:
- default: defaultMediaDataLoadsAutomatically
+ "PLATFORM(IOS_FAMILY)": false
+ default: true
# 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).
MediaDevicesEnabled:
@@ -1312,7 +1315,7 @@
WebKit:
default: true
WebCore:
- default: defaultMediaEnabled
+ default: true
MediaPreloadingEnabled:
type: bool
@@ -1335,7 +1338,9 @@
"PLATFORM(COCOA) && !PLATFORM(MAC)": false
default: true
WebCore:
- default: platformDefaultMediaSourceEnabled()
+ "PLATFORM(COCOA) && PLATFORM(MAC)": true
+ "PLATFORM(COCOA) && !PLATFORM(MAC)": false
+ default: true
# 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).
# FIXME: Seems to be unused. Remove once verified.
@@ -1402,7 +1407,8 @@
"PLATFORM(WATCHOS)": 30
default: 15
WebCore:
- default: defaultMinimumZoomFontSize()
+ "PLATFORM(WATCHOS)": 30
+ default: 15
MockCaptureDevicesPromptEnabled:
type: bool
@@ -1671,8 +1677,9 @@
WebKit:
default: false
WebCore:
- default: defaultRequiresUserGestureToLoadVideo
-
+ "PLATFORM(IOS_FAMILY)": true
+ default: false
+
SafeBrowsingEnabled:
type: bool
webcoreBinding: none
@@ -1878,7 +1885,8 @@
"PLATFORM(IOS_FAMILY)": true
default: false
WebCore:
- default: defaultShouldRespectImageOrientation
+ "PLATFORM(IOS_FAMILY)": true
+ default: false
ShouldRestrictBaseURLSchemes:
type: bool
@@ -2120,7 +2128,8 @@
"PLATFORM(IOS_FAMILY)": true
default: false
WebCore:
- default: defaultTextAutosizingEnabled()
+ "PLATFORM(IOS_FAMILY)": true
+ default: false
ThreadedScrollingEnabled:
type: bool
Modified: trunk/Source/WebCore/ChangeLog (269544 => 269545)
--- trunk/Source/WebCore/ChangeLog 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/ChangeLog 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1,3 +1,46 @@
+2020-11-06 Sam Weinig <wei...@apple.com>
+
+ Further progress towards merging Settings.yaml into WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218663
+
+ Reviewed by Tim Horton.
+
+ * Scripts/GenerateSettings.rb:
+ Change GenerateSettings.rb to take the list of templates in as arguments rather than
+ hard coding it. This matches GeneratePreferences and will make it easier to switch over.
+
+ * DerivedSources.make:
+ Update call to GenerateSettings.rb to pass templates and adopt static pattern list to
+ make it very clear what needs to be generated.
+
+ * WebCoreMacros.cmake:
+ Update call to GenerateSettings.rb to pass templates
+
+ * page/SettingsDefaultValues.h: Removed.
+ * Scripts/SettingsTemplates/Settings.cpp.erb:
+ * WebCore.xcodeproj/project.pbxproj:
+ Remove SettingsDefaultValues.h inlining defaults directly in the yaml files.
+
+ * page/Settings.yaml:
+ Add defaults directly in the definition rather than relying on compiled constants.
+
+ * page/SettingsBase.cpp:
+ (WebCore::SettingsBase::initializeDefaultFontFamilies):
+ (WebCore::SettingsBase::defaultMinimumZoomFontSize): Deleted.
+ (WebCore::SettingsBase::defaultTextAutosizingEnabled): Deleted.
+ (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled): Deleted.
+ (WebCore::SettingsBase::defaultContentChangeObserverEnabled): Deleted.
+ (WebCore::SettingsBase::defaultMediaContentTypesRequiringHardwareSupport): Deleted.
+ * page/SettingsBase.h:
+ * page/cocoa/SettingsBaseCocoa.mm:
+ (WebCore::SettingsBase::defaultTextAutosizingEnabled): Deleted.
+ (WebCore::SettingsBase::defaultMediaContentTypesRequiringHardwareSupport): Deleted.
+ Remove defaults that are now inlined into the yaml files. Move some that have to
+ remain to more appropriate / private locations.
+
+ * platform/graphics/BitmapImage.h:
+ Update comment to indicate the the default is now defined in the settings definition.
+
2020-11-06 Rob Buis <rb...@igalia.com>
Only restore saved layer scroll position for RenderBox
Modified: trunk/Source/WebCore/DerivedSources.make (269544 => 269545)
--- trunk/Source/WebCore/DerivedSources.make 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/DerivedSources.make 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1651,22 +1651,22 @@
${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml \
${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml \
${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml \
+ ${WebCore}/page/Settings.yaml \
#
-GENERATE_SETTINGS_TEMPLATES = \
- $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb \
- $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb \
- $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb \
- $(WebCore)/Scripts/SettingsTemplates/Settings.cpp.erb \
- $(WebCore)/Scripts/SettingsTemplates/Settings.h.erb \
+GENERATE_SETTINGS = \
+ InternalSettingsGenerated.cpp \
+ InternalSettingsGenerated.idl \
+ InternalSettingsGenerated.h \
+ Settings.cpp \
+ Settings.h \
#
-GENERATE_SETTINGS_FILES = $(call get_bare_name,$(GENERATE_SETTINGS_TEMPLATES))
-GENERATE_SETTINGS_PATTERNS = $(subst .,%,$(GENERATE_SETTINGS_FILES))
-all : $(GENERATE_SETTINGS_FILES)
-$(GENERATE_SETTINGS_PATTERNS) : $(WebCore)/Scripts/GenerateSettings.rb $(GENERATE_SETTINGS_TEMPLATES) $(WEB_PREFERENCES_INPUT_FILES) $(WebCore)/page/Settings.yaml
- $(RUBY) $< --additionalSettings $(WebCore)/page/Settings.yaml --base ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml
+all : $(GENERATE_SETTINGS)
+$(GENERATE_SETTINGS) : % : $(WebCore)/Scripts/SettingsTemplates/%.erb $(WEB_PREFERENCES_INPUT_FILES) $(WebCore)/Scripts/GenerateSettings.rb
+ $(RUBY) $(WebCore)/Scripts/GenerateSettings.rb --base ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_BUILD_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --additionalSettings $(WebCore)/page/Settings.yaml --template $<
+
# --------
# WHLSL Standard Library
Modified: trunk/Source/WebCore/Scripts/GenerateSettings.rb (269544 => 269545)
--- trunk/Source/WebCore/Scripts/GenerateSettings.rb 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/Scripts/GenerateSettings.rb 2020-11-06 23:27:49 UTC (rev 269545)
@@ -34,7 +34,8 @@
:debugPreferences => nil,
:experimentalPreferences => nil,
:internalPreferences => nil,
- :outputDirectory => nil
+ :outputDirectory => nil,
+ :templates => []
}
optparse = OptionParser.new do |opts|
opts.banner = "Usage: #{File.basename($0)} --input file"
@@ -47,6 +48,7 @@
opts.on("--internal input", "file to generate internal settings from") { |internalPreferences| options[:internalPreferences] = internalPreferences }
opts.on("--additionalSettings input", "file to generate settings from") { |additionalSettings| options[:additionalSettings] = additionalSettings }
opts.on("--outputDir output", "directory to generate file in") { |output| options[:outputDirectory] = output }
+ opts.on("--template input", "template to use for generation (may be specified multiple times)") { |template| options[:templates] << template }
end
optparse.parse!
@@ -271,8 +273,8 @@
@allSettingsSet = SettingSet.new(settings)
end
- def renderToFile(template, file)
- template = File.join(File.dirname(__FILE__), template)
+ def renderTemplate(template, outputDirectory)
+ file = File.join(outputDirectory, File.basename(template, ".erb"))
output = ERB.new(File.read(template), 0, "-").result(binding)
File.open(file, "w+") do |f|
@@ -282,8 +284,7 @@
end
settings = Settings.new(parsedSettings, parsedPreferences)
-settings.renderToFile("SettingsTemplates/Settings.h.erb", File.join(options[:outputDirectory], "Settings.h"))
-settings.renderToFile("SettingsTemplates/Settings.cpp.erb", File.join(options[:outputDirectory], "Settings.cpp"))
-settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.idl.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.idl"))
-settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.h.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.h"))
-settings.renderToFile("SettingsTemplates/InternalSettingsGenerated.cpp.erb", File.join(options[:outputDirectory], "InternalSettingsGenerated.cpp"))
+
+options[:templates].each do |template|
+ settings.renderTemplate(template, options[:outputDirectory])
+end
Modified: trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb (269544 => 269545)
--- trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/Scripts/SettingsTemplates/Settings.cpp.erb 2020-11-06 23:27:49 UTC (rev 269545)
@@ -30,7 +30,6 @@
#include "InspectorInstrumentation.h"
#include "Page.h"
-#include "SettingsDefaultValues.h"
// Default values.
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269544 => 269545)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-11-06 23:27:49 UTC (rev 269545)
@@ -10325,7 +10325,6 @@
7C6771352527DDA900FDEF00 /* DOMWindow+DeviceOrientation.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "DOMWindow+DeviceOrientation.idl"; sourceTree = "<group>"; };
7C6771362527DF4B00FDEF00 /* WindowOrWorkerGlobalScope+Performance.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "WindowOrWorkerGlobalScope+Performance.idl"; sourceTree = "<group>"; };
7C6771372527DFF500FDEF00 /* WindowOrWorkerGlobalScope+Crypto.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "WindowOrWorkerGlobalScope+Crypto.idl"; sourceTree = "<group>"; };
- 7C6EFEEA1F946A2E00FFAD41 /* SettingsDefaultValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SettingsDefaultValues.h; sourceTree = "<group>"; };
7C72471A2516744C00C363CD /* Performance+UserTiming.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Performance+UserTiming.idl"; sourceTree = "<group>"; };
7C72471C251674CE00C363CD /* Performance+PerformanceTimeline.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Performance+PerformanceTimeline.idl"; sourceTree = "<group>"; };
7C72471D2516752C00C363CD /* Performance+ResourceTiming.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Performance+ResourceTiming.idl"; sourceTree = "<group>"; };
@@ -21947,7 +21946,6 @@
7CDE73961F9BD59500390312 /* Settings.yaml */,
7CC6609B1F93057900D500E9 /* SettingsBase.cpp */,
7CC660991F93057800D500E9 /* SettingsBase.h */,
- 7C6EFEEA1F946A2E00FFAD41 /* SettingsDefaultValues.h */,
1DC55400211BA8C8004B780E /* ShareData.h */,
1DC553FF211BA841004B780E /* ShareData.idl */,
1A2C6671242AFEF7003055EC /* ShareDataReader.cpp */,
Modified: trunk/Source/WebCore/WebCoreMacros.cmake (269544 => 269545)
--- trunk/Source/WebCore/WebCoreMacros.cmake 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/WebCoreMacros.cmake 2020-11-06 23:27:49 UTC (rev 269545)
@@ -216,7 +216,7 @@
OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/${_outfile} ${_extra_output}
MAIN_DEPENDENCY ${_infile}
DEPENDS ${NAMES_GENERATOR} ${GENERATE_SETTINGS_SCRIPTS} ${SCRIPTS_BINDINGS} ${WTF_WEB_PREFERENCES} WTF_CopyPreferences
- COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --additionalSettings ${_infile} --base ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --outputDir ${WebCore_DERIVED_SOURCES_DIR}
+ COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --additionalSettings ${_infile} --base ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --outputDir ${WebCore_DERIVED_SOURCES_DIR} --template ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb --template ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb --template ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb --template ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.cpp.erb --template ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.h.erb
VERBATIM ${_args})
endmacro()
Modified: trunk/Source/WebCore/page/Settings.yaml (269544 => 269545)
--- trunk/Source/WebCore/page/Settings.yaml 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/page/Settings.yaml 2020-11-06 23:27:49 UTC (rev 269545)
@@ -33,7 +33,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultAcceleratedCompositingForFixedPositionEnabled
+ PLATFORM(IOS_FAMILY): true
+ default: false
AcceleratedFiltersEnabled:
type: bool
@@ -75,7 +76,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultAudioPlaybackRequiresUserGesture
+ PLATFORM(IOS_FAMILY): true
+ default: false
AutoscrollForDragAndDropEnabled:
type: bool
@@ -158,7 +160,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultDownloadableBinaryFontsEnabled()
+ PLATFORM(WATCHOS): false
+ default: true
EditableLinkBehavior:
type: uint32_t
@@ -172,7 +175,11 @@
refinedType: EditingBehaviorType
defaultValue:
WebCore:
- default: editingBehaviorTypeForPlatform()
+ PLATFORM(IOS_FAMILY): EditingIOSBehavior
+ OS(DARWIN): EditingMacBehavior
+ OS(WINDOWS): EditingWindowsBehavior
+ OS(UNIX): EditingUnixBehavior
+ default: EditingMacBehavior
EnforceCSSMIMETypeInNoQuirksMode:
type: bool
@@ -190,7 +197,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultFixedBackgroundsPaintRelativeToDocument
+ PLATFORM(IOS_FAMILY): true
+ default: false
FixedElementsLayoutRelativeToFrame:
type: bool
@@ -243,7 +251,7 @@
refinedType: ForcedAccessibilityValue
defaultValue:
WebCore:
- default: defaultForcedColorsAreInvertedAccessibilityValue
+ default: ForcedAccessibilityValue::System
ForcedDisplayIsMonochromeAccessibilityValue:
type: uint32_t
@@ -250,7 +258,7 @@
refinedType: ForcedAccessibilityValue
defaultValue:
WebCore:
- default: defaultForcedDisplayIsMonochromeAccessibilityValue
+ default: ForcedAccessibilityValue::System
ForcedPrefersReducedMotionAccessibilityValue:
type: uint32_t
@@ -257,7 +265,7 @@
refinedType: ForcedAccessibilityValue
defaultValue:
WebCore:
- default: defaultForcedPrefersReducedMotionAccessibilityValue
+ default: ForcedAccessibilityValue::System
ForcedSupportsHighDynamicRangeValue:
type: uint32_t
@@ -265,7 +273,7 @@
webcoreOnChange: setNeedsRecalcStyleInAllFrames
defaultValue:
WebCore:
- default: defaultForcedSupportsHighDynamicRangeValue
+ default: ForcedAccessibilityValue::System
FrameFlattening:
type: uint32_t
@@ -292,7 +300,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultImageSubsamplingEnabled
+ PLATFORM(IOS_FAMILY): true
+ default: false
ImagesEnabled:
type: bool
@@ -313,31 +322,36 @@
type: bool
defaultValue:
WebCore:
- default: defaultPerActivityStateCPUUsageMeasurementEnabled
+ PLATFORM(MAC): true
+ default: false
IsPostBackgroundingCPUUsageMeasurementEnabled:
type: bool
defaultValue:
WebCore:
- default: defaultPostBackgroundingCPUUsageMeasurementEnabled
+ PLATFORM(MAC): true
+ default: false
IsPostBackgroundingMemoryUsageMeasurementEnabled:
type: bool
defaultValue:
WebCore:
- default: defaultPostBackgroundingMemoryUsageMeasurementEnabled
+ PLATFORM(MAC): true
+ default: false
IsPostLoadCPUUsageMeasurementEnabled:
type: bool
defaultValue:
WebCore:
- default: defaultPostLoadCPUUsageMeasurementEnabled
+ PLATFORM(COCOA): true
+ default: false
IsPostLoadMemoryUsageMeasurementEnabled:
type: bool
defaultValue:
WebCore:
- default: defaultPostLoadMemoryUsageMeasurementEnabled
+ PLATFORM(COCOA): true
+ default: false
_javascript_RuntimeFlags:
type: uint32_t
@@ -519,7 +533,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultQuickTimePluginReplacementEnabled
+ PLATFORM(IOS_FAMILY): true
+ default: false
RepaintOutsideLayoutEnabled:
type: bool
@@ -551,7 +566,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultScrollingTreeIncludesFrames
+ PLATFORM(IOS_FAMILY): true
+ default: false
SessionStorageQuota:
comment: >-
@@ -679,7 +695,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultUnifiedTextCheckerEnabled
+ USE(UNIFIED_TEXT_CHECKING): true
+ default: false
UseAnonymousModeWhenFetchingMaskImages:
type: bool
@@ -735,7 +752,8 @@
type: bool
defaultValue:
WebCore:
- default: defaultVideoPlaybackRequiresUserGesture
+ PLATFORM(IOS_FAMILY): true
+ default: false
VisualViewportEnabled:
type: bool
@@ -777,4 +795,5 @@
type: bool
defaultValue:
WebCore:
- default: defaultYouTubeFlashPluginReplacementEnabled
+ PLATFORM(COCOA): true
+ default: false
Modified: trunk/Source/WebCore/page/SettingsBase.cpp (269544 => 269545)
--- trunk/Source/WebCore/page/SettingsBase.cpp 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/page/SettingsBase.cpp 2020-11-06 23:27:49 UTC (rev 269545)
@@ -76,55 +76,14 @@
SettingsBase::~SettingsBase() = default;
-float SettingsBase::defaultMinimumZoomFontSize()
-{
-#if PLATFORM(WATCHOS)
- return 30;
-#else
- return 15;
-#endif
-}
-
-#if !PLATFORM(IOS_FAMILY)
-bool SettingsBase::defaultTextAutosizingEnabled()
-{
- return false;
-}
-#endif
-
-bool SettingsBase::defaultDownloadableBinaryFontsEnabled()
-{
-#if PLATFORM(WATCHOS)
- return false;
-#else
- return true;
-#endif
-}
-
-bool SettingsBase::defaultContentChangeObserverEnabled()
-{
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
- return true;
-#else
- return false;
-#endif
-}
-
#if !PLATFORM(COCOA)
-const String& SettingsBase::defaultMediaContentTypesRequiringHardwareSupport()
-{
- return emptyString();
-}
-#endif
-#if !PLATFORM(COCOA)
void SettingsBase::initializeDefaultFontFamilies()
{
// Other platforms can set up fonts from a client, but on Mac, we want it in WebCore to share code between WebKit1 and WebKit2.
}
-#endif
-#if ENABLE(MEDIA_SOURCE) && !PLATFORM(COCOA)
+#if ENABLE(MEDIA_SOURCE)
bool SettingsBase::platformDefaultMediaSourceEnabled()
{
return true;
@@ -131,6 +90,8 @@
}
#endif
+#endif
+
const AtomString& SettingsBase::standardFontFamily(UScriptCode script) const
{
return m_fontGenericFamilies->standardFontFamily(script);
@@ -333,6 +294,7 @@
#endif
#if ENABLE(MEDIA_STREAM)
+
void SettingsBase::mockCaptureDevicesEnabledChanged()
{
bool enabled = false;
@@ -341,6 +303,7 @@
MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled(enabled);
}
+
#endif
void SettingsBase::userStyleSheetLocationChanged()
Modified: trunk/Source/WebCore/page/SettingsBase.h (269544 => 269545)
--- trunk/Source/WebCore/page/SettingsBase.h 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/page/SettingsBase.h 2020-11-06 23:27:49 UTC (rev 269545)
@@ -34,12 +34,12 @@
#include "StorageMap.h"
#include "TextFlags.h"
#include "Timer.h"
-#include <wtf/URL.h>
#include "WritingMode.h"
#include <_javascript_Core/RuntimeFlags.h>
#include <unicode/uscript.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
+#include <wtf/URL.h>
#include <wtf/text/AtomString.h>
#include <wtf/text/AtomStringHash.h>
@@ -103,22 +103,10 @@
void pageDestroyed() { m_page = nullptr; }
- enum class FontLoadTimingOverride { None, Block, Swap, Failure };
+ enum class FontLoadTimingOverride : uint8_t { None, Block, Swap, Failure };
enum class ParserScriptingFlagPolicy : uint8_t { OnlyIfScriptIsEnabled, Enabled };
+ enum class ForcedAccessibilityValue : uint8_t { System, On, Off };
- // FIXME: Move these default values to SettingsDefaultValues.h
-
- enum class ForcedAccessibilityValue { System, On, Off };
- static const SettingsBase::ForcedAccessibilityValue defaultForcedColorsAreInvertedAccessibilityValue = ForcedAccessibilityValue::System;
- static const SettingsBase::ForcedAccessibilityValue defaultForcedDisplayIsMonochromeAccessibilityValue = ForcedAccessibilityValue::System;
- static const SettingsBase::ForcedAccessibilityValue defaultForcedPrefersReducedMotionAccessibilityValue = ForcedAccessibilityValue::System;
- static const SettingsBase::ForcedAccessibilityValue defaultForcedSupportsHighDynamicRangeValue = ForcedAccessibilityValue::System;
-
- WEBCORE_EXPORT static bool defaultTextAutosizingEnabled();
- WEBCORE_EXPORT static float defaultMinimumZoomFontSize();
- WEBCORE_EXPORT static bool defaultDownloadableBinaryFontsEnabled();
- WEBCORE_EXPORT static bool defaultContentChangeObserverEnabled();
-
#if ENABLE(MEDIA_SOURCE)
WEBCORE_EXPORT static bool platformDefaultMediaSourceEnabled();
#endif
@@ -126,15 +114,6 @@
static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
static const unsigned defaultMaximumRenderTreeDepth = 512;
-#if ENABLE(TEXT_AUTOSIZING)
- constexpr static const float boostedOneLineTextMultiplierCoefficient = 2.23125f;
- constexpr static const float boostedMultiLineTextMultiplierCoefficient = 2.48125f;
- constexpr static const float boostedMaxTextAutosizingScaleIncrease = 5.0f;
- constexpr static const float defaultOneLineTextMultiplierCoefficient = 1.7f;
- constexpr static const float defaultMultiLineTextMultiplierCoefficient = 1.95f;
- constexpr static const float defaultMaxTextAutosizingScaleIncrease = 1.7f;
-#endif
-
WEBCORE_EXPORT void setStandardFontFamily(const AtomString&, UScriptCode = USCRIPT_COMMON);
WEBCORE_EXPORT const AtomString& standardFontFamily(UScriptCode = USCRIPT_COMMON) const;
@@ -165,7 +144,6 @@
float maxTextAutosizingScaleIncrease() const { return m_maxTextAutosizingScaleIncrease; }
#endif
- WEBCORE_EXPORT static const String& defaultMediaContentTypesRequiringHardwareSupport();
WEBCORE_EXPORT void setMediaContentTypesRequiringHardwareSupport(const Vector<ContentType>&);
WEBCORE_EXPORT void setMediaContentTypesRequiringHardwareSupport(const String&);
const Vector<ContentType>& mediaContentTypesRequiringHardwareSupport() const { return m_mediaContentTypesRequiringHardwareSupport; }
@@ -210,6 +188,13 @@
Vector<ContentType> m_mediaContentTypesRequiringHardwareSupport;
#if ENABLE(TEXT_AUTOSIZING)
+ static constexpr const float boostedOneLineTextMultiplierCoefficient = 2.23125f;
+ static constexpr const float boostedMultiLineTextMultiplierCoefficient = 2.48125f;
+ static constexpr const float boostedMaxTextAutosizingScaleIncrease = 5.0f;
+ static constexpr const float defaultOneLineTextMultiplierCoefficient = 1.7f;
+ static constexpr const float defaultMultiLineTextMultiplierCoefficient = 1.95f;
+ static constexpr const float defaultMaxTextAutosizingScaleIncrease = 1.7f;
+
float m_oneLineTextMultiplierCoefficient { defaultOneLineTextMultiplierCoefficient };
float m_multiLineTextMultiplierCoefficient { defaultMultiLineTextMultiplierCoefficient };
float m_maxTextAutosizingScaleIncrease { defaultMaxTextAutosizingScaleIncrease };
Deleted: trunk/Source/WebCore/page/SettingsDefaultValues.h (269544 => 269545)
--- trunk/Source/WebCore/page/SettingsDefaultValues.h 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/page/SettingsDefaultValues.h 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "EditingBehaviorTypes.h"
-
-namespace WebCore {
-
-// NOTEs
-// 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac;
-// 2) EditingWindowsBehavior comprises Win32 build;
-// 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology);
-// 99) MacEditingBehavior is used as a fallback.
-inline EditingBehaviorType editingBehaviorTypeForPlatform()
-{
-#if PLATFORM(IOS_FAMILY)
- return EditingIOSBehavior;
-#elif OS(DARWIN)
- return EditingMacBehavior;
-#elif OS(WINDOWS)
- return EditingWindowsBehavior;
-#elif OS(UNIX)
- return EditingUnixBehavior;
-#else
- // Fallback
- return EditingMacBehavior;
-#endif
-
-}
-
-#if PLATFORM(COCOA)
-static const bool defaultYouTubeFlashPluginReplacementEnabled = true;
-#else
-static const bool defaultYouTubeFlashPluginReplacementEnabled = false;
-#endif
-
-#if PLATFORM(IOS_FAMILY)
-static const bool defaultFixedBackgroundsPaintRelativeToDocument = true;
-static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true;
-static const bool defaultAllowsInlineMediaPlayback = false;
-static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = true;
-static const bool defaultVideoPlaybackRequiresUserGesture = true;
-static const bool defaultAudioPlaybackRequiresUserGesture = true;
-static const bool defaultMediaDataLoadsAutomatically = false;
-static const bool defaultShouldRespectImageOrientation = true;
-static const bool defaultImageSubsamplingEnabled = true;
-static const bool defaultScrollingTreeIncludesFrames = true;
-static const bool defaultQuickTimePluginReplacementEnabled = true;
-static const bool defaultRequiresUserGestureToLoadVideo = true;
-#else
-static const bool defaultFixedBackgroundsPaintRelativeToDocument = false;
-static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false;
-static const bool defaultAllowsInlineMediaPlayback = true;
-static const bool defaultInlineMediaPlaybackRequiresPlaysInlineAttribute = false;
-static const bool defaultVideoPlaybackRequiresUserGesture = false;
-static const bool defaultAudioPlaybackRequiresUserGesture = false;
-static const bool defaultMediaDataLoadsAutomatically = true;
-static const bool defaultShouldRespectImageOrientation = false;
-static const bool defaultImageSubsamplingEnabled = false;
-static const bool defaultScrollingTreeIncludesFrames = false;
-static const bool defaultQuickTimePluginReplacementEnabled = false;
-static const bool defaultRequiresUserGestureToLoadVideo = false;
-#endif
-
-#if USE(UNIFIED_TEXT_CHECKING)
-static const bool defaultUnifiedTextCheckerEnabled = true;
-#else
-static const bool defaultUnifiedTextCheckerEnabled = false;
-#endif
-
-#if ENABLE(VIDEO) && (USE(AVFOUNDATION) || USE(GSTREAMER) || USE(MEDIA_FOUNDATION))
-static const bool defaultMediaEnabled = true;
-#else
-static const bool defaultMediaEnabled = false;
-#endif
-
-// FIXME: Seems like this should be HAVE(CG_CONTEXT_DRAW_CONIC_GRADIENT).
-// FIXME: Can we change tvOS to be like the other Cocoa platforms?
-#if PLATFORM(COCOA) && !PLATFORM(APPLETV)
-static const bool defaultConicGradient = true;
-#else
-static const bool defaultConicGradient = false;
-#endif
-
-#if ENABLE(APPLE_PAY_REMOTE_UI)
-static const bool defaultApplePayEnabled = true;
-#else
-static const bool defaultApplePayEnabled = false;
-#endif
-
-
-#if PLATFORM(COCOA)
-static constexpr const bool defaultPostLoadCPUUsageMeasurementEnabled = true;
-static constexpr const bool defaultPostLoadMemoryUsageMeasurementEnabled = true;
-#else
-static constexpr const bool defaultPostLoadCPUUsageMeasurementEnabled = false;
-static constexpr const bool defaultPostLoadMemoryUsageMeasurementEnabled = false;
-#endif
-
-#if PLATFORM(MAC)
-static constexpr const bool defaultPostBackgroundingCPUUsageMeasurementEnabled = true;
-static constexpr const bool defaultPerActivityStateCPUUsageMeasurementEnabled = true;
-static constexpr const bool defaultPostBackgroundingMemoryUsageMeasurementEnabled = true;
-#else
-static constexpr const bool defaultPostBackgroundingCPUUsageMeasurementEnabled = false;
-static constexpr const bool defaultPerActivityStateCPUUsageMeasurementEnabled = false;
-static constexpr const bool defaultPostBackgroundingMemoryUsageMeasurementEnabled = false;
-#endif
-
-}
Modified: trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm (269544 => 269545)
--- trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm 2020-11-06 23:27:49 UTC (rev 269545)
@@ -74,11 +74,6 @@
setSansSerifFontFamily("Helvetica", USCRIPT_COMMON);
}
-bool SettingsBase::defaultTextAutosizingEnabled()
-{
- return true;
-}
-
#if ENABLE(MEDIA_SOURCE)
bool SettingsBase::platformDefaultMediaSourceEnabled()
@@ -90,9 +85,4 @@
#endif
-const String& SettingsBase::defaultMediaContentTypesRequiringHardwareSupport()
-{
- return emptyString();
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (269544 => 269545)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.h 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h 2020-11-06 23:27:49 UTC (rev 269545)
@@ -226,7 +226,7 @@
bool m_animationFinished { false };
- // The default value of m_allowSubsampling should be the same as defaultImageSubsamplingEnabled in Settings.cpp
+ // The default value of m_allowSubsampling should be the same as default value of the ImageSubsamplingEnabled setting.
#if PLATFORM(IOS_FAMILY)
bool m_allowSubsampling { true };
#else
Modified: trunk/Source/WebKit/ChangeLog (269544 => 269545)
--- trunk/Source/WebKit/ChangeLog 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebKit/ChangeLog 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1,3 +1,15 @@
+2020-11-06 Sam Weinig <wei...@apple.com>
+
+ Further progress towards merging Settings.yaml into WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218663
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration init]):
+ Replace call to WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport() which always returned
+ the empty string with a literal empty string. This was the only caller so the function is really no needed.
+
2020-11-06 Aditya Keerthi <akeer...@apple.com>
[macOS] Align left edge of presented calendar with left edge of date inputs
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (269544 => 269545)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2020-11-06 23:27:49 UTC (rev 269545)
@@ -257,7 +257,7 @@
_shouldDecidePolicyBeforeLoadingQuickLookPreview = defaultShouldDecidePolicyBeforeLoadingQuickLookPreview();
#endif // PLATFORM(IOS_FAMILY)
- _mediaContentTypesRequiringHardwareSupport = WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport();
+ _mediaContentTypesRequiringHardwareSupport = @"";
_allowMediaContentTypesRequiringHardwareSupportAsFallback = YES;
_colorFilterEnabled = NO;
Modified: trunk/Source/WebKitLegacy/ios/ChangeLog (269544 => 269545)
--- trunk/Source/WebKitLegacy/ios/ChangeLog 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebKitLegacy/ios/ChangeLog 2020-11-06 23:27:49 UTC (rev 269545)
@@ -1,3 +1,14 @@
+2020-11-06 Sam Weinig <wei...@apple.com>
+
+ Further progress towards merging Settings.yaml into WebPreferences.yaml
+ https://bugs.webkit.org/show_bug.cgi?id=218663
+
+ Reviewed by Tim Horton.
+
+ * Misc/WebUIKitSupport.mm:
+ (WebKitGetMinimumZoomFontSize):
+ Use generated default value macro as the one in WebCore has now been removed.
+
2020-10-06 Devin Rousso <drou...@apple.com>
Move platform logic for CSS `hover` and `pointer` media queries outside of WebCore
Modified: trunk/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm (269544 => 269545)
--- trunk/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm 2020-11-06 22:55:31 UTC (rev 269544)
+++ trunk/Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm 2020-11-06 23:27:49 UTC (rev 269545)
@@ -30,6 +30,7 @@
#import "WebDatabaseManagerInternal.h"
#import "WebLocalizableStringsInternal.h"
#import "WebPlatformStrategies.h"
+#import "WebPreferencesDefinitions.h"
#import "WebViewPrivate.h"
#import <_javascript_Core/InitializeThreading.h>
#import <WebCore/BreakLines.h>
@@ -88,7 +89,7 @@
float WebKitGetMinimumZoomFontSize(void)
{
- return WebCore::Settings::defaultMinimumZoomFontSize();
+ return DEFAULT_VALUE_FOR_MinimumZoomFontSize;
}
int WebKitGetLastLineBreakInBuffer(UChar *characters, int position, int length)