haikuwebkit/Source/WTF/wtf/PlatformEnableCocoa.h

717 lines
21 KiB
C
Raw Permalink Normal View History

Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
/*
* Copyright (C) 2006-2020 Apple Inc. All rights reserved.
* Copyright (C) 2007-2009 Torch Mobile, Inc.
* Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
* Copyright (C) 2013 Samsung Electronics. 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. ``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
* 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
#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
#error "Please #include <wtf/Platform.h> instead of this file directly."
#endif
#if !PLATFORM(COCOA)
#error "This file should only be included when building for one of Apple's Cocoa platforms."
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
/* Please keep the following in alphabetical order so we can notice duplicates. */
/* Items should only be here if they are different from the defaults in PlatformEnable.h. */
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_3D_TRANSFORMS)
#define ENABLE_3D_TRANSFORMS 1
#endif
Remove all references to non-existent 10.16 https://bugs.webkit.org/show_bug.cgi?id=215202 Reviewed by Wenson Hsieh. Source/bmalloc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: Source/JavaScriptCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty: * gtest/xcode/Config/DebugProject.xcconfig: * gtest/xcode/Config/ReleaseProject.xcconfig: Source/ThirdParty/ANGLE: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty/libwebrtc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: Source/WebCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebCore/PAL: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebInspectorUI: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebKit: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Scripts/process-entitlements.sh: * WebProcess/com.apple.WebProcess.sb.in: Source/WebKitLegacy/mac: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WTF: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: * wtf/PlatformUse.h: Tools: * ContentExtensionTester/Configurations/Base.xcconfig: * ContentExtensionTester/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/Base.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/DebugRelease.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MiniBrowser/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: * TestWebKitAPI/config.h: * WebEditingTester/Configurations/Base.xcconfig: * WebEditingTester/Configurations/DebugRelease.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/DebugRelease.xcconfig: * lldb/lldbWebKitTester/Configurations/Base.xcconfig: * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Canonical link: https://commits.webkit.org/227995@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-06 00:58:34 +00:00
#if !defined(ENABLE_ACCESSIBILITY_ISOLATED_TREE) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_ACCESSIBILITY_ISOLATED_TREE 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_AIRPLAY_PICKER) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST)
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#define ENABLE_AIRPLAY_PICKER 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_ANIMATED_KEYBOARD_SCROLLING) && PLATFORM(IOS_FAMILY)
#define ENABLE_ANIMATED_KEYBOARD_SCROLLING 1
[Apple Pay] Add new ApplePayInstallmentConfiguration members https://bugs.webkit.org/show_bug.cgi?id=212160 <rdar://problem/60703650> Reviewed by Alex Christensen. Source/WebCore: Test: http/tests/ssl/applepay/ApplePayInstallmentItems.https.html * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: Added IDLs, headers, and derived sources for ApplePayInstallment{Item,ItemType,RetailChannel}. * Modules/applepay/ApplePayInstallmentConfiguration.idl: * Modules/applepay/ApplePayInstallmentConfigurationWebCore.h: Added items, applicationMetadata, and retailChannel members. Added missing conditionals to merchantIdentifier and referrerIdentifier. * Modules/applepay/ApplePayInstallmentItem.h: * Modules/applepay/ApplePayInstallmentItem.idl: * Modules/applepay/ApplePayInstallmentItemType.h: * Modules/applepay/ApplePayInstallmentItemType.idl: * Modules/applepay/ApplePayInstallmentRetailChannel.h: * Modules/applepay/ApplePayInstallmentRetailChannel.idl: Added. * Modules/applepay/ApplePayRequestBase.cpp: (WebCore::convertAndValidate): Changed to call PaymentInstallmentConfiguration::create, returning an exception if present. * Modules/applepay/PaymentInstallmentConfiguration.mm: (WebCore::fromDecimalNumber): Allowed for a large maximum number of fractional digits to support formatting high-precision currency and APRs (note that this formatter is only used for test support). (WebCore::applePayItemType): (WebCore::platformItemType): Added to convert between PKInstallmentItemType and ApplePayInstallmentItemType. (WebCore::applePayRetailChannel): (WebCore::platformRetailChannel): Added to convert between PKInstallmentRetailChannel and ApplePayInstallmentRetailChannel. (WebCore::makeNSArrayElement): (WebCore::makeVectorElement): Added to convert between NSArray<PKPaymentInstallmentItem *> and Vector<ApplePayInstallmentItem>. (WebCore::createPlatformConfiguration): Added a parameter for passing in applicationMetadata as an NSDictionary. Set properties on PKPaymentInstallmentConfiguration for new ApplePayInstallmentConfiguration members. (WebCore::PaymentInstallmentConfiguration::create): Added; converts the applicationMetadata JSON string (if present) to an NSDictionary, returning a TypeError if the JSON string does not deserialize to an NSDictionary (as PassKit requires). (WebCore::PaymentInstallmentConfiguration::PaymentInstallmentConfiguration): Added a parameter for passing in applicationMetadata as an NSDictionary. Made private. (WebCore::PaymentInstallmentConfiguration::applePayInstallmentConfiguration const): Set members on ApplePayInstallmentConfiguration for new PKPaymentInstallmentConfiguration properties. * Modules/applepay/PaymentInstallmentConfigurationWebCore.h: Source/WebCore/PAL: * pal/cocoa/PassKitSoftLink.h: * pal/cocoa/PassKitSoftLink.mm: Added soft-linking macros for PKPaymentInstallmentItem. Source/WTF: * wtf/PlatformEnableCocoa.h: Defined ENABLE_APPLE_PAY_INSTALLMENT_IDENTIFIERS. LayoutTests: * http/tests/ssl/applepay/ApplePayInstallmentItems.https-expected.txt: * http/tests/ssl/applepay/ApplePayInstallmentItems.https.html: Added. * platform/mac-wk2/TestExpectations: Skipped test on Mojave and Catalina. Canonical link: https://commits.webkit.org/225136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-22 20:10:01 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_APPLE_PAY) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_APPLE_PAY 1
#endif
[Payment Request] upstream new features https://bugs.webkit.org/show_bug.cgi?id=226740 <rdar://problem/78963132> Reviewed by Andy Estes. Source/WebCore: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) Tests: http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html http/tests/paymentrequest/ApplePayModifier-total.https.html http/tests/paymentrequest/paymentmethodchange-couponCode.https.html http/tests/paymentrequest/paymentrequest-couponCode.https.html http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html * Modules/applepay/ApplePayCouponCodeUpdate.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. * Modules/applepay/ApplePayCouponCodeUpdate.h: Renamed from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.h. (WebCore::ApplePayCouponCodeUpdate::encode const): (WebCore::ApplePayCouponCodeUpdate::decode): Object used to update the payment request via `ApplePaySession.prototype.completeCouponCodeChange` when responding to the user modifying the coupon code. * Modules/applepay/ApplePayErrorCode.idl: * Modules/applepay/ApplePayErrorCode.h: Add `"couponCodeInvalid"` and `"couponCodeExpired"`. * Modules/applepay/ApplePayLineItem.idl: * Modules/applepay/ApplePayLineItem.h: (WebCore::ApplePayLineItem::encode const): (WebCore::ApplePayLineItem::decode): * Modules/applepay/ApplePayPaymentTiming.idl: Added. * Modules/applepay/ApplePayPaymentTiming.h: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.idl: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.h: Added. Add members that indicate whether this line item is immediate, recurring, or deferred. Depending on that timing, additional members are added for further configuration (e.g. the start and/or end date of a recurring payment, it's frequency, etc.). * Modules/applepay/ApplePayShippingMethod.idl: * Modules/applepay/ApplePayShippingMethod.h: (WebCore::ApplePayShippingMethod::encode const): (WebCore::ApplePayShippingMethod::decode): * Modules/applepay/ApplePayDateComponentsRange.idl: Added. * Modules/applepay/ApplePayDateComponentsRange.h: Added. (WebCore::ApplePayDateComponentsRange::encode const): (WebCore::ApplePayDateComponentsRange::decode): * Modules/applepay/ApplePayDateComponents.idl: Added. * Modules/applepay/ApplePayDateComponents.h: Added. (WebCore::ApplePayDateComponents::encode const): (WebCore::ApplePayDateComponents::decode): Add members that can be used to indicate the estimated shipping dates for this shipping method. * Modules/applepay/ApplePayRequestBase.idl: * Modules/applepay/ApplePayRequestBase.h: * Modules/applepay/ApplePayRequestBase.cpp: (WebCore::convertAndValidate): * Modules/applepay/ApplePaySessionPaymentRequest.h: (WebCore::ApplePaySessionPaymentRequest::supportsCouponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setSupportsCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::couponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::shippingContactEditingMode const): Added. (WebCore::ApplePaySessionPaymentRequest::setShippingContactEditingMode): Added. * Modules/applepay/ApplePayShippingContactEditingMode.idl: Added. * Modules/applepay/ApplePayShippingContactEditingMode.h: Added. Add members that indicate: - whether this payment request supports a coupon code at all - the initial coupon code (assuming the above) - whether this payment request allows editing the shipping contact (i.e. in-store pickup does not) * dom/EventNames.h: * dom/EventNames.in: * Modules/applepay/ApplePayCouponCodeChangedEvent.idl: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.h: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.cpp: Added. (WebCore::ApplePayCouponCodeChangedEvent::ApplePayCouponCodeChangedEvent): (WebCore::ApplePayCouponCodeChangedEvent::eventInterface const): Add a `"couponcodechange"` event that is dispatched whenever the user modifies the coupon code for an `ApplePaySession`. * Modules/applepay/ApplePayCouponCodeDetails.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeDetails.idl. * Modules/applepay/ApplePayCouponCodeDetails.h: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. Used as the `object methodData` when a `PaymentMethodChangeEvent` is dispatched for a `PaymentRequest`. * Modules/applepay/ApplePaySession.idl: * Modules/applepay/ApplePaySession.h: * Modules/applepay/ApplePaySession.cpp: (WebCore::convertAndValidate): (WebCore::ApplePaySession::completeCouponCodeChange): Added. (WebCore::ApplePaySession::didChangeCouponCode): Renamed from `WebCore::ApplePaySession::didChangePaymentMethodMode`. (WebCore::ApplePaySession::canSuspendWithoutCanceling const): (WebCore::ApplePaySession::canBegin const): (WebCore::ApplePaySession::canAbort const): (WebCore::ApplePaySession::canCancel const): (WebCore::ApplePaySession::canCompleteShippingMethodSelection const): (WebCore::ApplePaySession::canCompleteShippingContactSelection const): (WebCore::ApplePaySession::canCompletePaymentMethodSelection const): (WebCore::ApplePaySession::canCompleteCouponCodeChange const): Renamed from `WebCore::ApplePaySession::canCompletePaymentMethodModeChange const`. (WebCore::ApplePaySession::canCompletePayment const): (WebCore::ApplePaySession::isFinalState const): * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): (WebCore::ApplePayPaymentHandler::didChangeCouponCode): Renamed from `WebCore::ApplePayPaymentHandler::didChangePaymentMethodMode`. Add methods for JS to call and state logic to handle coupon code changes. * Modules/applepay/PaymentCoordinator.h: * Modules/applepay/PaymentCoordinator.cpp: (WebCore::PaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::PaymentCoordinator::completePaymentMethodModeChange`. (WebCore::PaymentCoordinator::didChangeCouponCode): Renamed from `WebCore::PaymentCoordinator::didChangePaymentMethodMode`. * Modules/applepay/PaymentCoordinatorClient.h: * loader/EmptyClients.cpp: (WebCore::EmptyPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebCore::EmptyPaymentCoordinatorClient::completePaymentMethodModeChange`. Plumbing up to WebKit. * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm: (WebCore::toDate): Added. (WebCore::toCalendarUnit): Added. (WebCore::toPKPaymentSummaryItem): Convert WebCore objects to PassKit objects. * testing/MockPaymentCoordinator.idl: * testing/MockPaymentCoordinator.h: * testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::showPaymentUI): (WebCore::MockPaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::MockPaymentCoordinator::completePaymentMethodModeChange`. (WebCore::MockPaymentCoordinator::changeCouponCode): Added. * Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm: (WebCore::PaymentAPIVersion::current): * Modules/applepay/PaymentHeaders.h: * Modules/applepay/PaymentSession.h: * Modules/applepay/ApplePayLineItemData.idl: Removed. * Modules/applepay/ApplePayLineItemData.h: Removed. * Modules/applepay/ApplePayShippingMethodData.idl: Removed. * Modules/applepay/ApplePayShippingMethodData.h: Removed. Remove unnecessary base types after r275169. * PlatformMac.cmake: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Source/WebCore/PAL: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * pal/cocoa/PassKitSoftLink.h: * pal/cocoa/PassKitSoftLink.mm: * pal/spi/cocoa/PassKitSPI.h: Source/WebKit: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * Platform/cocoa/PaymentAuthorizationViewController.mm: (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didChangeCouponCode:handler:]): Added. * Platform/ios/PaymentAuthorizationController.mm: (-[WKPaymentAuthorizationControllerDelegate paymentAuthorizationController:didChangeCouponCode:handler:]): Added. * Platform/cocoa/PaymentAuthorizationPresenter.h: * Platform/cocoa/PaymentAuthorizationPresenter.mm: (WebKit::toPKPaymentErrorCode): (WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange): Renamed from `WebKit::PaymentAuthorizationPresenter::completePaymentMethodModeChange`. * Platform/cocoa/WKPaymentAuthorizationDelegate.h: * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: (-[WKPaymentAuthorizationDelegate completeCouponCodeChange:]): Added. (toDateComponents): Added. (toDateComponentsRange): Added. (toShippingMethod): (-[WKPaymentAuthorizationDelegate _didChangeCouponCode:completion:]): Added. Add plumbing from/to PassKit for coupon code changes. * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: * Shared/ApplePay/WebPaymentCoordinatorProxy.h: * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: (WebKit::WebPaymentCoordinatorProxy::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinatorProxy::presenterDidChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinatorProxy::presenterDidChangePaymentMethodMode`. (WebKit::WebPaymentCoordinatorProxy::canBegin const): (WebKit::WebPaymentCoordinatorProxy::canCancel const): (WebKit::WebPaymentCoordinatorProxy::canCompletePayment const): (WebKit::WebPaymentCoordinatorProxy::canAbort const): * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: (WebKit::toNSDateComponents): Added. (WebKit::toPKDateComponentsRange): Added. (WebKit::toPKShippingMethod): (WebKit::toPKShippingContactEditingMode): Added. (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): (WebKit::WebPaymentCoordinatorProxy::platformCompleteCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodModeChange`. Convert PassKit objects to/from WebCore objects. * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::encode): (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::decode): * WebProcess/ApplePay/WebPaymentCoordinator.messages.in: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/ApplePay/WebPaymentCoordinator.cpp: (WebKit::WebPaymentCoordinator::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinator::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinator::didChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinator::didChangePaymentMethodMode`. Plumbing into/from WebCore. Source/WebKitLegacy/mac: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * WebCoreSupport/WebPaymentCoordinatorClient.h: * WebCoreSupport/WebPaymentCoordinatorClient.mm: (WebPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebPaymentCoordinatorClient::completePaymentMethodModeChange`. Source/WTF: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * wtf/PlatformHave.h: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-total.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-total.https-expected.txt: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https.html: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https-expected.txt: Added. * http/tests/ssl/applepay/ApplePayError-expected.txt: * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/238613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-08 22:15:18 +00:00
#if !defined(ENABLE_APPLE_PAY_COUPON_CODE) && HAVE(PASSKIT_COUPON_CODE)
#define ENABLE_APPLE_PAY_COUPON_CODE 1
#endif
#if !defined(ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM) && HAVE(PASSKIT_DEFERRED_SUMMARY_ITEM)
#define ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM 1
#endif
[Apple Pay] Add new values for -apple-pay-button-type https://bugs.webkit.org/show_bug.cgi?id=212684 <rdar://problem/63908535> Reviewed by Anders Carlsson. Source/WebCore: Where available, added new values for -apple-pay-button-type and introduced ApplePaySession v10. New test: http/tests/ssl/applepay/ApplePayButton.html * Modules/applepay/PaymentCoordinatorClient.cpp: (WebCore::PaymentCoordinatorClient::supportsVersion): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::applePayButtonDescription const): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): * en.lproj/Localizable.strings: * platform/LocalizedStrings.cpp: (WebCore::AXApplePayReloadLabel): (WebCore::AXApplePayAddMoneyLabel): (WebCore::AXApplePayTopUpLabel): (WebCore::AXApplePayOrderLabel): (WebCore::AXApplePayRentLabel): (WebCore::AXApplePaySupportLabel): (WebCore::AXApplePayContributeLabel): (WebCore::AXApplePayTipLabel): * platform/LocalizedStrings.h: * rendering/RenderThemeCocoa.mm: (WebCore::toPKPaymentButtonType): * rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.h: Source/WTF: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/ssl/applepay/ApplePayButton-expected.txt: Added. * http/tests/ssl/applepay/ApplePayButton.html: * http/tests/ssl/applepay/ApplePayButtonV4.html: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.txt: Removed. Canonical link: https://commits.webkit.org/225548@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-04 01:57:38 +00:00
#if !defined(ENABLE_APPLE_PAY_INSTALLMENTS) && HAVE(PASSKIT_INSTALLMENTS)
#define ENABLE_APPLE_PAY_INSTALLMENTS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
[Apple Pay] Add new values for -apple-pay-button-type https://bugs.webkit.org/show_bug.cgi?id=212684 <rdar://problem/63908535> Reviewed by Anders Carlsson. Source/WebCore: Where available, added new values for -apple-pay-button-type and introduced ApplePaySession v10. New test: http/tests/ssl/applepay/ApplePayButton.html * Modules/applepay/PaymentCoordinatorClient.cpp: (WebCore::PaymentCoordinatorClient::supportsVersion): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::applePayButtonDescription const): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): * en.lproj/Localizable.strings: * platform/LocalizedStrings.cpp: (WebCore::AXApplePayReloadLabel): (WebCore::AXApplePayAddMoneyLabel): (WebCore::AXApplePayTopUpLabel): (WebCore::AXApplePayOrderLabel): (WebCore::AXApplePayRentLabel): (WebCore::AXApplePaySupportLabel): (WebCore::AXApplePayContributeLabel): (WebCore::AXApplePayTipLabel): * platform/LocalizedStrings.h: * rendering/RenderThemeCocoa.mm: (WebCore::toPKPaymentButtonType): * rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.h: Source/WTF: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/ssl/applepay/ApplePayButton-expected.txt: Added. * http/tests/ssl/applepay/ApplePayButton.html: * http/tests/ssl/applepay/ApplePayButtonV4.html: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.txt: Removed. Canonical link: https://commits.webkit.org/225548@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-04 01:57:38 +00:00
#if !defined(ENABLE_APPLE_PAY_NEW_BUTTON_TYPES) && HAVE(PASSKIT_NEW_BUTTON_TYPES)
#define ENABLE_APPLE_PAY_NEW_BUTTON_TYPES 1
#endif
[Payment Request] upstream new features https://bugs.webkit.org/show_bug.cgi?id=226740 <rdar://problem/78963132> Reviewed by Andy Estes. Source/WebCore: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) Tests: http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html http/tests/paymentrequest/ApplePayModifier-total.https.html http/tests/paymentrequest/paymentmethodchange-couponCode.https.html http/tests/paymentrequest/paymentrequest-couponCode.https.html http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html * Modules/applepay/ApplePayCouponCodeUpdate.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. * Modules/applepay/ApplePayCouponCodeUpdate.h: Renamed from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.h. (WebCore::ApplePayCouponCodeUpdate::encode const): (WebCore::ApplePayCouponCodeUpdate::decode): Object used to update the payment request via `ApplePaySession.prototype.completeCouponCodeChange` when responding to the user modifying the coupon code. * Modules/applepay/ApplePayErrorCode.idl: * Modules/applepay/ApplePayErrorCode.h: Add `"couponCodeInvalid"` and `"couponCodeExpired"`. * Modules/applepay/ApplePayLineItem.idl: * Modules/applepay/ApplePayLineItem.h: (WebCore::ApplePayLineItem::encode const): (WebCore::ApplePayLineItem::decode): * Modules/applepay/ApplePayPaymentTiming.idl: Added. * Modules/applepay/ApplePayPaymentTiming.h: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.idl: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.h: Added. Add members that indicate whether this line item is immediate, recurring, or deferred. Depending on that timing, additional members are added for further configuration (e.g. the start and/or end date of a recurring payment, it's frequency, etc.). * Modules/applepay/ApplePayShippingMethod.idl: * Modules/applepay/ApplePayShippingMethod.h: (WebCore::ApplePayShippingMethod::encode const): (WebCore::ApplePayShippingMethod::decode): * Modules/applepay/ApplePayDateComponentsRange.idl: Added. * Modules/applepay/ApplePayDateComponentsRange.h: Added. (WebCore::ApplePayDateComponentsRange::encode const): (WebCore::ApplePayDateComponentsRange::decode): * Modules/applepay/ApplePayDateComponents.idl: Added. * Modules/applepay/ApplePayDateComponents.h: Added. (WebCore::ApplePayDateComponents::encode const): (WebCore::ApplePayDateComponents::decode): Add members that can be used to indicate the estimated shipping dates for this shipping method. * Modules/applepay/ApplePayRequestBase.idl: * Modules/applepay/ApplePayRequestBase.h: * Modules/applepay/ApplePayRequestBase.cpp: (WebCore::convertAndValidate): * Modules/applepay/ApplePaySessionPaymentRequest.h: (WebCore::ApplePaySessionPaymentRequest::supportsCouponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setSupportsCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::couponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::shippingContactEditingMode const): Added. (WebCore::ApplePaySessionPaymentRequest::setShippingContactEditingMode): Added. * Modules/applepay/ApplePayShippingContactEditingMode.idl: Added. * Modules/applepay/ApplePayShippingContactEditingMode.h: Added. Add members that indicate: - whether this payment request supports a coupon code at all - the initial coupon code (assuming the above) - whether this payment request allows editing the shipping contact (i.e. in-store pickup does not) * dom/EventNames.h: * dom/EventNames.in: * Modules/applepay/ApplePayCouponCodeChangedEvent.idl: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.h: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.cpp: Added. (WebCore::ApplePayCouponCodeChangedEvent::ApplePayCouponCodeChangedEvent): (WebCore::ApplePayCouponCodeChangedEvent::eventInterface const): Add a `"couponcodechange"` event that is dispatched whenever the user modifies the coupon code for an `ApplePaySession`. * Modules/applepay/ApplePayCouponCodeDetails.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeDetails.idl. * Modules/applepay/ApplePayCouponCodeDetails.h: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. Used as the `object methodData` when a `PaymentMethodChangeEvent` is dispatched for a `PaymentRequest`. * Modules/applepay/ApplePaySession.idl: * Modules/applepay/ApplePaySession.h: * Modules/applepay/ApplePaySession.cpp: (WebCore::convertAndValidate): (WebCore::ApplePaySession::completeCouponCodeChange): Added. (WebCore::ApplePaySession::didChangeCouponCode): Renamed from `WebCore::ApplePaySession::didChangePaymentMethodMode`. (WebCore::ApplePaySession::canSuspendWithoutCanceling const): (WebCore::ApplePaySession::canBegin const): (WebCore::ApplePaySession::canAbort const): (WebCore::ApplePaySession::canCancel const): (WebCore::ApplePaySession::canCompleteShippingMethodSelection const): (WebCore::ApplePaySession::canCompleteShippingContactSelection const): (WebCore::ApplePaySession::canCompletePaymentMethodSelection const): (WebCore::ApplePaySession::canCompleteCouponCodeChange const): Renamed from `WebCore::ApplePaySession::canCompletePaymentMethodModeChange const`. (WebCore::ApplePaySession::canCompletePayment const): (WebCore::ApplePaySession::isFinalState const): * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): (WebCore::ApplePayPaymentHandler::didChangeCouponCode): Renamed from `WebCore::ApplePayPaymentHandler::didChangePaymentMethodMode`. Add methods for JS to call and state logic to handle coupon code changes. * Modules/applepay/PaymentCoordinator.h: * Modules/applepay/PaymentCoordinator.cpp: (WebCore::PaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::PaymentCoordinator::completePaymentMethodModeChange`. (WebCore::PaymentCoordinator::didChangeCouponCode): Renamed from `WebCore::PaymentCoordinator::didChangePaymentMethodMode`. * Modules/applepay/PaymentCoordinatorClient.h: * loader/EmptyClients.cpp: (WebCore::EmptyPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebCore::EmptyPaymentCoordinatorClient::completePaymentMethodModeChange`. Plumbing up to WebKit. * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm: (WebCore::toDate): Added. (WebCore::toCalendarUnit): Added. (WebCore::toPKPaymentSummaryItem): Convert WebCore objects to PassKit objects. * testing/MockPaymentCoordinator.idl: * testing/MockPaymentCoordinator.h: * testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::showPaymentUI): (WebCore::MockPaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::MockPaymentCoordinator::completePaymentMethodModeChange`. (WebCore::MockPaymentCoordinator::changeCouponCode): Added. * Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm: (WebCore::PaymentAPIVersion::current): * Modules/applepay/PaymentHeaders.h: * Modules/applepay/PaymentSession.h: * Modules/applepay/ApplePayLineItemData.idl: Removed. * Modules/applepay/ApplePayLineItemData.h: Removed. * Modules/applepay/ApplePayShippingMethodData.idl: Removed. * Modules/applepay/ApplePayShippingMethodData.h: Removed. Remove unnecessary base types after r275169. * PlatformMac.cmake: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Source/WebCore/PAL: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * pal/cocoa/PassKitSoftLink.h: * pal/cocoa/PassKitSoftLink.mm: * pal/spi/cocoa/PassKitSPI.h: Source/WebKit: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * Platform/cocoa/PaymentAuthorizationViewController.mm: (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didChangeCouponCode:handler:]): Added. * Platform/ios/PaymentAuthorizationController.mm: (-[WKPaymentAuthorizationControllerDelegate paymentAuthorizationController:didChangeCouponCode:handler:]): Added. * Platform/cocoa/PaymentAuthorizationPresenter.h: * Platform/cocoa/PaymentAuthorizationPresenter.mm: (WebKit::toPKPaymentErrorCode): (WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange): Renamed from `WebKit::PaymentAuthorizationPresenter::completePaymentMethodModeChange`. * Platform/cocoa/WKPaymentAuthorizationDelegate.h: * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: (-[WKPaymentAuthorizationDelegate completeCouponCodeChange:]): Added. (toDateComponents): Added. (toDateComponentsRange): Added. (toShippingMethod): (-[WKPaymentAuthorizationDelegate _didChangeCouponCode:completion:]): Added. Add plumbing from/to PassKit for coupon code changes. * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: * Shared/ApplePay/WebPaymentCoordinatorProxy.h: * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: (WebKit::WebPaymentCoordinatorProxy::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinatorProxy::presenterDidChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinatorProxy::presenterDidChangePaymentMethodMode`. (WebKit::WebPaymentCoordinatorProxy::canBegin const): (WebKit::WebPaymentCoordinatorProxy::canCancel const): (WebKit::WebPaymentCoordinatorProxy::canCompletePayment const): (WebKit::WebPaymentCoordinatorProxy::canAbort const): * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: (WebKit::toNSDateComponents): Added. (WebKit::toPKDateComponentsRange): Added. (WebKit::toPKShippingMethod): (WebKit::toPKShippingContactEditingMode): Added. (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): (WebKit::WebPaymentCoordinatorProxy::platformCompleteCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodModeChange`. Convert PassKit objects to/from WebCore objects. * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::encode): (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::decode): * WebProcess/ApplePay/WebPaymentCoordinator.messages.in: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/ApplePay/WebPaymentCoordinator.cpp: (WebKit::WebPaymentCoordinator::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinator::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinator::didChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinator::didChangePaymentMethodMode`. Plumbing into/from WebCore. Source/WebKitLegacy/mac: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * WebCoreSupport/WebPaymentCoordinatorClient.h: * WebCoreSupport/WebPaymentCoordinatorClient.mm: (WebPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebPaymentCoordinatorClient::completePaymentMethodModeChange`. Source/WTF: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * wtf/PlatformHave.h: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-total.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-total.https-expected.txt: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https.html: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https-expected.txt: Added. * http/tests/ssl/applepay/ApplePayError-expected.txt: * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/238613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-08 22:15:18 +00:00
#if !defined(ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE) && HAVE(PASSKIT_SHIPPING_CONTACT_EDITING_MODE)
#define ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE 1
#endif
#if !defined(ENABLE_APPLE_PAY_RECURRING_LINE_ITEM) && HAVE(PASSKIT_RECURRING_SUMMARY_ITEM)
#define ENABLE_APPLE_PAY_RECURRING_LINE_ITEM 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_APPLE_PAY_REMOTE_UI) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
[Apple Pay] Add new values for -apple-pay-button-type https://bugs.webkit.org/show_bug.cgi?id=212684 <rdar://problem/63908535> Reviewed by Anders Carlsson. Source/WebCore: Where available, added new values for -apple-pay-button-type and introduced ApplePaySession v10. New test: http/tests/ssl/applepay/ApplePayButton.html * Modules/applepay/PaymentCoordinatorClient.cpp: (WebCore::PaymentCoordinatorClient::supportsVersion): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::applePayButtonDescription const): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): * en.lproj/Localizable.strings: * platform/LocalizedStrings.cpp: (WebCore::AXApplePayReloadLabel): (WebCore::AXApplePayAddMoneyLabel): (WebCore::AXApplePayTopUpLabel): (WebCore::AXApplePayOrderLabel): (WebCore::AXApplePayRentLabel): (WebCore::AXApplePaySupportLabel): (WebCore::AXApplePayContributeLabel): (WebCore::AXApplePayTipLabel): * platform/LocalizedStrings.h: * rendering/RenderThemeCocoa.mm: (WebCore::toPKPaymentButtonType): * rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareNonInheritedData.h: Source/WTF: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/ssl/applepay/ApplePayButton-expected.txt: Added. * http/tests/ssl/applepay/ApplePayButton.html: * http/tests/ssl/applepay/ApplePayButtonV4.html: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.png: Removed. * platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.txt: Removed. Canonical link: https://commits.webkit.org/225548@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-04 01:57:38 +00:00
#define ENABLE_APPLE_PAY_REMOTE_UI 1
#endif
[Payment Request] upstream new features https://bugs.webkit.org/show_bug.cgi?id=226740 <rdar://problem/78963132> Reviewed by Andy Estes. Source/WebCore: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) Tests: http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html http/tests/paymentrequest/ApplePayModifier-total.https.html http/tests/paymentrequest/paymentmethodchange-couponCode.https.html http/tests/paymentrequest/paymentrequest-couponCode.https.html http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html * Modules/applepay/ApplePayCouponCodeUpdate.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. * Modules/applepay/ApplePayCouponCodeUpdate.h: Renamed from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.h. (WebCore::ApplePayCouponCodeUpdate::encode const): (WebCore::ApplePayCouponCodeUpdate::decode): Object used to update the payment request via `ApplePaySession.prototype.completeCouponCodeChange` when responding to the user modifying the coupon code. * Modules/applepay/ApplePayErrorCode.idl: * Modules/applepay/ApplePayErrorCode.h: Add `"couponCodeInvalid"` and `"couponCodeExpired"`. * Modules/applepay/ApplePayLineItem.idl: * Modules/applepay/ApplePayLineItem.h: (WebCore::ApplePayLineItem::encode const): (WebCore::ApplePayLineItem::decode): * Modules/applepay/ApplePayPaymentTiming.idl: Added. * Modules/applepay/ApplePayPaymentTiming.h: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.idl: Added. * Modules/applepay/ApplePayRecurringPaymentDateUnit.h: Added. Add members that indicate whether this line item is immediate, recurring, or deferred. Depending on that timing, additional members are added for further configuration (e.g. the start and/or end date of a recurring payment, it's frequency, etc.). * Modules/applepay/ApplePayShippingMethod.idl: * Modules/applepay/ApplePayShippingMethod.h: (WebCore::ApplePayShippingMethod::encode const): (WebCore::ApplePayShippingMethod::decode): * Modules/applepay/ApplePayDateComponentsRange.idl: Added. * Modules/applepay/ApplePayDateComponentsRange.h: Added. (WebCore::ApplePayDateComponentsRange::encode const): (WebCore::ApplePayDateComponentsRange::decode): * Modules/applepay/ApplePayDateComponents.idl: Added. * Modules/applepay/ApplePayDateComponents.h: Added. (WebCore::ApplePayDateComponents::encode const): (WebCore::ApplePayDateComponents::decode): Add members that can be used to indicate the estimated shipping dates for this shipping method. * Modules/applepay/ApplePayRequestBase.idl: * Modules/applepay/ApplePayRequestBase.h: * Modules/applepay/ApplePayRequestBase.cpp: (WebCore::convertAndValidate): * Modules/applepay/ApplePaySessionPaymentRequest.h: (WebCore::ApplePaySessionPaymentRequest::supportsCouponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setSupportsCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::couponCode const): Added. (WebCore::ApplePaySessionPaymentRequest::setCouponCode): Added. (WebCore::ApplePaySessionPaymentRequest::shippingContactEditingMode const): Added. (WebCore::ApplePaySessionPaymentRequest::setShippingContactEditingMode): Added. * Modules/applepay/ApplePayShippingContactEditingMode.idl: Added. * Modules/applepay/ApplePayShippingContactEditingMode.h: Added. Add members that indicate: - whether this payment request supports a coupon code at all - the initial coupon code (assuming the above) - whether this payment request allows editing the shipping contact (i.e. in-store pickup does not) * dom/EventNames.h: * dom/EventNames.in: * Modules/applepay/ApplePayCouponCodeChangedEvent.idl: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.h: Added. * Modules/applepay/ApplePayCouponCodeChangedEvent.cpp: Added. (WebCore::ApplePayCouponCodeChangedEvent::ApplePayCouponCodeChangedEvent): (WebCore::ApplePayCouponCodeChangedEvent::eventInterface const): Add a `"couponcodechange"` event that is dispatched whenever the user modifies the coupon code for an `ApplePaySession`. * Modules/applepay/ApplePayCouponCodeDetails.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeDetails.idl. * Modules/applepay/ApplePayCouponCodeDetails.h: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl. Used as the `object methodData` when a `PaymentMethodChangeEvent` is dispatched for a `PaymentRequest`. * Modules/applepay/ApplePaySession.idl: * Modules/applepay/ApplePaySession.h: * Modules/applepay/ApplePaySession.cpp: (WebCore::convertAndValidate): (WebCore::ApplePaySession::completeCouponCodeChange): Added. (WebCore::ApplePaySession::didChangeCouponCode): Renamed from `WebCore::ApplePaySession::didChangePaymentMethodMode`. (WebCore::ApplePaySession::canSuspendWithoutCanceling const): (WebCore::ApplePaySession::canBegin const): (WebCore::ApplePaySession::canAbort const): (WebCore::ApplePaySession::canCancel const): (WebCore::ApplePaySession::canCompleteShippingMethodSelection const): (WebCore::ApplePaySession::canCompleteShippingContactSelection const): (WebCore::ApplePaySession::canCompletePaymentMethodSelection const): (WebCore::ApplePaySession::canCompleteCouponCodeChange const): Renamed from `WebCore::ApplePaySession::canCompletePaymentMethodModeChange const`. (WebCore::ApplePaySession::canCompletePayment const): (WebCore::ApplePaySession::isFinalState const): * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): (WebCore::ApplePayPaymentHandler::didChangeCouponCode): Renamed from `WebCore::ApplePayPaymentHandler::didChangePaymentMethodMode`. Add methods for JS to call and state logic to handle coupon code changes. * Modules/applepay/PaymentCoordinator.h: * Modules/applepay/PaymentCoordinator.cpp: (WebCore::PaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::PaymentCoordinator::completePaymentMethodModeChange`. (WebCore::PaymentCoordinator::didChangeCouponCode): Renamed from `WebCore::PaymentCoordinator::didChangePaymentMethodMode`. * Modules/applepay/PaymentCoordinatorClient.h: * loader/EmptyClients.cpp: (WebCore::EmptyPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebCore::EmptyPaymentCoordinatorClient::completePaymentMethodModeChange`. Plumbing up to WebKit. * Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm: (WebCore::toDate): Added. (WebCore::toCalendarUnit): Added. (WebCore::toPKPaymentSummaryItem): Convert WebCore objects to PassKit objects. * testing/MockPaymentCoordinator.idl: * testing/MockPaymentCoordinator.h: * testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::showPaymentUI): (WebCore::MockPaymentCoordinator::completeCouponCodeChange): Renamed from `WebCore::MockPaymentCoordinator::completePaymentMethodModeChange`. (WebCore::MockPaymentCoordinator::changeCouponCode): Added. * Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm: (WebCore::PaymentAPIVersion::current): * Modules/applepay/PaymentHeaders.h: * Modules/applepay/PaymentSession.h: * Modules/applepay/ApplePayLineItemData.idl: Removed. * Modules/applepay/ApplePayLineItemData.h: Removed. * Modules/applepay/ApplePayShippingMethodData.idl: Removed. * Modules/applepay/ApplePayShippingMethodData.h: Removed. Remove unnecessary base types after r275169. * PlatformMac.cmake: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Source/WebCore/PAL: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * pal/cocoa/PassKitSoftLink.h: * pal/cocoa/PassKitSoftLink.mm: * pal/spi/cocoa/PassKitSPI.h: Source/WebKit: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * Platform/cocoa/PaymentAuthorizationViewController.mm: (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didChangeCouponCode:handler:]): Added. * Platform/ios/PaymentAuthorizationController.mm: (-[WKPaymentAuthorizationControllerDelegate paymentAuthorizationController:didChangeCouponCode:handler:]): Added. * Platform/cocoa/PaymentAuthorizationPresenter.h: * Platform/cocoa/PaymentAuthorizationPresenter.mm: (WebKit::toPKPaymentErrorCode): (WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange): Renamed from `WebKit::PaymentAuthorizationPresenter::completePaymentMethodModeChange`. * Platform/cocoa/WKPaymentAuthorizationDelegate.h: * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: (-[WKPaymentAuthorizationDelegate completeCouponCodeChange:]): Added. (toDateComponents): Added. (toDateComponentsRange): Added. (toShippingMethod): (-[WKPaymentAuthorizationDelegate _didChangeCouponCode:completion:]): Added. Add plumbing from/to PassKit for coupon code changes. * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: * Shared/ApplePay/WebPaymentCoordinatorProxy.h: * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: (WebKit::WebPaymentCoordinatorProxy::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinatorProxy::presenterDidChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinatorProxy::presenterDidChangePaymentMethodMode`. (WebKit::WebPaymentCoordinatorProxy::canBegin const): (WebKit::WebPaymentCoordinatorProxy::canCancel const): (WebKit::WebPaymentCoordinatorProxy::canCompletePayment const): (WebKit::WebPaymentCoordinatorProxy::canAbort const): * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: (WebKit::toNSDateComponents): Added. (WebKit::toPKDateComponentsRange): Added. (WebKit::toPKShippingMethod): (WebKit::toPKShippingContactEditingMode): Added. (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): (WebKit::WebPaymentCoordinatorProxy::platformCompleteCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodModeChange`. Convert PassKit objects to/from WebCore objects. * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::encode): (IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::decode): * WebProcess/ApplePay/WebPaymentCoordinator.messages.in: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/ApplePay/WebPaymentCoordinator.cpp: (WebKit::WebPaymentCoordinator::completeCouponCodeChange): Renamed from `WebKit::WebPaymentCoordinator::completePaymentMethodModeChange`. (WebKit::WebPaymentCoordinator::didChangeCouponCode): Renamed from `WebKit::WebPaymentCoordinator::didChangePaymentMethodMode`. Plumbing into/from WebCore. Source/WebKitLegacy/mac: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * WebCoreSupport/WebPaymentCoordinatorClient.h: * WebCoreSupport/WebPaymentCoordinatorClient.mm: (WebPaymentCoordinatorClient::completeCouponCodeChange): Renamed from `WebPaymentCoordinatorClient::completePaymentMethodModeChange`. Source/WTF: - recurring line items (`HAVE_PASSKIT_RECURRING_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_RECURRING_LINE_ITEM`) - deferred line items (`HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM` and `ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM`) - estimated shipping dates (`HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE` and `ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE`) - coupon code entry (`HAVE_PASSKIT_COUPON_CODE` and `ENABLE_APPLE_PAY_COUPON_CODE`) - shipped vs in-store pickup (`HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE` and `ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE`) * wtf/PlatformHave.h: * wtf/PlatformEnableCocoa.h: LayoutTests: * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https-expected.txt: Added. * http/tests/paymentrequest/ApplePayModifier-total.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-total.https-expected.txt: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https.html: Added. * http/tests/paymentrequest/paymentmethodchange-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-couponCode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html: Added. * http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https-expected.txt: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html: Added. * http/tests/paymentrequest/paymentrequest-supportsCouponCode.https-expected.txt: Added. * http/tests/ssl/applepay/ApplePayError-expected.txt: * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/238613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-08 22:15:18 +00:00
#if !defined(ENABLE_APPLE_PAY_SESSION_V11) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140500))
#define ENABLE_APPLE_PAY_SESSION_V11 1
#endif
#if !defined(ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE) && HAVE(PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
#define ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE 1
#endif
[Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided https://bugs.webkit.org/show_bug.cgi?id=228599 <rdar://problem/81190366> Reviewed by Andy Estes. Source/WebCore: r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` can be specified without having to limit it to a specific payment method type. While this works in theory, WebKit doesn't know about the user's selected payment method type until the user actually selects a payment method, meaning that until then the `additionalShippingMethods` are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list of shipping methods when the user changed their selected payment method, meaning that WebKit would have to wait/rely on the user to change their shipping address _after_ selecting a payment method in order for `additionalShippingMethods` to take effect. This also fixes an issue with WebKit's implementation of the W3C Payment Request API by allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. Test: http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html * Modules/applepay/ApplePayModifier.idl: * Modules/applepay/ApplePayModifier.h: * Modules/applepay/ApplePayPaymentMethodUpdate.idl: * Modules/applepay/ApplePayPaymentMethodUpdate.h: (WebCore::ApplePayPaymentMethodUpdate::encode const): (WebCore::ApplePayPaymentMethodUpdate::decode): * Modules/applepay/ApplePayShippingMethodUpdate.idl: * Modules/applepay/ApplePayShippingMethodUpdate.h: (WebCore::ApplePayShippingMethodUpdate::encode const): (WebCore::ApplePayShippingMethodUpdate::decode): Add (or wrap existing) `additionalShippingMethods`/`newShippingMethods` properties. * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: (WebCore::ApplePayPaymentHandler::computeShippingMethods): (WebCore::ApplePayPaymentHandler::detailsUpdated): (WebCore::ApplePayPaymentHandler::shippingOptionUpdated): (WebCore::ApplePayPaymentHandler::paymentMethodUpdated): Also call `computeShippingMethods()` and add the result to the update. * testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::completeShippingMethodSelection): (WebCore::MockPaymentCoordinator::completeShippingContactSelection): (WebCore::MockPaymentCoordinator::completePaymentMethodSelection): (WebCore::MockPaymentCoordinator::completeCouponCodeChange): Support for testing. Source/WebCore/PAL: r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` can be specified without having to limit it to a specific payment method type. While this works in theory, WebKit doesn't know about the user's selected payment method type until the user actually selects a payment method, meaning that until then the `additionalShippingMethods` are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list of shipping methods when the user changed their selected payment method, meaning that WebKit would have to wait/rely on the user to change their shipping address _after_ selecting a payment method in order for `additionalShippingMethods` to take effect. This also fixes an issue with WebKit's implementation of the W3C Payment Request API by allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. * pal/spi/cocoa/PassKitSPI.h: - add the new `shippingMethods` property on `PKPaymentRequestUpdate` - add the existing `errors` property on `PKPaymentRequestPaymentMethodUpdate` Source/WebKit: r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` can be specified without having to limit it to a specific payment method type. While this works in theory, WebKit doesn't know about the user's selected payment method type until the user actually selects a payment method, meaning that until then the `additionalShippingMethods` are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list of shipping methods when the user changed their selected payment method, meaning that WebKit would have to wait/rely on the user to change their shipping address _after_ selecting a payment method in order for `additionalShippingMethods` to take effect. This also fixes an issue with WebKit's implementation of the W3C Payment Request API by allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. * Platform/cocoa/PaymentAuthorizationPresenter.mm: (WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection): (WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection): Also convert and set the `shippingMethods` on the update. Source/WTF: r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods` can be specified without having to limit it to a specific payment method type. While this works in theory, WebKit doesn't know about the user's selected payment method type until the user actually selects a payment method, meaning that until then the `additionalShippingMethods` are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list of shipping methods when the user changed their selected payment method, meaning that WebKit would have to wait/rely on the user to change their shipping address _after_ selecting a payment method in order for `additionalShippingMethods` to take effect. This also fixes an issue with WebKit's implementation of the W3C Payment Request API by allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in `PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly. * wtf/PlatformHave.h: * wtf/PlatformEnableCocoa.h: Add new compile flags for PassKit supporting modifying shipping methods with any update. LayoutTests: * http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html: Added. * http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https-expected.txt: Added. * platform/ios-14-wk2/TestExpectations: * platform/mac-bigsur-wk2/TestExpectations: Added. Skip on older macOS/iOS since they don't support modifying shipping methods with any update. Canonical link: https://commits.webkit.org/240094@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-30 00:28:45 +00:00
#if !defined(ENABLE_APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS) && HAVE(PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS)
#define ENABLE_APPLE_PAY_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_LINE_ITEMS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_APPLICATION_MANIFEST)
#define ENABLE_APPLICATION_MANIFEST 1
#endif
Clean up App-Bound Domains code to only compile for iOS with its own macro https://bugs.webkit.org/show_bug.cgi?id=215027 <rdar://problem/63688232> Reviewed by Darin Adler. Source/WebCore: App-Bound Domains code should only be compiled and run on iOS. This patch wraps any App-Bound Domains code in #if ENABLE(APP_BOUND_DOMAINS), which is equal to IOS_FAMILY, making sure we don't execute or compile the code unnecessarily on macOS. No new tests, behavior should not change so testing is covered by all existing App-Bound Domains layout and API tests. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::executeScriptInWorld): * loader/FrameLoaderClient.h: * page/Frame.cpp: (WebCore::Frame::injectUserScriptImmediately): * page/Page.cpp: (WebCore::Page::injectUserStyleSheet): * page/WebKitNamespace.cpp: (WebCore::WebKitNamespace::messageHandlers): * platform/network/NetworkStorageSession.cpp: * platform/network/NetworkStorageSession.h: * style/StyleScopeRuleSets.cpp: (WebCore::Style::ScopeRuleSets::initializeUserStyle): Source/WebKit: App-bound domains code should only be compiled on iOS, so this patch adds additional '#if ENABLE()' checks to ensure that. Additionally, for clarity this patch creates a new APP_BOUND_DOMAINS macro and replaces existing IOS_FAMILY checks for App-Bound Domains code with this new macro. LoadParameters, PolicyDecision and WKPreferences will be in another patch, this one is huge already. No new tests, behavior should not change so testing is covered by all existing App-Bound Domains layout and API tests. * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::swServerForSession): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.h: * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): (WebKit::NetworkSessionCocoa::sessionWrapperForTask): * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::filterAppBoundCookies): * UIProcess/API/APIPageConfiguration.cpp: (API::PageConfiguration::copy const): * UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::ignoresAppBoundDomains const): (API::PageConfiguration::setIgnoresAppBoundDomains): * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreHasAppBoundSession): (WKWebsiteDataStoreSetAppBoundDomainsForTesting): (WKWebsiteDataStoreClearAppBoundSession): (WKWebsiteDataStoreReinitializeAppBoundDomains): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _isNavigatingToAppBoundDomain:]): Deleted. (-[WKWebView _isForcedIntoAppBoundMode:]): Deleted. Moved to WKWebViewIOS. * UIProcess/API/Cocoa/WKWebViewConfiguration.h: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration limitsNavigationsToAppBoundDomains]): (-[WKWebViewConfiguration setLimitsNavigationsToAppBoundDomains:]): (-[WKWebViewConfiguration _ignoresAppBoundDomains]): (-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Moved App-Bound Domain functions to the part of the file that only compiles on iOS and removed macos tags for WK_API_AVAILABLE, because both the API and SPI are iOS only. * UIProcess/API/Cocoa/WKWebViewPrivate.h: Moved App-Bound Domain functions to the part of the file that only compiles on iOS. * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _appBoundDomains:]): (-[WKWebsiteDataStore _appBoundSchemes:]): * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _isNavigatingToAppBoundDomain:]): (-[WKWebView _isForcedIntoAppBoundMode:]): Moved these from WKWebView. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::getAppBoundDomains): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadData): (WebKit::shouldTreatURLProtocolAsAppBound): (WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted): (WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess): (WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride): (WebKit::WebPageProxy::preconnectTo): Now that m_isNavigatingToAppBoundDomain is iOS only, I changed WebPageProxy::preconnectTo to call the isNavigatingToAppBoundDomain() function, which is available on all platforms but returns WTF::nullopt unless the platform is iOS. (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::isNavigatingToAppBoundDomain const): isNavigatingToAppBoundDomain() is used very frequently, it is cleaner to have two functions -- one for iOS which returns the actual value and one for non-iOS platforms which returns WTF::nullopt -- rather than have #if ENABLE(APP_BOUND_DOMAIN) checks everywhere. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::download): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::appBoundDomainQueue): (WebKit::WebsiteDataStore::platformInitialize): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::renameOriginInWebsiteData): * UIProcess/WebsiteData/WebsiteDataStore.h: * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess): (WebKit::WebLoaderStrategy::loadResourceSynchronously): (WebKit::WebLoaderStrategy::startPingLoad): (WebKit::WebLoaderStrategy::preconnectTo): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::sendH2Ping): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::loadRequest): (WebKit::WebPage::loadDataImpl): (WebKit::WebPage::didReceivePolicyDecision): (WebKit::WebPage::runJavaScript): (WebKit::WebPage::updatePreferences): Only check for the m_limitsNavigationsToAppBoundDomains flag if the platform is iOS. Otherwise it should always be false, because it will never be enabled on a non-iOS platform. * WebProcess/WebPage/WebPage.h: Source/WTF: Define a new APP_BOUND_DOMAINS preprocessor macro to more aptly gate App Bound Domains behavior. * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Tools: Replace check for IOS_FAMILY with more aptly named APP_BOUND_DOMAINS macro. * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm: LayoutTests: These tests should be skipped on mac-wk2 because App Bound Domains is an iOS feature only. * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/229189@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-10 16:26:42 +00:00
#if !defined(ENABLE_APP_BOUND_DOMAINS) && PLATFORM(IOS_FAMILY)
#define ENABLE_APP_BOUND_DOMAINS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_ASYNC_SCROLLING)
#define ENABLE_ASYNC_SCROLLING 1
#endif
#if !defined(ENABLE_ATTACHMENT_ELEMENT)
#define ENABLE_ATTACHMENT_ELEMENT 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_AUTOCAPITALIZE) && !PLATFORM(MAC)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_AUTOCAPITALIZE 1
#endif
Text input autocorrect="off" attribute ignored on Mac https://bugs.webkit.org/show_bug.cgi?id=151019 <rdar://problem/65061700> Reviewed by Simon Fraser. Source/WebCore: Add support for the `autocorrect` attribute on macOS, by not showing the automatic spell checking popup or automatically correcting misspelled words if the root editable element has `autocorrect="off"`. Tests: editing/input/cocoa/autocorrect-off.html editing/input/cocoa/autocorrect-on.html * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled): Source/WTF: * wtf/PlatformEnableCocoa.h: Turn the feature on for macOS. LayoutTests: Move the existing test `fast/events/ios/contenteditable-autocorrect.html` into `editing/input/cocoa`, and refactor it so that it: - Works on both iOS and macOS. - Tests both the `contenteditable` case and the form control case. - Is split into two tests: one of which uses autocorrect="off" by typing "Tset" and expecting it to remain as-is, and a second test that uses autocorrect="on" and verifies that "Tset" is autocorrected to "Test", firing an input event with `inputType` `"insertReplacementText"` in the process. * TestExpectations: * editing/input/cocoa/autocorrect-off-expected.txt: Added. * editing/input/cocoa/autocorrect-off.html: Added. * editing/input/cocoa/autocorrect-on-expected.txt: Added. * editing/input/cocoa/autocorrect-on.html: Added. * fast/events/ios/contenteditable-autocorrect-expected.txt: Removed. * fast/events/ios/contenteditable-autocorrect.html: Removed. * js/dom/dom-static-property-for-in-iteration-expected.txt: Rebaseline a couple of existing layout tests, as well. * platform/ios/TestExpectations: * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/228156@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-11 19:45:57 +00:00
#if !defined(ENABLE_AUTOCORRECT)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_AUTOCORRECT 1
#endif
#if !defined(ENABLE_AVF_CAPTIONS)
#define ENABLE_AVF_CAPTIONS 1
#endif
#if !defined(ENABLE_CACHE_PARTITIONING)
#define ENABLE_CACHE_PARTITIONING 1
#endif
[macOS] Set preference for overridden languages in the WebContent process after entering the sandbox. https://bugs.webkit.org/show_bug.cgi?id=218097 Source/WebKit: <rdar://problem/70586545> Reviewed by Alexey Proskuryakov. Currently, the preference for overridden languages in the WebContent process is set before entering the sandbox, which leaves behind an open connection to opendirectoryd. This preference should be set after entering the sandbox to avoid this. This patch sets the preference after the initialization function has been executed. API test: WebKit.OverrideAppleLanguagesPreference * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::setAppleLanguagesPreference): (WebKit::XPCServiceEventHandler): (WebKit::XPCServiceMain): * WebProcess/com.apple.WebProcess.sb.in: Source/WTF: Reviewed by Alexey Proskuryakov. Disable CFPrefs direct mode for older versions of macOS. In practice, it was already disabled since a mach connection to cfprefsd was established before entering the sandbox on older versions on macOS, but that is fixed in this patch. * wtf/PlatformEnableCocoa.h: Tools: Reviewed by Alexey Proskuryakov. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm: * TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: * TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm: Added. (TEST): * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: LayoutTests: Reviewed by Alexey Proskuryakov. Add test for sandbox access to cfprefsd.daemon, and mark cfprefsd tests as failing for Mojave and Catalina, since CFPrefs direct mode is not enabled on those versions of macOS. * fast/sandbox/mac/sandbox-mach-lookup-expected.txt: * fast/sandbox/mac/sandbox-mach-lookup.html: * platform/mac-catalina/fast/sandbox: Added. * platform/mac-catalina/fast/sandbox/mac: Added. * platform/mac-catalina/fast/sandbox/mac/sandbox-mach-lookup-expected.txt: Added. * platform/mac-mojave/fast/sandbox: Added. * platform/mac-mojave/fast/sandbox/mac: Added. * platform/mac-mojave/fast/sandbox/mac/sandbox-mach-lookup-expected.txt: Added. Canonical link: https://commits.webkit.org/231375@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-09 18:00:23 +00:00
#if !defined(ENABLE_CFPREFS_DIRECT_MODE) && (PLATFORM(IOS_FAMILY) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_CFPREFS_DIRECT_MODE 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_CONTENT_EXTENSIONS)
#define ENABLE_CONTENT_EXTENSIONS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_CONTENT_FILTERING) && !(PLATFORM(WATCHOS) && PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MIN_REQUIRED < 70000) && !PLATFORM(APPLETV)
#define ENABLE_CONTENT_FILTERING 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_CONTEXT_MENUS) && PLATFORM(IOS_FAMILY)
#define ENABLE_CONTEXT_MENUS 0
#endif
Implement support for cursor interactions on iPad https://bugs.webkit.org/show_bug.cgi?id=209268 Reviewed by Darin Adler. No new tests in this patch, just upstreaming. Will attempt to enable some macOS mouse event tests on iOS in the future, though. * wtf/PlatformEnableCocoa.h: Don't disable the contextmenu event on iOS anymore. * wtf/PlatformHave.h: Rename HAVE_HOVER_GESTURE_RECOGNIZER to HAVE_UIKIT_WITH_MOUSE_SUPPORT. Add HAVE_UI_CURSOR_INTERACTION. Enable HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER on iOS. * platform/RuntimeApplicationChecks.h: * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isNews): (WebCore::IOSApplication::isStocks): (WebCore::IOSApplication::isFeedly): Add some bundle ID checks needed in WebKit. * Platform/spi/ios/UIKitSPI.h: * UIProcess/Cocoa/VersionChecks.h: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView _showShareSheet:inRect:completionHandler:]): (-[WKContentView setupDragAndDropInteractions]): (-[WKContentView shouldUseMouseGestureRecognizer]): (-[WKContentView setupMouseGestureRecognizer]): (-[WKContentView mouseGestureRecognizerChanged:]): (-[WKContentView setupCursorInteraction]): (-[WKContentView _cursorInteraction:regionForLocation:defaultRegion:completion:]): (-[WKContentView cursorRegionForPositionInformation:point:]): (-[WKContentView cursorInteraction:styleForRegion:modifiers:]): (-[WKContentView _mouseGestureRecognizerChanged:]): Deleted. * UIProcess/ios/WKMouseGestureRecognizer.h: * UIProcess/ios/WKMouseGestureRecognizer.mm: * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: (WebKit::WebChromeClient::shouldUseMouseEventForSelection): Canonical link: https://commits.webkit.org/222230@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-19 19:16:33 +00:00
#if !defined(ENABLE_CONTEXT_MENU_EVENT) && (PLATFORM(WATCHOS) || PLATFORM(APPLETV))
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#define ENABLE_CONTEXT_MENU_EVENT 0
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER)
#define ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_CSS_COMPOSITING)
#define ENABLE_CSS_COMPOSITING 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
// FIXME: Seems likely this can be enabled for tvOS.
#if !defined(ENABLE_CSS_CONIC_GRADIENTS) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101400) && !PLATFORM(APPLETV)
#define ENABLE_CSS_CONIC_GRADIENTS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_CSS_PAINTING_API)
#define ENABLE_CSS_PAINTING_API 1
#endif
#if !defined(ENABLE_CSS_SELECTORS_LEVEL4)
#define ENABLE_CSS_SELECTORS_LEVEL4 1
#endif
#if !defined(ENABLE_CSS_TRAILING_WORD)
#define ENABLE_CSS_TRAILING_WORD 1
#endif
#if !defined(ENABLE_CSS_TYPED_OM)
#define ENABLE_CSS_TYPED_OM 1
#endif
#if !defined(ENABLE_CURSOR_VISIBILITY)
#define ENABLE_CURSOR_VISIBILITY 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_CUSTOM_CURSOR_SUPPORT) && PLATFORM(IOS_FAMILY)
#define ENABLE_CUSTOM_CURSOR_SUPPORT 0
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_DARK_MODE_CSS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_DARK_MODE_CSS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_DATACUE_VALUE)
#define ENABLE_DATACUE_VALUE 1
#endif
#if !defined(ENABLE_DATALIST_ELEMENT)
#define ENABLE_DATALIST_ELEMENT 1
#endif
#if !defined(ENABLE_DATA_DETECTION) && (PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000))
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_DATA_DETECTION 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_DEVICE_ORIENTATION) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST)
#define ENABLE_DEVICE_ORIENTATION 1
#endif
[Cocoa] Remove all features from FeatureDefines.xcconfig that are already mentioned in PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213962 Reviewed by Sam Weinig. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebCore: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebKit: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WTF: * wtf/PlatformEnableCocoa.h: (ENABLE_DRAG_SUPPORT): Before, this was enabled for iOS, iOS simulator, and Mac Catalyst in the FeatureDefines.xcconfig file, but then disabled for any other iOS family platform here, then enabled by default in PlatformEnable.h, which covered Mac. Instead, disable here only for watchOS and tvOS, which gives the same result in a more straightforward way. (ENABLE_GEOLOCATION): Before, this was enabled for iOS, iOS simulator, Mac Catalyst, and Mac in the FeatureDefines.xcconfig file, then enabled for any other iOS family platform here. Instead, just enable here for all Cocoa platforms, which gives the same result in a more straightforward way. Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Canonical link: https://commits.webkit.org/226771@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 21:32:41 +00:00
#if !defined(ENABLE_DRAG_SUPPORT) && (PLATFORM(WATCHOS) || PLATFORM(APPLETV))
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#define ENABLE_DRAG_SUPPORT 0
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_EDITABLE_REGION) && PLATFORM(IOS)
#define ENABLE_EDITABLE_REGION 1
#endif
#if !defined(ENABLE_ENCRYPTED_MEDIA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101400) && !PLATFORM(MACCATALYST)
#define ENABLE_ENCRYPTED_MEDIA 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_FILE_REPLACEMENT)
#define ENABLE_FILE_REPLACEMENT 1
#endif
Use access instead of stat in some filesystem functions https://bugs.webkit.org/show_bug.cgi?id=226667 Reviewed by Chris Dumez. We are spending a bit more time in WTF::FileSystemImpl functions after the move to std::filesystem (https://bugs.webkit.org/show_bug.cgi?id=225255). In particular, several std::filesystem functions (like the ones called by fileExists and makeAllDirectories) prefer to use stat() over access() for file existence checks. Since our sandbox has a fast path for access(path, F_OK) but not for stat, we ended up spending more time in sandbox evaluation in the kernel after the move to std::filesystem. Note that the two checks don't do exactly the same thing. access(path, F_OK) only checks for path existence, while stat(path) additionally fetches metadata, which requires checking the file-read-metadata permission. But in practice our code was written to be fine with just checking for existence. To work around this, I've re-introduced some of the old WTF::FileSystemImpl functions from FileSystemPosix.cpp. They are the ones that are called by NetworkCache, which seems to be the biggest consumer of these functions. The rest of the functions are still implemented using std::filesystem. * wtf/FileSystem.cpp: (WTF::FileSystemImpl::fileExists): (WTF::FileSystemImpl::deleteFile): (WTF::FileSystemImpl::makeAllDirectories): (WTF::FileSystemImpl::pathByAppendingComponent): (WTF::FileSystemImpl::pathByAppendingComponents): * wtf/PlatformEnableCocoa.h: * wtf/posix/FileSystemPOSIX.cpp: (WTF::FileSystemImpl::fileExists): (WTF::FileSystemImpl::deleteFile): (WTF::FileSystemImpl::makeAllDirectories): (WTF::FileSystemImpl::pathByAppendingComponent): (WTF::FileSystemImpl::pathByAppendingComponents): Canonical link: https://commits.webkit.org/238623@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-09 02:26:34 +00:00
#if !defined(ENABLE_FILESYSTEM_POSIX_FAST_PATH)
#define ENABLE_FILESYSTEM_POSIX_FAST_PATH 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_FILTERS_LEVEL_2)
#define ENABLE_FILTERS_LEVEL_2 1
#endif
#if !defined(ENABLE_FTL_JIT) && !USE(JSVALUE32_64)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_FTL_JIT 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_FULLSCREEN_API) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_FULLSCREEN_API 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_FULL_KEYBOARD_ACCESS) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_FULL_KEYBOARD_ACCESS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_GAMEPAD) && !PLATFORM(WATCHOS)
#define ENABLE_GAMEPAD 1
#endif
[Cocoa] Remove all features from FeatureDefines.xcconfig that are already mentioned in PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213962 Reviewed by Sam Weinig. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebCore: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebKit: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Source/WTF: * wtf/PlatformEnableCocoa.h: (ENABLE_DRAG_SUPPORT): Before, this was enabled for iOS, iOS simulator, and Mac Catalyst in the FeatureDefines.xcconfig file, but then disabled for any other iOS family platform here, then enabled by default in PlatformEnable.h, which covered Mac. Instead, disable here only for watchOS and tvOS, which gives the same result in a more straightforward way. (ENABLE_GEOLOCATION): Before, this was enabled for iOS, iOS simulator, Mac Catalyst, and Mac in the FeatureDefines.xcconfig file, then enabled for any other iOS family platform here. Instead, just enable here for all Cocoa platforms, which gives the same result in a more straightforward way. Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed all features that were mentioned in PlatformEnableCocoa.h; the rules in that file now define whether they are enabled. Canonical link: https://commits.webkit.org/226771@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-04 21:32:41 +00:00
#if !defined(ENABLE_GEOLOCATION)
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#define ENABLE_GEOLOCATION 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_GPU_PROCESS)
#define ENABLE_GPU_PROCESS 1
#endif
#if !defined(ENABLE_GPU_PROCESS_BY_DEFAULT)
#if PLATFORM(MAC) \
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
#define ENABLE_GPU_PROCESS_BY_DEFAULT 1
#endif
#endif
#if !defined(ENABLE_GPU_DRIVER_PREWARMING) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600
#define ENABLE_GPU_DRIVER_PREWARMING 1
#endif
#if !defined(ENABLE_HARDWARE_JPEG) && !(PLATFORM(MAC) && CPU(X86_64))
#define ENABLE_HARDWARE_JPEG 1
#endif
Move PDF heads-up display to UI process on macOS https://bugs.webkit.org/show_bug.cgi?id=215780 <rdar://problem/58715847> Patch by Alex Christensen <achristensen@webkit.org> on 2020-09-04 Reviewed by Tim Horton. Source/WebKit: This has many benefits including the one in the radar, testability, and moving WebKit-specific code from PDFKit to WebKit. Now that the HUD is displayed in the UI process instead of in the web content, zooming in keeps the HUD the same size. A 3d-transformed iframe with a PDF in it now shows the HUD in the place you can click on it, instead of in the transformed PDF. Also, moving the mouse to the HUD within the first 3 seconds prevents it from hiding, which it does when the mouse leaves the HUD. The rest of the behavior I think should be the same. Most users should not notice any difference. Functionality covered by API tests, the first tests for PDF content interaction! * Scripts/webkit/messages.py: * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/mac/WKView.mm: (-[WKView _createPDFHUD:rect:]): (-[WKView _pdfHUD:changedLocation:]): (-[WKView _removePDFHUD:]): (-[WKView _removeAllPDFHUDs]): * UIProcess/API/mac/WKWebViewMac.mm: (-[WKWebView mouseMoved:]): (-[WKWebView mouseDown:]): (-[WKWebView mouseUp:]): (-[WKWebView _createPDFHUD:rect:]): (-[WKWebView _pdfHUD:changedLocation:]): (-[WKWebView _removePDFHUD:]): (-[WKWebView _removeAllPDFHUDs]): * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h: * UIProcess/API/mac/WKWebViewTestingMac.mm: (-[WKWebView pdfHUDs]): * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::createPDFHUD): (WebKit::WebViewImpl::updatePDFHUDLocation): (WebKit::WebViewImpl::removePDFHUD): (WebKit::WebViewImpl::removeAllPDFHUDs): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::processDidTerminate): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): Deleted. (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): Deleted. * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::createPDFHUD): (WebKit::PageClientImpl::updatePDFHUDLocation): (WebKit::PageClientImpl::removePDFHUD): (WebKit::PageClientImpl::removeAllPDFHUDs): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): (WebKit::WebPageProxy::createPDFHUD): (WebKit::WebPageProxy::removePDFHUD): (WebKit::WebPageProxy::updatePDFHUDLocation): (WebKit::WebPageProxy::pdfZoomIn): (WebKit::WebPageProxy::pdfZoomOut): (WebKit::WebPageProxy::pdfSaveToPDF): (WebKit::WebPageProxy::pdfOpenWithPreview): * WebKit.xcodeproj/project.pbxproj: * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate openWithNativeApplication]): (-[WKPDFLayerControllerDelegate saveToPDF]): (WebKit::PDFPlugin::PDFPlugin): (WebKit::PDFPlugin::~PDFPlugin): (WebKit::PDFPlugin::frameForHUD const): (WebKit::PDFPlugin::calculateSizes): (WebKit::PDFPlugin::convertFromPDFViewToRootView const): (WebKit::PDFPlugin::visibilityDidChange): (WebKit::PDFPlugin::zoomIn): (WebKit::PDFPlugin::zoomOut): (WebKit::PDFPlugin::save): (WebKit::PDFPlugin::openWithPreview): * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::zoomPDFIn): (WebKit::WebPage::zoomPDFOut): (WebKit::WebPage::savePDF): (WebKit::WebPage::openPDFWithPreview): (WebKit::WebPage::createPDFHUD): (WebKit::WebPage::updatePDFHUDLocation): (WebKit::WebPage::removePDFHUD): Source/WTF: * wtf/PlatformHave.h: Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm: (pdfData): (TEST): (checkFrame): * TestWebKitAPI/cocoa/TestUIDelegate.h: * TestWebKitAPI/cocoa/TestUIDelegate.mm: (-[TestUIDelegate _webView:saveDataToFile:suggestedFilename:mimeType:originatingURL:]): Canonical link: https://commits.webkit.org/229023@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-05 04:07:47 +00:00
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
#define ENABLE_UI_PROCESS_PDF_HUD 1
#endif
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. Canonical link: https://commits.webkit.org/226797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-06 19:01:37 +00:00
#if !defined(ENABLE_INPUT_TYPE_DATE)
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#define ENABLE_INPUT_TYPE_DATE 1
#endif
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. Canonical link: https://commits.webkit.org/226797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-06 19:01:37 +00:00
#if !defined(ENABLE_INPUT_TYPE_DATETIMELOCAL)
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#define ENABLE_INPUT_TYPE_DATETIMELOCAL 1
#endif
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. Canonical link: https://commits.webkit.org/226797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-06 19:01:37 +00:00
#if !defined(ENABLE_INPUT_TYPE_MONTH)
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#define ENABLE_INPUT_TYPE_MONTH 1
#endif
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. Canonical link: https://commits.webkit.org/226797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-06 19:01:37 +00:00
#if !defined(ENABLE_INPUT_TYPE_TIME)
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#define ENABLE_INPUT_TYPE_TIME 1
#endif
Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls https://bugs.webkit.org/show_bug.cgi?id=213949 Reviewed by Darin Adler. Source/WebCore: Enable date/time related input element types on all Cocoa platforms, but disable them at runtime. To make runtime disabling work completely, the user agent style for these element types was extracted from html.css and is now only added when needed via UserAgentStyle::ensureDefaultStyleSheetsForElement. This is the first step to allowing us to run a subset of the date/time related input element tests on more platforms. If this is successful, we should consider do this for all platforms, not just Cocoa. * css/html.css: Move to RenderTheme accessors for conditional inclusion based on Settings. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isDateTimeField const): Deleted. * html/HTMLInputElement.h: Removed dead isDateTimeField() code. This should have been removed when datetime was removed. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::InputType::create): Switch from using RuntimeEnabledFeatures to Settings for checking for enabling (Settings allows us to write less boilerplate code and is more versatile for testing) and switch to checking the condition on each InputType construction, rather than just on map's creation (again, this allows us to have more flexibility in testing). * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeColorEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeColorEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Deleted. Remove hand written code infavor of code genreated from Settings.yaml. * page/Settings.yaml: Moved from RuntimeEnabledFeatures. * platform/LocalizedStrings.h: Remove weekFormatInLDML() declaration, which had not implementation. * platform/text/PlatformLocale.cpp: (WebCore::Locale::formatDateTime): * platform/text/PlatformLocale.h: Simplify code by marking formatDateTime() virtual on all platforms and un-#ifdefing the base implementation. Platforms that wish to override it still can. * platform/text/cocoa/LocaleCocoa.h: * platform/text/cocoa/LocaleCocoa.mm: * platform/text/ios/LocalizedDateCache.h: * platform/text/ios/LocalizedDateCache.mm: Remove iOS specific #ifdefs around code that should work on all Cocoa platforms. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::colorInputStyleSheet const): (WebCore::RenderTheme::dateInputStyleSheet const): (WebCore::RenderTheme::dateTimeLocalInputStyleSheet const): (WebCore::RenderTheme::monthInputStyleSheet const): (WebCore::RenderTheme::timeInputStyleSheet const): (WebCore::RenderTheme::weekInputStyleSheet const): * rendering/RenderTheme.h: Add default user agent stylesheet strings for input types. All moved from html.css. * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Conditionally add the input type specific user agent stylesheets only if the actual input type is being passed in. Since creation of the input types is guarded by a Setting, this can only happen if the type has been enabled. Source/WebKit: * Shared/FocusedElementInformation.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKFocusedElementInfo initWithFocusedElementInformation:isUserInitiated:userObject:]): (-[WKContentView requiresAccessoryView]): (-[WKContentView textInputTraits]): (mayContainSelectableText): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::getFocusedElementInformation): Remove DateTime from the InputType enum. This should have been removed when datetime was removed. * Shared/WebPreferences.yaml: Add preferences for all the date/time related input types, and have them automatically link up with the newly added WebCore Settings of the same names (this is the default behavior if no explicit webcoreBinding: is provided). * Shared/WebPreferencesDefaultValues.h: Disable date/time input elements by default for non iOS/watchOS cocoa platforms. For non-Cocoa platforms (and iOS/watchOS), they are enabled by default, but only actually get enabled if the appropriate ENABLE_* macro is also set. Source/WTF: * wtf/PlatformEnableCocoa.h: Enable building date/time input types on all Cocoa ports. Canonical link: https://commits.webkit.org/226797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-06 19:01:37 +00:00
#if !defined(ENABLE_INPUT_TYPE_WEEK)
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#define ENABLE_INPUT_TYPE_WEEK 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS)
#define ENABLE_INSPECTOR_ALTERNATE_DISPATCHERS 1
#endif
#if !defined(ENABLE_INSPECTOR_EXTENSIONS) && PLATFORM(MAC)
#define ENABLE_INSPECTOR_EXTENSIONS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_INSPECTOR_TELEMETRY)
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#define ENABLE_INSPECTOR_TELEMETRY 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_INTERSECTION_OBSERVER)
#define ENABLE_INTERSECTION_OBSERVER 1
#endif
#if !defined(ENABLE_IOS_FORM_CONTROL_REFRESH) && PLATFORM(IOS_FAMILY)
#define ENABLE_IOS_FORM_CONTROL_REFRESH 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_IOS_GESTURE_EVENTS) && PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_IOS_GESTURE_EVENTS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_IOS_TOUCH_EVENTS) && PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_IOS_TOUCH_EVENTS 1
#endif
#if !defined(ENABLE_LAYOUT_FORMATTING_CONTEXT)
#define ENABLE_LAYOUT_FORMATTING_CONTEXT 1
#endif
#if !defined(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER)
#define ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER 1
#endif
#if !defined(ENABLE_LEGACY_ENCRYPTED_MEDIA) && !PLATFORM(MACCATALYST)
#define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_LETTERPRESS) && PLATFORM(IOS_FAMILY)
#define ENABLE_LETTERPRESS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_MAC_GESTURE_EVENTS) && PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_MAC_GESTURE_EVENTS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_MEDIA_CAPTURE) && !PLATFORM(MAC)
#define ENABLE_MEDIA_CAPTURE 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_MEDIA_CONTROLS_SCRIPT)
#define ENABLE_MEDIA_CONTROLS_SCRIPT 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Modern Media Controls] upstream new features https://bugs.webkit.org/show_bug.cgi?id=226736 <rdar://problem/78957464> Reviewed by Eric Carlson. Source/WebCore: - bring the "Audio"/"Languages" tracks menu to iOS - add a new "Playback Speed" menu in the overflow menu on iOS and macOS - add support for showing the most relevant `<track kind="chapters">` in the overflow menu on iOS and macOS Tests: media/modern-media-controls/overflow-button/overflow-button.html media/modern-media-controls/overflow-support/chapters.html media/modern-media-controls/overflow-support/playback-speed.html * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::showMediaControlsContextMenu): * Modules/modern-media-controls/media/overflow-support.js: (OverflowSupport.prototype.get mediaEvents): (OverflowSupport.prototype.get tracksToMonitor): (OverflowSupport.prototype.syncControl): * en.lproj/Localizable.strings: * rendering/RenderTheme.h: (WebCore::RenderTheme::mediaControlsScripts): * rendering/RenderThemeAdwaita.cpp: (WebCore::RenderThemeAdwaita::mediaControlsScripts): * rendering/RenderThemeAdwaita.h: * rendering/RenderThemeCocoa.h: * rendering/RenderThemeCocoa.mm: (WebCore::RenderThemeCocoa::purgeCaches): (WebCore::RenderThemeCocoa::mediaControlsScripts): * rendering/RenderThemeWin.h: * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::mediaControlsScripts): Drop the "additional script" and lower the inline capacity of the `Vector`. * testing/Internals.idl: * testing/Internals.h: * testing/Internals.cpp: (WebCore::Internals::setMediaControlsHidePlaybackRates): Added. * html/HTMLMediaElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setMediaControlsHidePlaybackRates): Added. Since Playback Rates is always shown, provide a way for tests to turn it off. Source/WTF: - bring the "Audio"/"Languages" tracks menu to iOS - add a new "Playback Speed" menu on iOS and macOS in the overflow menu - add support for showing the most relevant `<track kind="chapters">` in the overflow menu * wtf/PlatformEnableCocoa.h: LayoutTests: * media/modern-media-controls/overflow-button/overflow-button.html: Added. * media/modern-media-controls/overflow-button/overflow-button-expected.txt: Added. * media/modern-media-controls/overflow-support/chapters.html: Added. * media/modern-media-controls/overflow-support/chapters-expected.txt: Added. * media/modern-media-controls/overflow-support/playback-speed.html: Added. * media/modern-media-controls/overflow-support/playback-speed-expected.txt: Added. * TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/238603@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-08 17:27:33 +00:00
#if !defined(ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS) && (PLATFORM(MAC) || ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000))
[macOS] change for the language/subtitle tracks button to use an `NSMenu` instead of web content https://bugs.webkit.org/show_bug.cgi?id=223239 <rdar://problem/75462340> Reviewed by Eric Carlson. Source/WebCore: Tests: media/modern-media-controls/tracks-support/auto-text-track.html media/modern-media-controls/tracks-support/captions-offset-with-controls-bar.html media/modern-media-controls/tracks-support/click-track-in-contextmenu.html media/modern-media-controls/tracks-support/hidden-tracks.html media/modern-media-controls/tracks-support/no-tracks.html media/modern-media-controls/tracks-support/off-text-track.html media/modern-media-controls/tracks-support/show-contextmenu-then-double-click-on-tracks-button.html media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsContextMenuProvider::create): Added. (WebCore::MediaControlsContextMenuProvider::MediaControlsContextMenuProvider): Added. (WebCore::MediaControlsContextMenuProvider::~MediaControlsContextMenuProvider): Added. (WebCore::MediaControlsContextMenuProvider::populateContextMenu): Added. (WebCore::MediaControlsContextMenuProvider::contextMenuItemSelected): Added. (WebCore::MediaControlsContextMenuProvider::contextMenuCleared): Added. (WebCore::MediaControlsContextMenuProvider::contextMenuContextType): Added. (WebCore::MediaControlsContextMenuEventListener::create): Added. (WebCore::MediaControlsContextMenuEventListener::operator== const): Added. (WebCore::MediaControlsContextMenuEventListener::handleEvent): Added. (WebCore::MediaControlsContextMenuEventListener::MediaControlsContextMenuEventListener): Added. (WebCore::MediaControlsHost::showMediaControlsContextMenu): Create platform-agnostic helper functions and types for creating submenus and menu items so that this logic added for iOS can also be used for macOS. * page/ContextMenuContext.h: (WebCore::ContextMenuContext::type const): Added. * page/ContextMenuContext.cpp: (WebCore::ContextMenuContext::ContextMenuContext): Move `WebKit::ContextMenuContextData::Type` to `WebCore::ContextmenuContext::Type` so that it can be used in WebCore as well. * page/ContextMenuProvider.h: (WebCore::ContextMenuProvider::contextMenuContextType): Added. * page/ContextMenuController.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::handleContextMenuEvent): (WebCore::ContextMenuController::showContextMenu): (WebCore::ContextMenuController::maybeCreateContextMenu): Allow the `ContextMenuProvider` to further customize the `ContextMenu` that's created, such as allowing the hit test to include UA shadow roots and controlling "Inspect Element". * platform/ContextMenuItem.h: * platform/ContextMenuItem.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::setIndentationLevel): Added. (WebCore::ContextMenuItem::indentationLevel const): Added. Provide a way to eventually set the `-[NSMenuItem setIndentationLevel:]`. * Modules/modern-media-controls/controls/tracks-panel.js: Removed. * Modules/modern-media-controls/controls/tracks-panel.css: Removed. * Modules/modern-media-controls/controls/background-click-delegate-notifier.js: (BackgroundClickDelegateNotifier.prototype.handleEvent): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css: (.media-controls.mac.fullscreen): * Modules/modern-media-controls/controls/media-controls.js: (MediaControls.prototype.showTracksPanel): Deleted. (MediaControls.prototype.hideTracksPanel): Deleted. * Modules/modern-media-controls/controls/media-controls.css: (.media-controls.shows-tracks-panel > .controls-bar > *, .media-controls.shows-tracks-panel > button): Deleted. * Modules/modern-media-controls/media/tracks-support.js: (TracksSupport.prototype.buttonWasPressed): (TracksSupport.prototype.syncControl): (TracksSupport.prototype._sortedTrackList): (TracksSupport): Deleted. (TracksSupport.prototype.tracksPanelNumberOfSections): Deleted. (TracksSupport.prototype.tracksPanelTitleForSection): Deleted. (TracksSupport.prototype.tracksPanelNumberOfTracksInSection): Deleted. (TracksSupport.prototype.tracksPanelTitleForTrackInSection): Deleted. (TracksSupport.prototype.tracksPanelIsTrackInSectionSelected): Deleted. (TracksSupport.prototype.tracksPanelSelectionDidChange): Deleted. * Modules/modern-media-controls/js-files: Remove everything related to `TracksPanel` now that macOS also uses a contextmenu. * Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype._rightContainerButtons): (InlineMediaControls.prototype._droppableButtons): * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: (MacOSFullscreenMediaControls): The `OverflowButton` should be the last right container button to be dropped. * Modules/modern-media-controls/media/media-controller.js: (MediaController.prototype.showMediaControlsContextMenu): Provide a way for callers to provide additional options. * page/MediaControlsContextMenuItem.h: (WebCore::MediaControlsContextMenuItem::encode const): (WebCore::MediaControlsContextMenuItem::decode): Drive-by: Rename `isChecked` to `checked` to match `ContextMenuItem`. * Modules/modern-media-controls/controls/tracks-button.js: (TracksButton.prototype.get contextMenuOptions): Drive-by: Rename object keys for clarity. * page/ChromeClient.h: Be more explicit with compiler flags. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::mediaControlsScript): * Modules/modern-media-controls/images/macOS/Overflow.svg: Rework this "..." icon to be ">>" to match similar icons elsewhere on macOS. * WebCore.xcodeproj/project.pbxproj: Source/WebKit: * Shared/ContextMenuContextData.h: * Shared/ContextMenuContextData.cpp: (WebKit::ContextMenuContextData::ContextMenuContextData): Move `WebKit::ContextMenuContextData::Type` to `WebCore::ContextmenuContext::Type` so that it can be used in WebCore as well. * Shared/WebContextMenuItemData.h: * Shared/WebContextMenuItemData.cpp: (WebKit::WebContextMenuItemData::WebContextMenuItemData): (WebKit::WebContextMenuItemData::core const): (WebKit::WebContextMenuItemData::encode const): (WebKit::WebContextMenuItemData::decode): (WebKit::WebContextMenuItemData::indentationLevel const): Added. Provide a way to eventually set the `-[NSMenuItem setIndentationLevel:]`. * UIProcess/WebContextMenuProxy.h: * UIProcess/mac/WebContextMenuProxyMac.h: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuDelegate initWithMenuProxy:]): Added. (-[WKMenuDelegate menuWillOpen:]): Added. (-[WKMenuDelegate menuDidClose:]): Added. (WebKit::WebContextMenuProxyMac::getContextMenuItem): (WebKit::WebContextMenuProxyMac::useContextMenuItems): (WebKit::WebContextMenuProxyMac::platformMenu const): Added. (WebKit::contentsOfContextMenuItem): Added. (WebKit::WebContextMenuProxyMac::platformData const): Added. Add support for `-[NSMenuItem setIndentationLevel:]`. * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _contentsOfUserInterfaceItem:]): (-[WKWebView _didShowContextMenu]): Added. (-[WKWebView _didDismissContextMenu]): Added. * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: * UIProcess/API/ios/WKWebViewTestingIOS.mm: (-[WKWebView _didShowContextMenu]): Deleted. (-[WKWebView _didDismissContextMenu]): Deleted. Move these methods so they can be used on macOS too. * UIProcess/PageClient.h: (WebKit::PageClient::didShowContextMenu): Added. (WebKit::PageClient::didDismissContextMenu): Added. * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::didShowContextMenu): Added. (WebKit::PageClientImpl::didDismissContextMenu): Added. Add support for `didShowContextMenu`/`didDismissContextMenu` for tests. * UIProcess/API/mac/WKWebViewTestingMac.mm: (-[WKWebView _activeMenu]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::contentsOfUserInterfaceItem): Added. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::platformActiveContextMenu const): Added. Add support for `contentsOfUserInterfaceItem` for tests. * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.cpp: Be more explicit with compiler flags. Source/WTF: * wtf/PlatformEnableCocoa.h: Turn on `ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS` for macOS. Tools: * WebKitTestRunner/cocoa/TestRunnerWKWebView.h: * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: (-[TestRunnerWKWebView _didShowContextMenu]): (-[TestRunnerWKWebView _didDismissContextMenu]): (-[TestRunnerWKWebView resetInteractionCallbacks]): * WebKitTestRunner/cocoa/UIScriptControllerCocoa.h: * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: (WTR::UIScriptControllerCocoa::setDidShowContextMenuCallback): Added. (WTR::UIScriptControllerCocoa::setDidDismissContextMenuCallback): Added. (WTR::UIScriptControllerCocoa::isShowingContextMenu const): Added. * WebKitTestRunner/ios/UIScriptControllerIOS.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::setDidShowContextMenuCallback): Deleted. (WTR::UIScriptControllerIOS::setDidDismissContextMenuCallback): Deleted. (WTR::UIScriptControllerIOS::isShowingContextMenu const): Deleted. Move these methods so they can be used on macOS too. LayoutTests: * media/modern-media-controls/tracks-support/auto-text-track.html: Added. * media/modern-media-controls/tracks-support/auto-text-track-expected.txt: Added. * media/modern-media-controls/tracks-support/click-track-in-contextmenu.html: Added. * media/modern-media-controls/tracks-support/click-track-in-contextmenu-expected.txt: Added. * media/modern-media-controls/tracks-support/hidden-tracks.html: Added. * media/modern-media-controls/tracks-support/hidden-tracks-expected.txt: Added. * media/modern-media-controls/tracks-support/off-text-track.html: Added. * media/modern-media-controls/tracks-support/off-text-track-expected.txt: Added. * media/modern-media-controls/tracks-support/show-contextmenu-then-double-click-on-tracks-button.html: Added. * media/modern-media-controls/tracks-support/show-contextmenu-then-double-click-on-tracks-button-expected.txt: Added. * media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html: Added. * media/modern-media-controls/tracks-support/text-track-selected-via-media-api-expected.txt: Added. * media/modern-media-controls/tracks-support/ios/tracks-support-auto-text-track.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-auto-text-track-expected.txt: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-click-track-in-contextmenu.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-click-track-in-contextmenu-expected.txt: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-hidden-tracks.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-hidden-tracks-expected.txt: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-off-text-track.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-off-text-track-expected.txt: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-show-contextmenu-then-double-click-on-tracks-button.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-show-contextmenu-then-double-click-on-tracks-button-expected.txt: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-text-track-selected-via-media-api.html: Removed. * media/modern-media-controls/tracks-support/ios/tracks-support-text-track-selected-via-media-api-expected.txt: Removed. Move the iOS tracks support tests out of an iOS folder since macOS now also uses a contextmenu. * media/modern-media-controls/resources/media-controls-loader.js: * media/modern-media-controls/resources/media-controls-utils.js: (showTracksPanel): Deleted. * media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback.html: Removed. * media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide-esc-key.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-hide-esc-key-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-population.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-population-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-position-and-size.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-position-and-size-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-prevent-controls-bar-from-fading.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-prevent-controls-bar-from-fading-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-prevent-default-on-keydown.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-prevent-default-on-keydown-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-right-x.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-right-x-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused-expected.txt: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html: Removed. * media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-auto-text-track.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-auto-text-track-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-click-track-in-panel.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-click-track-in-panel-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-hidden-tracks.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-hidden-tracks-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-off-text-track.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-off-text-track-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-and-populate-panel.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-and-populate-panel-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-after-dragging-controls.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-after-dragging-controls-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-fullscreen.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-fullscreen-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-then-double-click-on-tracks-button.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-show-panel-then-double-click-on-tracks-button-expected.txt: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-text-track-selected-via-media-api.html: Removed. * media/modern-media-controls/tracks-support/mac/tracks-support-text-track-selected-via-media-api-expected.txt: Removed. Remove everything related to `TracksPanel` now that macOS also uses a contextmenu. * media/modern-media-controls/tracks-support/captions-offset-with-controls-bar.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar.html. * media/modern-media-controls/tracks-support/captions-offset-with-controls-bar-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-captions-offset-with-controls-bar-expected.txt. * media/modern-media-controls/tracks-support/no-tracks.html: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-no-tracks.html. * media/modern-media-controls/tracks-support/no-tracks-expected.txt: Renamed from LayoutTests/media/modern-media-controls/tracks-support/tracks-support-no-tracks-expected.txt. Renamed these tests to remove the redundant "tracks-support". * media/modern-media-controls/tracks-support/tracks-support-audio-tracks.html: Removed. * media/modern-media-controls/tracks-support/tracks-support-audio-tracks-expected.txt: Removed. * media/modern-media-controls/tracks-support/tracks-support-text-tracks.html: Removed. * media/modern-media-controls/tracks-support/tracks-support-text-tracks-expected.txt: Removed. These tests are covered by the other added/renamed tests above. * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html: * media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-placard.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt: * media/modern-media-controls/macos-inline-media-controls/macos-inline-media-shows-start-button.html: Update existing tests to accomodate the `OverflowButton`. * resources/ui-helper.js: (window.UIHelper.chooseMenuAction): Added. (window.UIHelper.async chooseMenuAction): Deleted. Use `UIScriptController.prototype.chooseMenuAction` instead of a combination of `UIScriptController.prototype.rectForMenuAction` and `UIScriptController.prototype.activateAt` since `UIScriptController::chooseMenuAction` basically does that anyways. * TestExpectations: * platform/ios/TestExpectations: * platform/mac/TestExpectations: * platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/235372@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-16 21:57:18 +00:00
#define ENABLE_MEDIA_CONTROLS_CONTEXT_MENUS 1
#endif
[Cocoa] Add Experimental MediaSession coordinator https://bugs.webkit.org/show_bug.cgi?id=222158 <rdar://problem/74508862> Reviewed by Jer Noble. Source/WebCore: Add an experimental MediaSession coordinator, an object that provides an interface that allows script to coordinate changes to MediaSession with the User Agent. Also add an experimental MediaSession playlist interface. The changes are behind new experimental feature flags, MediaSessionCoordinatorEnabled and MediaSessionPlaylistEnabled. Test: media/media-session/mock-coordinator.html * DerivedSources-input.xcfilelist: Add new IDL files. * DerivedSources-output.xcfilelist: Add new derived sources. * DerivedSources.make: Add new IDL. * Modules/mediasession/MediaMetadata.cpp: (WebCore::MediaMetadata::create): Set trackIdentifier from init data. (WebCore::MediaMetadata::setTrackIdentifier): trackIdentifier setter. * Modules/mediasession/MediaMetadata.h: (WebCore::MediaMetadata::trackIdentifier const): * Modules/mediasession/MediaMetadata.idl: * Modules/mediasession/MediaMetadataInit.h: Add trackIdentifier. (WebCore::MediaMetadataInit::encode const): (WebCore::MediaMetadataInit::decode): * Modules/mediasession/MediaMetadataInit.idl: * Modules/mediasession/MediaSession.cpp: (WebCore::MediaSession::MediaSession): Initialize MainThreadGenericEventQueue. (WebCore::MediaSession::setMetadata): metadataUpdated -> notifyMetadataObservers. (WebCore::MediaSession::setReadyState): Session readyState setter. (WebCore::MediaSession::setCoordinator): Coordinator setter. Post 'coordinatorchange' event after change. (WebCore::MediaSession::setPlaylist): Playlist setter. (WebCore::MediaSession::setActionHandler): Call notifyActionHandlerObservers. (WebCore::MediaSession::setPositionState): Call notifyPositionStateObservers. (WebCore::MediaSession::metadataUpdated): Call notifyMetadataObservers. (WebCore::MediaSession::addObserver): New. (WebCore::MediaSession::removeObserver): New. (WebCore::MediaSession::forEachObserver): New. (WebCore::MediaSession::notifyMetadataObservers): New. (WebCore::MediaSession::notifyPositionStateObservers): New. (WebCore::MediaSession::notifyPlaybackStateObservers): New. (WebCore::MediaSession::notifyActionHandlerObservers): New. (WebCore::MediaSession::notifyReadyStateObservers): New. * Modules/mediasession/MediaSession.h: (WebCore::MediaSession::coordinator const): (WebCore::MediaSession::playlist const): (WebCore::MediaSession::logger const): * Modules/mediasession/MediaSession.idl: * Modules/mediasession/MediaSessionAction.h: * Modules/mediasession/MediaSessionAction.idl: * Modules/mediasession/MediaSessionActionDetails.h: * Modules/mediasession/MediaSessionActionDetails.idl: MediaSessionCoordinator proxies calls through the PlatformMediaSessionCoordinator, and then calls the equivalent MediaSession methode if the platform coordinator is successful. * Modules/mediasession/MediaSessionCoordinator.cpp: Added. (WebCore::nextCoordinatorLogIdentifier): (WebCore::MediaSessionCoordinator::create): (WebCore::MediaSessionCoordinator::MediaSessionCoordinator): (WebCore::MediaSessionCoordinator::seekTo): (WebCore::MediaSessionCoordinator::play): (WebCore::MediaSessionCoordinator::pause): (WebCore::MediaSessionCoordinator::setTrack): (WebCore::MediaSessionCoordinator::setMediaSession): (WebCore::MediaSessionCoordinator::logChannel): * Modules/mediasession/MediaSessionCoordinator.h: New. (WebCore::MediaSessionCoordinator::logger const): (WebCore::MediaSessionCoordinator::logIdentifier const): (WebCore::MediaSessionCoordinator::logClassName): * Modules/mediasession/MediaSessionCoordinator.idl: New. * Modules/mediasession/NavigatorMediaSession.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/EventNames.h: * dom/EventTargetFactory.in: * platform/graphics/PlatformMediaSessionCoordinator.h: Added. (WebCore::PlatformMediaSessionCoordinator::setLogger): (WebCore::PlatformMediaSessionCoordinator::loggerPtr const): (WebCore::PlatformMediaSessionCoordinator::logIdentifier const): (WebCore::PlatformMediaSessionCoordinator::logClassName const): (WebCore::PlatformMediaSessionCoordinator::logChannel const): * testing/Internals.cpp: (WebCore::Internals::registerMockMediaSessionCoordinator): Register the mock media session coordinator for testing. * testing/Internals.h: * testing/Internals.idl: * testing/MockMediaSessionCoordinator.cpp: Added. (WebCore::MockMediaSessionCoordinator::create): (WebCore::MockMediaSessionCoordinator::MockMediaSessionCoordinator): (WebCore::MockMediaSessionCoordinator::seekTo): (WebCore::MockMediaSessionCoordinator::play): (WebCore::MockMediaSessionCoordinator::pause): (WebCore::MockMediaSessionCoordinator::setTrack): * testing/MockMediaSessionCoordinator.h: New. Source/WTF: * Scripts/Preferences/WebPreferencesExperimental.yaml: * wtf/PlatformEnableCocoa.h: LayoutTests: * platform/TestExpectations: * media/media-session/mock-coordinator-expected.txt: Added. * media/media-session/mock-coordinator.html: Added. Canonical link: https://commits.webkit.org/235728@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-24 23:14:51 +00:00
#if !defined(ENABLE_MEDIA_SESSION_COORDINATOR) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
#define ENABLE_MEDIA_SESSION_COORDINATOR 1
#endif
#if !defined(ENABLE_MEDIA_SESSION_PLAYLIST) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
#define ENABLE_MEDIA_SESSION_PLAYLIST 1
#endif
Add skeleton implementation of Media Session API https://bugs.webkit.org/show_bug.cgi?id=217797 LayoutTests/imported/w3c: Reviewed by Darin Adler. * resources/import-expectations.json: * resources/resource-files.json: * web-platform-tests/mediasession/META.yml: Added. * web-platform-tests/mediasession/README.md: Added. * web-platform-tests/mediasession/helper/artwork-generator.html: Added. * web-platform-tests/mediasession/helper/w3c-import.log: Added. * web-platform-tests/mediasession/idlharness.window-expected.txt: Added. * web-platform-tests/mediasession/idlharness.window.html: Added. * web-platform-tests/mediasession/idlharness.window.js: Added. * web-platform-tests/mediasession/mediametadata-expected.txt: Added. * web-platform-tests/mediasession/mediametadata.html: Added. * web-platform-tests/mediasession/playbackstate-expected.txt: Added. * web-platform-tests/mediasession/playbackstate.html: Added. * web-platform-tests/mediasession/positionstate-expected.txt: Added. * web-platform-tests/mediasession/positionstate.html: Added. * web-platform-tests/mediasession/setactionhandler-expected.txt: Added. * web-platform-tests/mediasession/setactionhandler.html: Added. * web-platform-tests/mediasession/w3c-import.log: Added. Source/WebCore: Reviewed by Darin Adler. Tests: imported/w3c/web-platform-tests/mediasession/idlharness.window.html imported/w3c/web-platform-tests/mediasession/mediametadata.html imported/w3c/web-platform-tests/mediasession/playbackstate.html imported/w3c/web-platform-tests/mediasession/positionstate.html imported/w3c/web-platform-tests/mediasession/setactionhandler.html Add an initial, no-op, implementation of the Media Session API. Note, the WPT test results include a failing test of Object.isFrozen(); the bindings generator does not currently support generating a FrozenArray of dictionary values. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Modules/mediasession/MediaImage.h: Added. * Modules/mediasession/MediaImage.idl: Added. * Modules/mediasession/MediaMetadata.h: Added. (WebCore::MediaMetadata::create): (WebCore::MediaMetadata::MediaMetadata): (WebCore::MediaMetadata::setMediaSession): (WebCore::MediaMetadata::title const): (WebCore::MediaMetadata::setTitle): (WebCore::MediaMetadata::artist const): (WebCore::MediaMetadata::setArtist): (WebCore::MediaMetadata::album const): (WebCore::MediaMetadata::setAlbum): (WebCore::MediaMetadata::artwork const): (WebCore::MediaMetadata::setArtwork): (WebCore::MediaMetadata::metadataUpdated): * Modules/mediasession/MediaMetadata.idl: Added. * Modules/mediasession/MediaMetadataInit.h: Added. * Modules/mediasession/MediaMetadataInit.idl: Added. * Modules/mediasession/MediaPositionState.h: Added. * Modules/mediasession/MediaPositionState.idl: Added. * Modules/mediasession/MediaSession.cpp: Added. (WebCore::MediaSession::create): (WebCore::MediaSession::MediaSession): (WebCore::MediaSession::setMetadata): (WebCore::MediaSession::setPlaybackState): (WebCore::MediaSession::setActionHandler): (WebCore::MediaSession::setPositionState): (WebCore::MediaSession::metadataUpdated): * Modules/mediasession/MediaSession.h: Added. (WebCore::MediaSession::metadata const): (WebCore::MediaSession::playbackState const): * Modules/mediasession/MediaSession.idl: Added. * Modules/mediasession/MediaSessionAction.h: Added. * Modules/mediasession/MediaSessionAction.idl: Added. * Modules/mediasession/MediaSessionActionDetails.h: Added. * Modules/mediasession/MediaSessionActionDetails.idl: Added. * Modules/mediasession/MediaSessionActionHandler.h: Added. * Modules/mediasession/MediaSessionActionHandler.idl: Added. * Modules/mediasession/MediaSessionPlaybackState.h: Added. * Modules/mediasession/MediaSessionPlaybackState.idl: Added. * Modules/mediasession/Navigator+MediaSession.idl: Added. * Modules/mediasession/NavigatorMediaSession.cpp: Added. (WebCore::NavigatorMediaSession::NavigatorMediaSession): (WebCore::NavigatorMediaSession::mediaSession): (WebCore::NavigatorMediaSession::from): (WebCore::NavigatorMediaSession::supplementName): * Modules/mediasession/NavigatorMediaSession.h: Added. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Source/WTF: Reviewed by Darin Adler. * Scripts/Preferences/WebPreferencesExperimental.yaml: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Tools: <rdar://problem/70367487> Reviewed by Darin Adler. * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): Canonical link: https://commits.webkit.org/230686@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-20 16:20:16 +00:00
#if !defined(ENABLE_MEDIA_SESSION) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_MEDIA_SESSION 1
#endif
Enable MEDIA_SOURCE in IOS Simulator https://bugs.webkit.org/show_bug.cgi?id=222041 Source/WebCore: <rdar://problem/74433510> Reviewed by Eric Carlson. MediaSource IDLs were protected by MEDIA_SOURCE but not by MediaSource runtime flag. Update IDLs accordingly. Covered by existing tests. * Modules/mediasource/AudioTrack+MediaSource.idl: * Modules/mediasource/DOMURL+MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediasource/SourceBufferList.idl: * Modules/mediasource/TextTrack+MediaSource.idl: * Modules/mediasource/VideoTrack+MediaSource.idl: * bindings/js/WebCoreBuiltinNames.h: * html/HTMLMediaElement.idl: Minor change to kick in binding generator. * html/track/AudioTrack.idl: * html/track/TextTrack.idl: * html/track/VideoTrack.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::mediaEngine): If AVStreamDataParser is not available, MSE backend will not be available. Update assertion accordingly. Source/WebCore/PAL: Reviewed by Eric Carlson. Add missing header declarations in AVStreamDataParserSPI.h and use it for simulator. * PAL.xcodeproj/project.pbxproj: * pal/spi/cocoa/AVFoundationSPI.h: * pal/spi/cocoa/AVStreamDataParserSPI.h: Added. Source/WTF: Reviewed by Eric Carlson. * Scripts/Preferences/WebPreferences.yaml: Move this settings out of ENABLE(MEDIA_SOURCE) to allow existing binding code to compile. * wtf/PlatformEnableCocoa.h: Tools: <rdar://problem/74433510> Reviewed by Eric Carlson. * WebKitTestRunner/ios/TestControllerIOS.mm: (WTR::TestController::platformResetPreferencesToConsistentValues): Disable MediaSource runtime flag on simulator since it lacks implementation of AVStreamDataParser. LayoutTests: Reviewed by Eric Carlson. * fast/mediastream/MediaStream-video-element.html: Update to sort properties lexicographically. * fast/mediastream/MediaStream-video-element-expected.txt: Canonical link: https://commits.webkit.org/234745@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-02 15:37:23 +00:00
#if !defined(ENABLE_MEDIA_SOURCE) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_MEDIA_SOURCE 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_MEDIA_STREAM) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_MEDIA_STREAM 1
#endif
Remove all references to non-existent 10.16 https://bugs.webkit.org/show_bug.cgi?id=215202 Reviewed by Wenson Hsieh. Source/bmalloc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: Source/JavaScriptCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty: * gtest/xcode/Config/DebugProject.xcconfig: * gtest/xcode/Config/ReleaseProject.xcconfig: Source/ThirdParty/ANGLE: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty/libwebrtc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: Source/WebCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebCore/PAL: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebInspectorUI: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebKit: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Scripts/process-entitlements.sh: * WebProcess/com.apple.WebProcess.sb.in: Source/WebKitLegacy/mac: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WTF: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: * wtf/PlatformUse.h: Tools: * ContentExtensionTester/Configurations/Base.xcconfig: * ContentExtensionTester/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/Base.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/DebugRelease.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MiniBrowser/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: * TestWebKitAPI/config.h: * WebEditingTester/Configurations/Base.xcconfig: * WebEditingTester/Configurations/DebugRelease.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/DebugRelease.xcconfig: * lldb/lldbWebKitTester/Configurations/Base.xcconfig: * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Canonical link: https://commits.webkit.org/227995@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-06 00:58:34 +00:00
#if !defined(ENABLE_MEDIA_USAGE) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000))
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_MEDIA_USAGE 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_MEMORY_SAMPLER)
#define ENABLE_MEMORY_SAMPLER 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_META_VIEWPORT) && PLATFORM(IOS_FAMILY)
#define ENABLE_META_VIEWPORT 1
#endif
#if !defined(ENABLE_MODEL_ELEMENT)
#define ENABLE_MODEL_ELEMENT 1
#endif
Remove unused JS and CSS files of media controls https://bugs.webkit.org/show_bug.cgi?id=214955 <rdar://problem/66604040> Reviewed by Eric Carlson. Source/WebCore: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * Modules/mediacontrols/assets-apple-iOS.svg: Removed. * Modules/mediacontrols/mediaControlsiOS.css: Removed. * Modules/mediacontrols/mediaControlsiOS.js: Removed. * rendering/RenderTheme.h: (WebCore::RenderTheme::modernMediaControlsStyleSheet): Deleted. * rendering/RenderThemeCocoa.h: * rendering/RenderThemeCocoa.mm: (WebCore::RenderThemeCocoa::purgeCaches): Added. (WebCore::RenderThemeCocoa::mediaControlsStyleSheet): Added. (WebCore::RenderThemeCocoa::mediaControlsScripts): Added. (WebCore::RenderThemeCocoa::mediaControlsBase64StringForIconNameAndType): Added. * rendering/RenderThemeIOS.h: * rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Deleted. (WebCore::RenderThemeIOS::modernMediaControlsStyleSheet): Deleted. (WebCore::RenderThemeIOS::purgeCaches): Deleted. (WebCore::RenderThemeIOS::mediaControlsScripts): Deleted. (WebCore::RenderThemeIOS::mediaControlsBase64StringForIconNameAndType): Deleted. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::mediaControlsStyleSheet): Deleted. (WebCore::RenderThemeMac::modernMediaControlsStyleSheet): Deleted. (WebCore::RenderThemeMac::purgeCaches): Deleted. (WebCore::RenderThemeMac::mediaControlsScripts): Deleted. (WebCore::RenderThemeMac::mediaControlsBase64StringForIconNameAndType): Deleted. Move media controls functions to `RenderThemeCocoa` since they are identical. * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediacontrols/MediaControlsHost.h: * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::MediaControlsHost::shadowRootCSSText): * css/mediaControls.css: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): * html/MediaDocument.cpp: (WebCore::MediaDocumentParser::createDocumentStructure): (WebCore::MediaDocument::defaultEventHandler): * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setModernMediaControlsEnabled): Deleted. (WebCore::RuntimeEnabledFeatures::modernMediaControlsEnabled const): Deleted. Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. * html/track/TextTrackCueGeneric.cpp: Update the static `DEFAULTCAPTIONFONTSIZE` value for modern media controls. * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css: * Modules/modern-media-controls/controls/text-tracks.css: Update comments. * css/mediaControlsiOS.css: Removed. This file was never included anywhere. * platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::resetHaveEverRegisteredAsNowPlayingApplicationForTesting): added. * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::resetHaveEverRegisteredAsNowPlayingApplicationForTesting): added. * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): Drive-by: Reset `haveEverRegisteredAsNowPlayingApplication` to a consistent state between tests. This is expected by `LayoutTests/media/now-playing-status-without-media.html`. * bindings/js/WebCoreBuiltinNames.h: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetModernMediaControlsEnabled): Deleted. (WKPreferencesGetModernMediaControlsEnabled): Deleted. Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. * UIProcess/mac/WKFullScreenWindowController.mm: Update the static `minVideoWidth` value for modern media controls. Source/WebKitLegacy/mac: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferencesPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences modernMediaControlsEnabled]): Deleted. (-[WebPreferences setModernMediaControlsEnabled:]): Deleted. Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. Source/WebKitLegacy/win: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * Interfaces/IWebPreferencesPrivate.idl: * WebPreferenceKeysPrivate.h: * WebPreferences.h: * WebPreferences.cpp: (WebPreferences::setModernMediaControlsEnabled): Deleted. (WebPreferences::modernMediaControlsEnabled): Deleted. * WebView.cpp: (WebView::notifyPreferencesChanged): Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. Source/WTF: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: * Scripts/Preferences/WebPreferences.yaml: Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. Tools: Cocoa platforms are already using modern media controls so there's no reason to keep the old media controls resources/logic around any longer. It just wastes space. The non-iOS Apple controls must be kept though as they are still used on Windows. * WebKitTestRunner/gtk/TestControllerGtk.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): Replace `ModernMediaControlsEnabled` setting with `ENABLE_MODERN_MEDIA_CONTROLS` build flag. LayoutTests: Remove tests (and their expectations) that used `ModernMediaControlsEnabled=false`. * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: * accessibility/ios-simulator/media-with-aria-label.html: Removed. * accessibility/ios-simulator/media-with-aria-label-expected.txt: Removed. * accessibility/mac/media-emits-object-replacement.html: Removed. * accessibility/mac/media-emits-object-replacement-expected.txt: Removed. * accessibility/mac/video-tag-hit-test.html: Removed. * accessibility/mac/video-tag-hit-test-expected.txt: Removed. * accessibility/mac/video-volume-slider-accessibility.html: Removed. * accessibility/mac/video-volume-slider-accessibility-expected.txt: Removed. * accessibility/media-element.html: Removed. * platform/gtk/accessibility/media-element-expected.txt: Removed. * platform/mac/accessibility/media-element-expected.txt: Removed. * platform/wincairo/accessibility/media-element-expected.txt: Removed. * accessibility/media-emits-object-replacement.html: Removed. * accessibility/media-emits-object-replacement-expected.txt: Removed. * platform/glib/accessibility/media-emits-object-replacement-expected.txt: Removed. * accessibility/media-with-aria-label.html: Removed. * accessibility/media-with-aria-label-expected.txt: Removed. * compositing/video/poster.html: * compositing/video/poster-expected.html: * fast/hidpi/video-controls-in-hidpi.html: Removed. * platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * platform/ios/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * platform/win/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * platform/wincairo/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * platform/wpe/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed. * fast/layers/video-layer.html: Removed. * platform/gtk/fast/layers/video-layer-expected.png: Removed. * platform/gtk/fast/layers/video-layer-expected.txt: Removed. * platform/ios/fast/layers/video-layer-expected.txt: Removed. * platform/mac/fast/layers/video-layer-expected.png: Removed. * platform/mac/fast/layers/video-layer-expected.txt: Removed. * platform/win/fast/layers/video-layer-expected.txt: Removed. * platform/wincairo/fast/layers/video-layer-expected.txt: Removed. * platform/wpe/fast/layers/video-layer-expected.txt: Removed. * fast/mediastream/MediaStream-video-element-video-tracks-disabled.html: * fullscreen/video-controls-drag.html: Removed. * fullscreen/video-controls-drag-expected.txt: Removed. * fullscreen/video-controls-override.html: Removed. * fullscreen/video-controls-override-expected.txt: Removed. * fullscreen/video-controls-rtl.html: Removed. * fullscreen/video-controls-rtl-expected.txt: Removed. * fullscreen/video-controls-timeline.html: Removed. * fullscreen/video-controls-timeline-expected.txt: Removed. * http/tests/media/hls/hls-accessiblity-describes-video-menu.html: Removed. * http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt: Removed. * http/tests/media/hls/hls-audio-tracks-has-audio.html: * http/tests/media/hls/hls-audio-tracks-locale-selection.html: * http/tests/media/hls/hls-audio-tracks.html: * http/tests/media/hls/hls-progress.html: * http/tests/media/hls/hls-webvtt-tracks.html: * http/tests/media/hls/range-request.html: * http/tests/media/hls/video-controls-live-stream.html: Removed. * platform/gtk/http/tests/media/hls/video-controls-live-stream-expected.txt: Removed. * platform/mac/http/tests/media/hls/video-controls-live-stream-expected.txt: Removed. * http/tests/media/hls/video-cookie.html: * http/tests/media/hls/video-duration-accessibility.html: Removed. * http/tests/media/hls/video-duration-accessibility-expected.txt: Removed. * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html: * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html: * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html: * http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html: * inspector/css/pseudo-element-matches.html: * inspector/css/pseudo-element-matches-expected.txt: * media/accessibility-closed-captions-has-aria-owns.html: Removed. * media/accessibility-closed-captions-has-aria-owns-expected.txt: Removed. * media/adopt-node-crash.html: * media/airplay-allows-buffering.html: * media/airplay-autoplay.html: * media/audio-as-video-fullscreen.html: Removed. * media/audio-as-video-fullscreen-expected.txt: Removed. * media/audio-controls-do-not-fade-out.html: Removed. * media/audio-controls-do-not-fade-out-expected.txt: Removed. * media/audio-controls-rendering.html: Removed. * platform/gtk/media/audio-controls-rendering-expected.txt: Removed. * platform/ios/media/audio-controls-rendering-expected.txt: Removed. * platform/mac/media/audio-controls-rendering-expected.txt: Removed. * platform/win/media/audio-controls-rendering-expected.txt: Removed. * platform/wincairo/media/audio-controls-rendering-expected.txt: Removed. * media/audio-controls-timeline-in-media-document.html: Removed. * media/audio-controls-timeline-in-media-document-expected.txt: Removed. * media/audio-delete-while-slider-thumb-clicked.html: Removed. * media/audio-delete-while-slider-thumb-clicked-expected.txt: Removed. * media/audio-delete-while-step-button-clicked.html: Removed. * media/audio-delete-while-step-button-clicked-expected.txt: Removed. * media/audio-repaint.html: Removed. * platform/gtk/media/audio-repaint-expected.txt: Removed. * platform/ios/media/audio-repaint-expected.txt: Removed. * platform/mac/media/audio-repaint-expected.txt: Removed. * platform/wincairo/media/audio-repaint-expected.txt: Removed. * media/click-placeholder-not-pausing.html: Removed. * media/click-placeholder-not-pausing-expected.txt: Removed. * media/click-volume-bar-not-pausing.html: Removed. * media/click-volume-bar-not-pausing-expected.txt: Removed. * media/controls-after-reload.html: Removed. * platform/gtk/media/controls-after-reload-expected.txt: Removed. * platform/mac-catalina/media/controls-after-reload-expected.txt: Removed. * platform/mac/media/controls-after-reload-expected.txt: Removed. * platform/win/media/controls-after-reload-expected.txt: Removed. * platform/wincairo/media/controls-after-reload-expected.txt: Removed. * media/controls-drag-timebar.html: Removed. * media/controls-drag-timebar-expected.txt: Removed. * media/controls-right-click-on-timebar.html: Removed. * media/controls-right-click-on-timebar-expected.txt: Removed. * media/controls-strict.html: Removed. * platform/gtk/media/controls-strict-expected.txt: Removed. * platform/ios/media/controls-strict-expected.txt: Removed. * platform/mac/media/controls-strict-expected.txt: Removed. * platform/mac/media/controls-strict-mode-expected.txt: Removed. * platform/win/media/controls-strict-expected.txt: Removed. * platform/wincairo/media/controls-strict-expected.txt: Removed. * media/controls-styling.html: Removed. * platform/gtk/media/controls-styling-expected.txt: Removed. * platform/mac/media/controls-styling-expected.txt: Removed. * platform/win/media/controls-styling-expected.txt: Removed. * platform/wincairo/media/controls-styling-expected.txt: Removed. * media/controls-styling-strict.html: Removed. * platform/gtk/media/controls-styling-strict-expected.txt: Removed. * platform/mac/media/controls-styling-strict-expected.txt: Removed. * platform/wincairo/media/controls-styling-strict-expected.txt: Removed. * media/controls-without-preload.html: Removed. * platform/gtk/media/controls-without-preload-expected.txt: Removed. * platform/ios/media/controls-without-preload-expected.txt: Removed. * platform/mac/media/controls-without-preload-expected.txt: Removed. * platform/win/media/controls-without-preload-expected.txt: Removed. * platform/wincairo/media/controls-without-preload-expected.txt: Removed. * media/controls/airplay-controls.html: Removed. * media/controls/airplay-controls-expected.txt: Removed. * media/controls/airplay-picker.html: Removed. * media/controls/airplay-picker-expected.txt: Removed. * media/controls/basic.html: Removed. * media/controls/basic-expected.txt: Removed. * media/controls/controls-test-helpers.js: Removed. * media/controls/default-size-should-show-scrubber.html: Removed. * media/controls/default-size-should-show-scrubber-expected.txt: Removed. * media/controls/elementOrder.html: Removed. * media/controls/elementOrder-expected.txt: Removed. * media/controls/forced-tracks-only.html: Removed. * media/controls/forced-tracks-only-expected.txt: Removed. * media/controls/fullscreen-button-inline-layout.html: Removed. * media/controls/fullscreen-button-inline-layout-expected.txt: Removed. * media/controls/inline-elements-dropoff-order.html: Removed. * media/controls/inline-elements-dropoff-order-expected.txt: Removed. * media/controls/picture-in-picture.html: Removed. * media/controls/picture-in-picture-expected.txt: Removed. * media/controls/pip-placeholder-without-video-controls.html: Removed. * media/controls/pip-placeholder-without-video-controls-expected.txt: Removed. * media/controls/showControlsButton.html: Removed. * media/controls/showControlsButton-expected.txt: Removed. * media/controls/statusDisplay.html: Removed. * media/controls/statusDisplay-expected.txt: Removed. * media/controls/statusDisplayBad.html: Removed. * media/controls/statusDisplayBad-expected.txt: Removed. * media/controls/track-menu.html: Removed. * media/controls/track-menu-expected.txt: Removed. * media/in-band-tracks.js: (seeked): Deleted. (testTextTrackMode): Deleted. (testCueStyle.seeked): Deleted. (testCueStyle.canplaythrough): Deleted. (testCueStyle): Deleted. * media/mac/controls-panel-not-clipped-out.html: Removed. * media/mac/controls-panel-not-clipped-out-expected.html: Removed. * media/media-captions-no-controls.html: * media/media-captions-no-controls-expected.txt: * media/media-controller-drag-crash.html: Removed. * media/media-controller-drag-crash-expected.txt: Removed. * media/media-controls-accessibility.html: Removed. * media/media-controls-accessibility-expected.txt: Removed. * media/media-controls-cancel-events.html: Removed. * media/media-controls-cancel-events-expected.txt: Removed. * media/media-controls-clone.html: Removed. * platform/gtk/media/media-controls-clone-expected.txt: Removed. * platform/ios/media/media-controls-clone-expected.txt: Removed. * platform/mac/media/media-controls-clone-expected.txt: Removed. * platform/wincairo/media/media-controls-clone-expected.txt: Removed. * media/media-controls-drag-timeline-set-controls-property.html: Removed. * media/media-controls-drag-timeline-set-controls-property-expected.txt: Removed. * media/media-controls-invalid-url.html: Removed. * media/media-controls-invalid-url-expected.txt: Removed. * platform/win/media/media-controls-invalid-url-expected.txt: Removed. * media/media-controls-play-button-updates.html: Removed. * platform/gtk/media/media-controls-play-button-updates-expected.png: Removed. * platform/gtk/media/media-controls-play-button-updates-expected.txt: Removed. * media/media-controls-play-button-updates-expected.txt: Removed. * media/media-controls-play-button-updates-expected.png: Removed. * media/media-controls-timeline-updates.html: Removed. * media/media-controls-timeline-updates-expected.txt: Removed. * media/media-controls-timeline-updates-after-playing.html: Removed. * media/media-controls-timeline-updates-after-playing-expected.txt: Removed. * media/media-controls-timeline-updates-when-hovered.html: Removed. * media/media-controls-timeline-updates-when-hovered-expected.txt: Removed. * media/media-controls.js: Removed. * media/media-document-audio-controls-visible.html: Removed. * media/media-document-audio-controls-visible-expected.txt: Removed. * media/media-document-audio-repaint.html: Removed. * platform/gtk/media/media-document-audio-repaint-expected.txt: Removed. * platform/mac/media/media-document-audio-repaint-expected.txt: Removed. * media/media-document-audio-repaint-expected.txt: Removed. * media/media-fullscreen-loop-inline.html: * media/media-fullscreen-pause-inline.html: * media/media-fullscreen-return-to-inline.html: * media/media-source/only-bcp47-language-tags-accepted-as-valid.html: * media/media-volume-slider-rendered-below.html: Removed. * media/media-volume-slider-rendered-below-expected.txt: Removed. * media/media-volume-slider-rendered-normal.html: Removed. * media/media-volume-slider-rendered-normal-expected.txt: Removed. * media/nodesFromRect-shadowContent.html: Removed. * media/nodesFromRect-shadowContent-expected.txt: Removed. * media/progress-events-generated-correctly.html: * media/require-user-gesture-to-load-video.html: Removed. * media/require-user-gesture-to-load-video-expected.txt: Removed. * media/tab-focus-inside-media-elements.html: Removed. * media/tab-focus-inside-media-elements-expected.txt: Removed. * media/track/in-band/track-in-band-kate-ogg-mode.html: Removed. * media/track/in-band/track-in-band-kate-ogg-mode-expected.txt: Removed. * media/track/in-band/track-in-band-kate-ogg-style.html: Removed. * media/track/in-band/track-in-band-kate-ogg-style-expected.txt: Removed. * media/track/in-band/track-in-band-srt-mkv-mode.html: Removed. * media/track/in-band/track-in-band-srt-mkv-mode-expected.txt: Removed. * media/track/in-band/track-in-band-srt-mkv-style.html: Removed. * media/track/in-band/track-in-band-srt-mkv-style-expected.txt: Removed. * media/track/regions-webvtt/vtt-region-display.html: Removed. * media/track/regions-webvtt/vtt-region-display-expected.txt: Removed. * media/track/regions-webvtt/vtt-region-dom-layout.html: Removed. * media/track/regions-webvtt/vtt-region-dom-layout-expected.txt: Removed. * media/track/texttrackcue/texttrackcue-addcue.html: * media/track/texttrackcue/texttrackcue-displaycue.html: Removed. * media/track/texttrackcue/texttrackcue-displaycue-expected.txt: Removed. * media/track/track-automatic-subtitles.html: * media/track/track-css-all-cues.html: Removed. * media/track/track-css-all-cues-expected.txt: Removed. * media/track/track-css-cue-lifetime.html: Removed. * media/track/track-css-cue-lifetime-expected.txt: Removed. * media/track/track-css-matching.html: Removed. * media/track/track-css-matching-expected.txt: Removed. * media/track/track-css-matching-default.html: Removed. * media/track/track-css-matching-default-expected.txt: Removed. * media/track/track-css-matching-lang.html: Removed. * media/track/track-css-matching-lang-expected.txt: Removed. * media/track/track-css-matching-timestamps.html: Removed. * media/track/track-css-matching-timestamps-expected.txt: Removed. * media/track/track-css-property-allowlist-expected.txt: Removed. * media/track/track-css-property-allowlist.html: Removed. * media/track/track-css-stroke-cues.html: Removed. * media/track/track-css-stroke-cues-expected.txt: Removed. * media/track/track-css-user-override.html: Removed. * media/track/track-css-user-override-expected.txt: Removed. * media/track/track-css-visible-stroke.html: * media/track/track-cue-container-rendering-position.html: Removed. * media/track/track-cue-container-rendering-position-expected.txt: Removed. * media/track/track-cue-css.html: * media/track/track-cue-css-expected.html: * media/track/track-cue-left-align.html: * media/track/track-cue-left-align-expected-mismatch.html: * media/track/track-cue-line-position.html: * media/track/track-cue-line-position-expected-mismatch.html: * media/track/track-cue-mutable-fragment.html: * media/track/track-cue-mutable-text.html: Removed. * media/track/track-cue-mutable-text-expected.txt: Removed. * media/track/track-cue-nothing-to-render.html: Removed. * media/track/track-cue-nothing-to-render-expected.txt: Removed. * media/track/track-cue-overlap-snap-to-lines-not-set.html: Removed. * media/track/track-cue-overlap-snap-to-lines-not-set-expected.txt: Removed. * media/track/track-cue-rendering.html: Removed. * media/track/track-cue-rendering-expected.txt: Removed. * media/track/track-cue-rendering-horizontal.html: Removed. * platform/gtk/media/track/track-cue-rendering-horizontal-expected.png: Removed. * platform/gtk/media/track/track-cue-rendering-horizontal-expected.txt: Removed. * platform/ios/media/track/track-cue-rendering-horizontal-expected.txt: Removed. * platform/mac/media/track/track-cue-rendering-horizontal-expected.png: Removed. * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt: Removed. * platform/win/media/track/track-cue-rendering-horizontal-expected.txt: Removed. * platform/wincairo/media/track/track-cue-rendering-horizontal-expected.txt: Removed. * media/track/track-cue-rendering-mode-changed.html: Removed. * media/track/track-cue-rendering-mode-changed-expected.txt: Removed. * media/track/track-cue-rendering-on-resize.html: Removed. * media/track/track-cue-rendering-on-resize-expected.txt: Removed. * media/track/track-cue-rendering-rtl.html: Removed. * media/track/track-cue-rendering-rtl-expected.txt: Removed. * media/track/track-cue-rendering-snap-to-lines-not-set.html: Removed. * media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Removed. * media/track/track-cue-rendering-tree-is-removed-properly.html: Removed. * media/track/track-cue-rendering-tree-is-removed-properly-expected.txt: Removed. * media/track/track-cue-rendering-vertical.html: Removed. * platform/gtk/media/track/track-cue-rendering-vertical-expected.png: Removed. * platform/gtk/media/track/track-cue-rendering-vertical-expected.txt: Removed. * platform/ios/media/track/track-cue-rendering-vertical-expected.txt: Removed. * platform/mac/media/track/track-cue-rendering-vertical-expected.txt: Removed. * platform/wincairo/media/track/track-cue-rendering-vertical-expected.txt: Removed. * media/track/track-cue-rendering-with-padding.html: Removed. * media/track/track-cue-rendering-with-padding-expected.txt: Removed. * media/track/track-cues-cuechange.html: * media/track/track-cues-enter-exit.html: * media/track/track-forced-subtitles-in-band.html: * media/track/track-forced-subtitles-in-band-expected.txt: * media/track/track-in-band-duplicate-tracks-when-source-changes.html: * media/track/track-in-band-legacy-api.html: * media/track/track-in-band-legacy-api-expected.txt: * media/track/track-in-band-metadata-display-order.html: Removed. * media/track/track-in-band-metadata-display-order-expected.txt: Removed. * media/track/track-in-band-mode.html: * media/track/track-in-band-mode-expected.txt: * media/track/track-in-band-style.html: Removed. * media/track/track-in-band-style-expected.txt: Removed. * media/track/track-in-band-subtitles-too-large.html: Removed. * media/track/track-in-band-subtitles-too-large-expected.txt: Removed. * media/track/track-kind.html: * media/track/track-kind-expected.txt: * media/track/track-legacyapi-with-automatic-mode.html: * media/track/track-legacyapi-with-automatic-mode-expected.txt: * media/track/track-long-word-container-sizing.html: Removed. * media/track/track-long-word-container-sizing-expected.txt: Removed. * media/track/track-manual-mode.html: * media/track/track-manual-mode-expected.txt: * media/track/track-user-preferences.html: Removed. * media/track/track-user-preferences-expected.txt: Removed. * media/track/track-user-stylesheet.html: * media/track/track-user-stylesheet-expected.txt: * media/trackmenu-test.js: Removed. * media/video-click-dblckick-standalone.html: Removed. * media/video-click-dblckick-standalone-expected.txt: Removed. * media/video-controls-audiotracks-trackmenu.html: Removed. * media/video-controls-audiotracks-trackmenu-expected.txt: Removed. * media/video-controls-captions.html: Removed. * media/video-controls-captions-expected.txt: Removed. * media/video-controls-captions-trackmenu.html: Removed. * platform/gtk/media/video-controls-captions-trackmenu-expected.txt: Removed. * platform/ios/media/video-controls-captions-trackmenu-expected.txt: Removed. * platform/mac/media/video-controls-captions-trackmenu-expected.txt: Removed. * platform/wincairo/media/video-controls-captions-trackmenu-expected.txt: Removed. * media/video-controls-captions-trackmenu-hide-on-click.html: Removed. * platform/gtk/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Removed. * platform/ios/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Removed. * platform/mac/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Removed. * platform/wincairo/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Removed. * media/video-controls-captions-trackmenu-hide-on-click-outside.html: Removed. * media/video-controls-captions-trackmenu-hide-on-click-outside-expected.txt: Removed. * media/video-controls-captions-trackmenu-includes-enabled-track.html: Removed. * media/video-controls-captions-trackmenu-includes-enabled-track-expected.txt: Removed. * media/video-controls-captions-trackmenu-localized.html: Removed. * platform/gtk/media/video-controls-captions-trackmenu-localized-expected.txt: Removed. * platform/ios/media/video-controls-captions-trackmenu-localized-expected.txt: Removed. * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt: Removed. * platform/wincairo/media/video-controls-captions-trackmenu-localized-expected.txt: Removed. * media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html: Removed. * media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles-expected.txt: Removed. * platform/gtk/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles-expected.txt: Removed. * platform/mac/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles-expected.txt: Removed. * media/video-controls-captions-trackmenu-sorted.html: Removed. * platform/gtk/media/video-controls-captions-trackmenu-sorted-expected.txt: Removed. * platform/ios/media/video-controls-captions-trackmenu-sorted-expected.txt: Removed. * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: Removed. * platform/win/media/video-controls-captions-trackmenu-sorted-expected.txt: Removed. * platform/wincairo/media/video-controls-captions-trackmenu-sorted-expected.txt: Removed. * media/video-controls-drop-and-restore-timeline.html: Removed. * media/video-controls-drop-and-restore-timeline-expected.txt: Removed. * media/video-controls-fullscreen-volume.html: Removed. * media/video-controls-fullscreen-volume-expected.txt: Removed. * media/video-controls-in-media-document.html: Removed. * media/video-controls-in-media-document-expected.txt: Removed. * media/video-controls-no-display-with-text-track.html: Removed. * media/video-controls-no-display-with-text-track-expected.txt: Removed. * media/video-controls-rendering.html: Removed. * platform/gtk/media/video-controls-rendering-expected.txt: Removed. * platform/ios/media/video-controls-rendering-expected.txt: Removed. * platform/mac/media/video-controls-rendering-expected.txt: Removed. * platform/win/media/video-controls-rendering-expected.txt: Removed. * platform/wincairo/media/video-controls-rendering-expected.txt: Removed. * media/video-controls-show-on-kb-or-ax-event.html: Removed. * media/video-controls-show-on-kb-or-ax-event-expected.txt: Removed. * media/video-controls-toggling.html: Removed. * media/video-controls-toggling-expected.txt: Removed. * media/video-controls-transformed.html: Removed. * media/video-controls-transformed-expected.txt: Removed. * media/video-controls-visible-audio-only.html: Removed. * media/video-controls-visible-audio-only-expected.txt: Removed. * media/video-controls-visible-exiting-fullscreen.html: Removed. * media/video-controls-visible-exiting-fullscreen-expected.txt: Removed. * media/video-controls-zoomed.html: Removed. * media/video-controls-zoomed-expected.txt: Removed. * media/video-display-toggle.html: Removed. * platform/gtk/media/video-display-toggle-expected.txt: Removed. * platform/ios/media/video-display-toggle-expected.txt: Removed. * platform/mac-catalina/media/video-display-toggle-expected.txt: Removed. * platform/mac-mojave/media/video-display-toggle-expected.txt: Removed. * platform/mac/media/video-display-toggle-expected.txt: Removed. * platform/win/media/video-display-toggle-expected.txt: Removed. * platform/wincairo/media/video-display-toggle-expected.txt: Removed. * media/video-empty-source.html: Removed. * platform/gtk/media/video-empty-source-expected.txt: Removed. * platform/ios/media/video-empty-source-expected.txt: Removed. * platform/mac/media/video-empty-source-expected.txt: Removed. * platform/win/media/video-empty-source-expected.txt: Removed. * platform/wincairo/media/video-empty-source-expected.txt: Removed. * media/video-fullscreen-only-controls.html: Removed. * media/video-fullscreen-only-controls-expected.txt: Removed. * media/video-fullscreen-only-playback.html: * media/video-initially-hidden-volume-slider-up.html: Removed. * media/video-initially-hidden-volume-slider-up-expected.txt: Removed. * media/video-no-audio.html: Removed. * platform/gtk/media/video-no-audio-expected.txt: Removed. * platform/ios/media/video-no-audio-expected.txt: Removed. * platform/mac-catalina/media/video-no-audio-expected.txt: Removed. * platform/mac/media/video-no-audio-expected.txt: Removed. * platform/win/media/video-no-audio-expected.txt: Removed. * platform/wincairo/media/video-no-audio-expected.txt: Removed. * media/video-play-audio-require-user-gesture.html: Removed. * media/video-play-audio-require-user-gesture-expected.txt: Removed. * media/video-play-require-user-gesture.html: Removed. * media/video-play-require-user-gesture-expected.txt: Removed. * media/video-trackmenu-selection.html: Removed. * media/video-trackmenu-selection-expected.txt: Removed. * media/video-volume-slider.html: Removed. * platform/gtk/media/video-volume-slider-expected.txt: Removed. * platform/ios/media/video-volume-slider-expected.txt: Removed. * platform/mac-catalina/media/video-volume-slider-expected.txt: Removed. * platform/mac-mojave/media/video-volume-slider-expected.txt: Removed. * platform/mac/media/video-volume-slider-expected.txt: Removed. * platform/win/media/video-volume-slider-expected.txt: Removed. * platform/wincairo/media/video-volume-slider-expected.txt: Removed. * media/video-volume-slider-drag.html: Removed. * media/video-volume-slider-drag-expected.txt: Removed. * media/video-zoom-controls.html: Removed. * platform/gtk/media/video-zoom-controls-expected.txt: Removed. * platform/ios/media/video-zoom-controls-expected.txt: Removed. * platform/mac/media/video-zoom-controls-expected.txt: Removed. * platform/win/media/video-zoom-controls-expected.txt: Removed. * platform/wincairo/media/video-zoom-controls-expected.txt: Removed. * media/volume-bar-empty-when-muted.html: Removed. * media/volume-bar-empty-when-muted-expected.txt: Removed. * platform/gtk/media/volume-bar-empty-when-muted-expected.txt: Removed. * platform/mac/media/volume-bar-empty-when-muted-expected.txt: Removed. * platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html: Removed. * platform/ios/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container-expected.txt: Removed. * platform/mac/media/video-layer-crash-expected.txt: * TestExpectations: * platform/glib/TestExpectations: * platform/gtk/TestExpectations: * platform/gtk-wayland/TestExpectations: * platform/ios/TestExpectations: * platform/ios-device/TestExpectations: * platform/ios-simulator/TestExpectations: * platform/ios-wk2/TestExpectations: * platform/ipad/TestExpectations: * platform/mac/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/mac-wk2/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: * platform/wincairo-wk1/TestExpectations: * platform/wpe/TestExpectations: Canonical link: https://commits.webkit.org/235609@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 22:17:49 +00:00
#if !defined(ENABLE_MODERN_MEDIA_CONTROLS)
#define ENABLE_MODERN_MEDIA_CONTROLS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
// FIXME: We almost certainly do not need this monospace font exception for watchOS and tvOS.
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_MONOSPACE_FONT_EXCEPTION) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) || PLATFORM(WATCHOS) || PLATFORM(APPLETV))
#define ENABLE_MONOSPACE_FONT_EXCEPTION 1
#endif
#if !defined(ENABLE_MOUSE_CURSOR_SCALE) && PLATFORM(MAC)
#define ENABLE_MOUSE_CURSOR_SCALE 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_NAVIGATOR_STANDALONE) && PLATFORM(IOS_FAMILY)
#define ENABLE_NAVIGATOR_STANDALONE 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_NETSCAPE_PLUGIN_API) && PLATFORM(IOS_FAMILY)
#define ENABLE_NETSCAPE_PLUGIN_API 0
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION)
#define ENABLE_NETWORK_CACHE_SPECULATIVE_REVALIDATION 1
#endif
#if !defined(ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE)
#define ENABLE_NETWORK_CACHE_STALE_WHILE_REVALIDATE 1
#endif
Reduce memory footprint for background tabs https://bugs.webkit.org/show_bug.cgi?id=225007 Reviewed by Chris Dumez. Source/WebKit: When a WebContent process contains only non-visible pages (e.g. if it is a background tab), we should attempt to reduce our memory footprint after some time interval to help relieve system-wide memory pressure. This is enabled only on Mac because iOS already does something similar just before WebContent suspends. One exception to this is that we don't do this proactive slimming for processes that are in the back/forward cache or in the WebProcess cache. This is because dropping the memory cache in those types of processes leads to perf regressions in benchmarks that do certain types of cross-origin navigations. We'll use a separate mechanism for controlling the memory usage of those processes; our current logic keeps those processes around until we are at the warning or critical memory pressure level. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::pageDidEnterWindow): (WebKit::WebProcess::pageWillLeaveWindow): (WebKit::WebProcess::nonVisibleProcessGraphicsCleanupTimerFired): (WebKit::WebProcess::nonVisibleProcessMemoryCleanupTimerFired): (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Deleted. * WebProcess/WebProcess.h: Source/WTF: Add an option to slim background tabs by proactively calling WebCore::releaseMemory on Macs. * wtf/PlatformEnableCocoa.h: Canonical link: https://commits.webkit.org/237166@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-29 19:01:53 +00:00
#if !defined(ENABLE_NON_VISIBLE_WEBPROCESS_MEMORY_CLEANUP_TIMER) && (PLATFORM(MAC) || PLATFORM(MACCATALYST))
#define ENABLE_NON_VISIBLE_WEBPROCESS_MEMORY_CLEANUP_TIMER 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_NOTIFICATIONS) && PLATFORM(MAC)
#define ENABLE_NOTIFICATIONS 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_ORIENTATION_EVENTS) && PLATFORM(IOS_FAMILY)
#define ENABLE_ORIENTATION_EVENTS 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_OVERFLOW_SCROLLING_TOUCH) && PLATFORM(IOS_FAMILY)
#define ENABLE_OVERFLOW_SCROLLING_TOUCH 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_PAYMENT_REQUEST)
#define ENABLE_PAYMENT_REQUEST 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_PICTURE_IN_PICTURE_API) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_PICTURE_IN_PICTURE_API 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_PDFKIT_PLUGIN) && PLATFORM(MAC)
#define ENABLE_PDFKIT_PLUGIN 1
#endif
#if !defined(ENABLE_PERIODIC_MEMORY_MONITOR) && PLATFORM(MAC)
#define ENABLE_PERIODIC_MEMORY_MONITOR 1
#endif
#if !defined(ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING) && PLATFORM(MACCATALYST)
#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_POINTER_LOCK) && PLATFORM(IOS_FAMILY)
#define ENABLE_POINTER_LOCK 0
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_PREVIEW_CONVERTER) && PLATFORM(IOS)
#define ENABLE_PREVIEW_CONVERTER 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
#define ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_PUBLIC_SUFFIX_LIST)
#define ENABLE_PUBLIC_SUFFIX_LIST 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_REMOTE_INSPECTOR)
#define ENABLE_REMOTE_INSPECTOR 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_RESIZE_OBSERVER)
#define ENABLE_RESIZE_OBSERVER 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_RESOURCE_LOAD_STATISTICS)
#define ENABLE_RESOURCE_LOAD_STATISTICS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_SPEECH_SYNTHESIS) && !PLATFORM(MACCATALYST)
#define ENABLE_SPEECH_SYNTHESIS 1
We should resurrect the older patch that collects some statistics of web API calls https://bugs.webkit.org/show_bug.cgi?id=213319 Patch by Umar Iqbal <uiqbal@apple.com> on 2020-06-24 Reviewed by Brent Fulgham. Source/JavaScriptCore: + Enabled ENABLE_WEB_API_STATISTICS flag * Configurations/FeatureDefines.xcconfig: Source/WebCore: No new tests. Enabled existing tests. Enabled http/tests/webAPIStatistics that test the functionality behind WEB_API_STATISTICS flag. + Brought back WebCore::encodeHashSet(KeyedEncoder& encoder, const String& label, const String& key, const HashSet<String>& hashSet) because it was needed by WebCore::encodeFontHashSet(KeyedEncoder& encoder, const String& label, const HashSet<String>& hashSet) + Changed the type of HashCountedSet to HashSet because of earlier patch (https://bugs.webkit.org/attachment.cgi?id=363033) updated other HashCountedSet to HashSet, stating that the counted statistics were never used (see change log in the mentioned patch). + Also changed the type of topFrameRegistrableDomainsWhichAccessedWebAPIs HashSet from String to RegistrableDomain. See the earlier bug (https://bugs.webkit.org/show_bug.cgi?id=194791) that explains the switch from String to RegistrableDomain for eTLD+1's + Enabled WEB_API_STATISTICS flag in FeatureDefines.xcconfig and PlatformEnableCocoa.h + Added WTF::EnumTraits<> for OptionSet<> enum in ResourceLoadStatistics.h due to an earlier change. * loader/ResourceLoadStatistics.h: * Configurations/FeatureDefines.xcconfig: * loader/CanvasActivityRecord.h: * loader/ResourceLoadStatistics.cpp: (WebCore::encodeHashSet): (WebCore::ResourceLoadStatistics::encode const): (WebCore::decodeHashSet): (WebCore::decodeCanvasActivityRecord): (WebCore::ResourceLoadStatistics::decode): (WebCore::appendHashSet): (WebCore::ResourceLoadStatistics::toString const): Source/WebCore/PAL: + Enabled ENABLE_WEB_API_STATISTICS flag * Configurations/FeatureDefines.xcconfig: Source/WebKit: + Enabled ENABLE_WEB_API_STATISTICS flag + Removed .string() from mainFrameRegistrableDomain to append it to topFrameRegistrableDomainsWhichAccessedWebAPIs because topFrameRegistrableDomainsWhichAccessedWebAPIs is a HashSet of WebCore::RegistrableDomain * Configurations/FeatureDefines.xcconfig: * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: (WebKit::WebResourceLoadObserver::logFontLoad): (WebKit::WebResourceLoadObserver::logCanvasRead): (WebKit::WebResourceLoadObserver::logCanvasWriteOrMeasure): (WebKit::WebResourceLoadObserver::logNavigatorAPIAccessed): (WebKit::WebResourceLoadObserver::logScreenAPIAccessed): Source/WebKitLegacy/mac: + Enabled ENABLE_WEB_API_STATISTICS flag * Configurations/FeatureDefines.xcconfig: Source/WTF: + Enabled ENABLE_WEB_API_STATISTICS flag * wtf/PlatformEnableCocoa.h: Tools: + Enabled ENABLE_WEB_API_STATISTICS flag. * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: We should resurrect the older patch that collects some statistics of web API calls + Enabled web API statistics tests in ios-wk2 and mac-wk2 + Updated expectations for web API statistics and resrource load statistics tests. * http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt: * http/tests/webAPIStatistics/font-load-data-collection-expected.txt: * http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt: * http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt: * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: * http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access-expected.txt: * http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-expected.txt: * http/tests/resourceLoadStatistics/count-third-party-script-loads-expected.txt: * http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-expected.txt: * http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration-expected.txt: * http/tests/resourceLoadStatistics/log-delayed-client-side-redirects-expected.txt: * http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-link-decoration-expected.txt: * http/tests/resourceLoadStatistics/remove-website-data-for-origin-deletes-third-party-script-loads-expected.txt: * http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration-expected.txt: * http/tests/storageAccess/aggregate-sorted-data-with-storage-access-expected.txt: Canonical link: https://commits.webkit.org/226367@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-24 21:18:10 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_RESOURCE_USAGE)
#define ENABLE_RESOURCE_USAGE 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_REVEAL) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_REVEAL 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Remove all references to non-existent 10.16 https://bugs.webkit.org/show_bug.cgi?id=215202 Reviewed by Wenson Hsieh. Source/bmalloc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: Source/JavaScriptCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty: * gtest/xcode/Config/DebugProject.xcconfig: * gtest/xcode/Config/ReleaseProject.xcconfig: Source/ThirdParty/ANGLE: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/ThirdParty/libwebrtc: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h: Source/WebCore: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebCore/PAL: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebInspectorUI: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WebKit: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: * Scripts/process-entitlements.sh: * WebProcess/com.apple.WebProcess.sb.in: Source/WebKitLegacy/mac: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitTargetConditionals.xcconfig: Source/WTF: * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: * wtf/PlatformUse.h: Tools: * ContentExtensionTester/Configurations/Base.xcconfig: * ContentExtensionTester/Configurations/DebugRelease.xcconfig: * DumpRenderTree/mac/Configurations/Base.xcconfig: * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: * ImageDiff/cg/Configurations/Base.xcconfig: * ImageDiff/cg/Configurations/DebugRelease.xcconfig: * MiniBrowser/Configurations/Base.xcconfig: * MiniBrowser/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/Base.xcconfig: * TestWebKitAPI/Configurations/DebugRelease.xcconfig: * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: * TestWebKitAPI/config.h: * WebEditingTester/Configurations/Base.xcconfig: * WebEditingTester/Configurations/DebugRelease.xcconfig: * WebKitTestRunner/Configurations/Base.xcconfig: * WebKitTestRunner/Configurations/DebugRelease.xcconfig: * lldb/lldbWebKitTester/Configurations/Base.xcconfig: * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Canonical link: https://commits.webkit.org/227995@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-06 00:58:34 +00:00
#if !defined(ENABLE_ROUTING_ARBITRATION) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_ROUTING_ARBITRATION 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_RUBBER_BANDING) && PLATFORM(MAC)
#define ENABLE_RUBBER_BANDING 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SANDBOX_EXTENSIONS)
#define ENABLE_SANDBOX_EXTENSIONS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SCROLLING_THREAD) && PLATFORM(MAC)
#define ENABLE_SCROLLING_THREAD 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SEC_ITEM_SHIM)
#define ENABLE_SEC_ITEM_SHIM 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
#if !defined(ENABLE_SEPARATED_WX_HEAP) && CPU(ARM64)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_SEPARATED_WX_HEAP 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SERVER_PRECONNECT)
#define ENABLE_SERVER_PRECONNECT 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SERVICE_CONTROLS) && PLATFORM(MAC)
#define ENABLE_SERVICE_CONTROLS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SHAREABLE_RESOURCE)
#define ENABLE_SHAREABLE_RESOURCE 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_SIGILL_CRASH_ANALYZER) && !PLATFORM(MAC) && !PLATFORM(WATCHOS)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_SIGILL_CRASH_ANALYZER 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_SMOOTH_SCROLLING) && PLATFORM(MAC)
#define ENABLE_SMOOTH_SCROLLING 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
// FIXME: Should this be enabled for watchOS and tvOS?
#if !defined(ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION) && !PLATFORM(MAC) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_TELEPHONE_NUMBER_DETECTION)
#define ENABLE_TELEPHONE_NUMBER_DETECTION 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_TEXT_AUTOSIZING)
#define ENABLE_TEXT_AUTOSIZING 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_TEXT_CARET) && PLATFORM(IOS_FAMILY)
#define ENABLE_TEXT_CARET 0
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_TEXT_SELECTION) && PLATFORM(IOS_FAMILY)
#define ENABLE_TEXT_SELECTION 0
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_TOUCH_EVENTS) && PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK)
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_TOUCH_EVENTS 1
#endif
#if !defined(ENABLE_TOUCH_ACTION_REGIONS) && PLATFORM(IOS_FAMILY)
#define ENABLE_TOUCH_ACTION_REGIONS 1
#endif
Trackpad and Mouse scroll events on iPad only fire "pointermove" -- not "wheel" https://bugs.webkit.org/show_bug.cgi?id=210071 <rdar://problem/54616853> Reviewed by Simon Fraser. Source/WebCore: * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEventInternal): Fix a minor logic error when WHEEL_EVENT_LATCHING is off; allowScrolling would always be true, even if the set of processing steps does not include any scrolling steps. * rendering/EventRegion.h: (WebCore::EventRegion::encode const): (WebCore::EventRegion::decode): Encode/decode the wheel and passive wheel event regions. Source/WebKit: * Platform/spi/ios/UIKitSPI.h: Add some SPI. * Shared/ios/WebIOSEventFactory.h: * Shared/ios/WebIOSEventFactory.mm: (toWebPhase): (WebIOSEventFactory::createWebWheelEvent): Add a UIScrollEvent->WebWheelEvent conversion helper. * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/ios/WKWebViewIOS.h: * UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _setupScrollAndContentViews]): Enable async UIScrollEvent handling for WKScrollView. (-[WKWebView _scrollView:asynchronouslyHandleScrollEvent:completion:]): Adopt new UIKit SPI to asynchronously defer UIScrollEvents. We pass them to the Web Content process, where they are processed *only* for event handling, not for scrolling. If the event is not cancelable, we will synchronously reply that it was not handled; if it is cancelable, or we don't yet know if it will be, we'll wait to hear back from the Web Content process before replying. UIKit will wait until our reply to apply the UIScrollEvent to the UIScrollView. * UIProcess/PageClient.h: * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h: * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: (WebKit::eventListenerTypesAtPoint): Expose a mechanism for retrieving the event listener types at a given point, similar to the existing mechanism for touch event listeners. (-[WKChildScrollView initWithFrame:]): Enable async UIScrollEvent handling for WKChildScrollView. * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: (-[WKScrollingNodeScrollViewDelegate _scrollView:asynchronouslyHandleScrollEvent:completion:]): (WebKit::ScrollingTreeScrollingNodeDelegateIOS::handleAsynchronousCancelableScrollEvent): Plumb async scroll events for sub-scrollable regions through PageClient to WKWebView; we don't actually care which UIScrollView they're handed to, since we re-hit-test ourselves. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dispatchWheelEventWithoutScrolling): * UIProcess/WebPageProxy.h: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::handleAsynchronousCancelableScrollEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wheelEvent): (WebKit::WebPage::dispatchWheelEventWithoutScrolling): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WTF: * wtf/PlatformEnableCocoa.h: Enable wheel event regions on iOS + macCatalyst. Tools: * TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: (-[WKUIScrollEvent initWithPhase:location:delta:]): (-[WKUIScrollEvent phase]): (-[WKUIScrollEvent locationInView:]): (-[WKUIScrollEvent _adjustedAcceleratedDeltaInView:]): (TEST): * TestWebKitAPI/ios/UIKitSPI.h: Add a very simple test that directly calls the new UIScrollViewDelegate SPI and verifies that only the first event is cancelable (unless the first event is canceled, in which case all subsequent events are cancelable). Canonical link: https://commits.webkit.org/232375@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-11 22:59:22 +00:00
#if !defined(ENABLE_WHEEL_EVENT_REGIONS) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST))
Allow passive mouse wheel event listeners to not force synchronous scrolling https://bugs.webkit.org/show_bug.cgi?id=158439 <rdar://problem/28265360> Reviewed by Tim Horton. Source/WebCore: Turn on ENABLE_WHEEL_EVENT_REGIONS for macOS, and hit-test the passive and active regions in ScrollingTree::determineWheelEventProcessin() to determine whether scrolling needs to happen on the main thread, communicating via WheelEventProcessingSteps. Now that we use EventRegion to store wheel event region information, we no longer need to consult wheel event targets im ScrollingCoordinator::absoluteEventTrackingRegionsForFrame(), but the non-fast region does still contain rectangles for non-fast-scrollable overflow if async overflow scrolling is disabled. Frame::invalidateContentEventRegionsIfNeeded() needs a fix to ensure that when wheel event handlers in non-fast-scrollable subframes change we invalidate event regions. RenderLayerBacking::updateEventRegion() needs a fix so that the event region for the root (for handlers registered on the document or window) covers the entire root layer; painting code only covered the RenderView, which is too small (and root background painting is complex). Finally, when the processing steps given to EventHandler::handleWheelEvent() do not include MainThreadForScrolling, then we shouldn't scroll here. The check in EventHandler::handleWheelEvent() applies to frames, and the one in EventHandler::defaultWheelEventHandler() applies to overflow:scroll. Test: fast/scrolling/mac/slow-scrolling-overflow.html * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::defaultWheelEventHandler): * page/Frame.cpp: (WebCore::Frame::invalidateContentEventRegionsIfNeeded): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const): * page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::determineWheelEventProcessing): Source/WTF: Define ENABLE_WHEEL_EVENT_REGIONS for macOS. * wtf/PlatformEnableCocoa.h: LayoutTests: Change tests that relied on dumping the non-fast scrollable rects for wheel handlers to dump layer trees with event regions instead. They also need to wait for a rendering update, since wheel event regions are updated once per frame. slow-scrolling-overflow.html tests that an overflow:scroll that's forced into slow scrolling because of background-attachment:fixed still scrolls. * fast/scrolling/mac/slow-scrolling-overflow-expected.txt: Added. * fast/scrolling/mac/slow-scrolling-overflow.html: Added. * fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll-clipped-out-expected.txt: * fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll-expected.txt: * platform/mac-wk2/TestExpectations: * tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html: * tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt: * tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html: * tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe-expected.txt: * tiled-drawing/scrolling/non-fast-region/non-fast-scrollable-region-hide-show-iframe.html: * tiled-drawing/scrolling/non-fast-region/resources/wheel-handler-region-helper.js: (nonFastScrollableRects): (dumpNonFastScrollableRects): (async dumpRegionAndNotifyDone): (rectsAsString): Deleted. (dumpRegion): Deleted. * tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt: * tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt: * tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html: * tiled-drawing/scrolling/non-fast-region/top-content-inset.html: * tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-in-overflow-scroll.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html: * tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt: * tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html: Canonical link: https://commits.webkit.org/230457@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-14 18:06:37 +00:00
#define ENABLE_WHEEL_EVENT_REGIONS 1
#endif
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#if !defined(ENABLE_UI_SIDE_COMPOSITING)
#define ENABLE_UI_SIDE_COMPOSITING 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_USER_MESSAGE_HANDLERS)
#define ENABLE_USER_MESSAGE_HANDLERS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_VARIATION_FONTS)
#define ENABLE_VARIATION_FONTS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_VIDEO)
#define ENABLE_VIDEO 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_VIDEO_PRESENTATION_MODE) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(APPLETV)
#define ENABLE_VIDEO_PRESENTATION_MODE 1
#endif
#if !defined(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) && (PLATFORM(MAC) || HAVE(UIKIT_WEBKIT_INTERNALS))
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
#if !defined(ENABLE_HOVER_GESTURE_RECOGNIZER) && HAVE(UIKIT_WEBKIT_INTERNALS)
#define ENABLE_HOVER_GESTURE_RECOGNIZER 1
#endif
#if !defined(ENABLE_VP9) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || PLATFORM(IOS) || PLATFORM(IOS_SIMULATOR))
#define ENABLE_VP9 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS)
#define ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS 1
Start splitting platform specific overrides of default enable behavior into their own files https://bugs.webkit.org/show_bug.cgi?id=207105 Patch by Sam Weinig <weinig@apple.com> on 2020-02-03 Reviewed by Dean Jackson. Source/WebKit: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Switch to using the ENABLE() helper macro to correctly guard against the case that ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC is defined and equal to 0. Source/WTF: Splits out platform specific overrides of default enable behavior into separate files, starting with one for all of the Cocoa related ports, one for Apple's Windows port, and one for the WinCario port. The rule is now that all ENABLE_* macros should have a default defined in PlatformEnable.h, but platforms are allowed to override it via their PlatformEnable*.h file. For now, I manually ensured that all the defines in PlatformEnableCocoa.h, PlatformEnableWinApple.h and PlatformEnableWinCairo.h also had defaults in PlatformEnable.h, but going forward this needs be validated either through some sort of macro-based validation, through the style checker or something else. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinApple.h: Copied from Source/WTF/wtf/PlatformEnable.h. * wtf/PlatformEnableWinCairo.h: Copied from Source/WTF/wtf/PlatformEnable.h. Canonical link: https://commits.webkit.org/220130@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-03 19:29:22 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS) && PLATFORM(MAC)
#define ENABLE_WEBDRIVER_MOUSE_INTERACTIONS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEBGL)
#define ENABLE_WEBGL 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEBGL2)
#define ENABLE_WEBGL2 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEBPROCESS_NSRUNLOOP) && PLATFORM(MAC)
#define ENABLE_WEBPROCESS_NSRUNLOOP 1
#endif
[WebXR] Allow WebXR to be tested on PLATFORM(COCOA) https://bugs.webkit.org/show_bug.cgi?id=225578 <rdar://problem/77707283> Reviewed by Sam Weinig. LayoutTests/imported/w3c: New expected results. * web-platform-tests/webxr/exclusive_requestFrame_nolayer.https-expected.txt: Added. * web-platform-tests/webxr/render_state_vertical_fov_inline.https-expected.txt: Added. * web-platform-tests/webxr/webxr-supported-by-feature-policy-expected.txt: Added. * web-platform-tests/webxr/webxr_availability.http.sub-expected.txt: Added. * web-platform-tests/webxr/webxr_feature_policy.https-expected.txt: Added. * web-platform-tests/webxr/xrFrame_lifetime.https-expected.txt: Added. * web-platform-tests/webxr/xrPose_transform_sameObject.https-expected.txt: Added. * web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt: Added. * web-platform-tests/webxr/xrSession_input_events_end.https-expected.txt: Added. * web-platform-tests/webxr/xrSession_visibilityState.https-expected.txt: Added. * web-platform-tests/webxr/xrStationaryReferenceSpace_floorlevel_updates.https-expected.txt: Added. * web-platform-tests/webxr/xrWebGLLayer_framebuffer_scale.https-expected.txt: Added. * web-platform-tests/webxr/xrWebGLLayer_opaque_framebuffer_stencil.https-expected.txt: Added. Source/WebKit: Remove checking for a WebXR feature flag. * Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultWebXREnabled): Source/WTF: Compile-time enabled on all Cocoa platforms. * wtf/PlatformEnableCocoa.h: LayoutTests: Remove the skip rule for the WebXR directory, and add more specific expected results. * TestExpectations: Canonical link: https://commits.webkit.org/237709@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-14 00:35:23 +00:00
#if !defined(ENABLE_WEBXR)
#define ENABLE_WEBXR 1
#endif
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_WEB_API_STATISTICS)
#define ENABLE_WEB_API_STATISTICS 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEB_ARCHIVE)
#define ENABLE_WEB_ARCHIVE 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEB_AUDIO)
#define ENABLE_WEB_AUDIO 1
#endif
[Cocoa] Fix launch time regression with CF prefs direct mode enabled https://bugs.webkit.org/show_bug.cgi?id=209244 Source/WebKit: <rdar://problem/60542149> Reviewed by Darin Adler. When CF prefs direct mode was enabled in https://trac.webkit.org/changeset/258064/webkit, it introduced a significant launch time regression. This patch addresses this regression. The number of observed domains is reduced and domain observation is initiated later when Safari is first activated. Swizzling code is removed, since that has a performance cost in the Objective-C runtime. Normal priority instead of QOS_CLASS_BACKGROUND is used in the thread which starts the observing, since using a background priority class can lead to priority inversion. Finally, a dictionary comparison is removed when a notification about a preference change is received, since this check is redundant and doubles the cost of this method. * UIProcess/Cocoa/PreferenceObserver.mm: (-[WKPreferenceObserver init]): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::registerNotificationObservers): (WebKit::WebProcessPool::unregisterNotificationObservers): * UIProcess/WebProcessPool.h: Source/WTF: Reviewed by Darin Adler. Re-enable CF prefs direct mode. * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Tools: Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: (TEST): (sharedInstanceMethodOverride): Canonical link: https://commits.webkit.org/222436@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-24 22:41:13 +00:00
[Cocoa] Add almost everything from FeatureDefines.xcconfig to PlatformEnableCocoa.h https://bugs.webkit.org/show_bug.cgi?id=213964 Reviewed by Sam Weinig. Added logic that matches what FeatureDefines.xcconfig does for everything except for ENABLE_EXPERIMENTAL_FEATURES. Changed format so we mostly list platforms where we do not want to enable a certain feature; also order it pretty consistently macOS, iOS, Mac Catalyst, watchOS, then tvOS. This format highlights possible mistakes when not enabling a feature on some platforms in an easier to understand way. * wtf/PlatformEnableCocoa.h: (ENABLE_AIRPLAY_PICKER): List platforms that do *not* enable this. (ENABLE_APPLE_PAY): All except Mac Catalyst, watchOS, tvOS. Not sure why disabled in Mac Catalyst, but replicates FeatureDefines.xcconfig. (ENABLE_APPLE_PAY_REMOTE_UI): List platforms that do *not* enable this. (ENABLE_AUTOCAPITALIZE): List platforms that do *not* enable this. (ENABLE_AUTOCORRECT): List platforms that do *not* enable this. (ENABLE_CONTENT_FILTERING): All except older watchOS simulator and tvOS. (ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER): Re-sorted this. (ENABLE_CSS_CONIC_GRADIENTS): All except older macOS and tvOS. The tvOS exception seems questionable, so added a FIXME. (ENABLE_DARK_MODE_CSS): All except watchOS and tvOS. (ENABLE_DATA_INTERACTION): All except macOS, watchOS, and tvOS. (ENABLE_DATA_DETECTION): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_EDITABLE_REGION): Only iOS. (ENABLE_ENCRYPTED_MEDIA): All except older macOS and Mac Catalyst. (ENABLE_FULLSCREEN_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_FULL_KEYBOARD_ACCESS): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_GAMEPAD): All except watchOS. (ENABLE_INPUT_TYPE_DATE): All except macOS, Mac Catalyst, and tvOS. (ENABLE_INPUT_TYPE_DATETIMELOCAL): Ditto. (ENABLE_INPUT_TYPE_MONTH): Ditto. (ENABLE_INPUT_TYPE_TIME): Ditto. (ENABLE_INPUT_TYPE_WEEK): Ditto. (ENABLE_MEDIA_CAPTURE): All except macOS. (ENABLE_MEDIA_SOURCE): All except Mac Catalyst, watchOS, tvOS, and all simulators. (ENABLE_MEDIA_STREAM): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_NAVIGATOR_STANDALONE): All iOS family. (Considered writing as all except macOS, but left like this to match some .cpp code for now.) (ENABLE_OVERFLOW_SCROLLING_TOUCH): All iOS family. (ENABLE_PICTURE_IN_PICTURE_API): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_SPEECH_SYNTHESIS): All except Mac Catalyst. (ENABLE_REVEAL): All except older macOS, watchOS, and tvOS. (ENABLE_SIGILL_CRASH_ANALYZER): All except macOS and watchOS. (ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION): All except macOS, watchOS, and tvOS. (ENABLE_VIDEO_PRESENTATION_MODE): All except simulators and tvOS. (ENABLE_WEBGPU): All except older macOS, Mac Catalyst, and simulators. (ENABLE_WEB_API_STATISTICS): Re-sorted this. (ENABLE_WEB_AUTHN): All except Mac Catalyst, watchOS, and tvOS. (ENABLE_WEB_RTC): All except Mac Catalyst, watchOS, and tvOS. Canonical link: https://commits.webkit.org/226772@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-05 01:54:13 +00:00
#if !defined(ENABLE_WEB_AUTHN) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_WEB_AUTHN 1
#endif
#if !defined(ENABLE_WEB_RTC) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_WEB_RTC 1
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEB_CRYPTO)
#define ENABLE_WEB_CRYPTO 1
[Cocoa] Fix launch time regression with CF prefs direct mode enabled https://bugs.webkit.org/show_bug.cgi?id=209244 Source/WebKit: <rdar://problem/60542149> Reviewed by Darin Adler. When CF prefs direct mode was enabled in https://trac.webkit.org/changeset/258064/webkit, it introduced a significant launch time regression. This patch addresses this regression. The number of observed domains is reduced and domain observation is initiated later when Safari is first activated. Swizzling code is removed, since that has a performance cost in the Objective-C runtime. Normal priority instead of QOS_CLASS_BACKGROUND is used in the thread which starts the observing, since using a background priority class can lead to priority inversion. Finally, a dictionary comparison is removed when a notification about a preference change is received, since this check is redundant and doubles the cost of this method. * UIProcess/Cocoa/PreferenceObserver.mm: (-[WKPreferenceObserver init]): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::registerNotificationObservers): (WebKit::WebProcessPool::unregisterNotificationObservers): * UIProcess/WebProcessPool.h: Source/WTF: Reviewed by Darin Adler. Re-enable CF prefs direct mode. * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: Tools: Reviewed by Darin Adler. * TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: (TEST): (sharedInstanceMethodOverride): Canonical link: https://commits.webkit.org/222436@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-24 22:41:13 +00:00
#endif
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER) && PLATFORM(MAC)
#define ENABLE_WEB_PLAYBACK_CONTROLS_MANAGER 1
#endif
Adopt interface AVAudioRoutingArbiter for Mac https://bugs.webkit.org/show_bug.cgi?id=210167 Source/WebCore: Reviewed by Eric Carlson. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::setCategory): (WebCore::categoryName): Deleted. * platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp. (WebCore::AudioSession::setCategory): (WebCore::AudioSession::categoryOverride const): (WebCore::AudioSession::setCategoryOverride): Fix unified build failures. * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Source/WebCore/PAL: Reviewed by Eric Carlson. Add softlink for AVAudioRoutingArbiter. * pal/cocoa/AVFoundationSoftLink.h: * pal/cocoa/AVFoundationSoftLink.mm: Source/WebKit: <rdar://problem/59113994> Reviewed by Eric Carlson. Add a new cross-process object pair, AudioSessionRouterAbitrator/Proxy which passes routing arbitration commands from WebContent -> UIProcess. Because the UIProcess can represent multiple WebContent processes, it must track all outstanding arbitration requests globally. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * Sources.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::mediaRelatedMachServices): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: Added. (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: Added. (WebKit::AudioSessionRoutingArbitratorProxy::category const): (WebKit::AudioSessionRoutingArbitratorProxy::destinationId): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in: Added. * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: Added. (WebKit::SharedArbitrator::sharedInstance): (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): (WebKit::SharedArbitrator::leaveRoutingArbitrationForArbitrator): (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_processDisplayName): * WebProcess/WebProcess.cpp: * WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp: Added. (WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator): (WebKit::AudioSessionRoutingArbitrator::supplementName): (WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitrator::leaveRoutingAbritration): * WebProcess/cocoa/AudioSessionRoutingArbitrator.h: Added. * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): * WebProcess/com.apple.WebProcess.sb.in: Source/WTF: Reviewed by Eric Carlson. Add macro HAVE_AVAUDIO_ROUTING_ARBITER. * wtf/PlatformHave.h: Tools: Reviewed by Eric Carlson. Add test for softlink of AVAudioRoutingArbiter. * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/223396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-14 22:35:47 +00:00
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#if !defined(ENABLE_WIRELESS_PLAYBACK_TARGET)
#define ENABLE_WIRELESS_PLAYBACK_TARGET 1
Adopt interface AVAudioRoutingArbiter for Mac https://bugs.webkit.org/show_bug.cgi?id=210167 Source/WebCore: Reviewed by Eric Carlson. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::setCategory): (WebCore::categoryName): Deleted. * platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp. (WebCore::AudioSession::setCategory): (WebCore::AudioSession::categoryOverride const): (WebCore::AudioSession::setCategoryOverride): Fix unified build failures. * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Source/WebCore/PAL: Reviewed by Eric Carlson. Add softlink for AVAudioRoutingArbiter. * pal/cocoa/AVFoundationSoftLink.h: * pal/cocoa/AVFoundationSoftLink.mm: Source/WebKit: <rdar://problem/59113994> Reviewed by Eric Carlson. Add a new cross-process object pair, AudioSessionRouterAbitrator/Proxy which passes routing arbitration commands from WebContent -> UIProcess. Because the UIProcess can represent multiple WebContent processes, it must track all outstanding arbitration requests globally. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * Sources.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::mediaRelatedMachServices): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: Added. (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: Added. (WebKit::AudioSessionRoutingArbitratorProxy::category const): (WebKit::AudioSessionRoutingArbitratorProxy::destinationId): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in: Added. * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: Added. (WebKit::SharedArbitrator::sharedInstance): (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): (WebKit::SharedArbitrator::leaveRoutingArbitrationForArbitrator): (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_processDisplayName): * WebProcess/WebProcess.cpp: * WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp: Added. (WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator): (WebKit::AudioSessionRoutingArbitrator::supplementName): (WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitrator::leaveRoutingAbritration): * WebProcess/cocoa/AudioSessionRoutingArbitrator.h: Added. * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): * WebProcess/com.apple.WebProcess.sb.in: Source/WTF: Reviewed by Eric Carlson. Add macro HAVE_AVAUDIO_ROUTING_ARBITER. * wtf/PlatformHave.h: Tools: Reviewed by Eric Carlson. Add test for softlink of AVAudioRoutingArbiter. * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/223396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-14 22:35:47 +00:00
#endif
[macOS] Update ScreenTime as playback state changes https://bugs.webkit.org/show_bug.cgi?id=210518 <rdar://problem/61181092> Reviewed by Jer Noble. Source/WebCore: Test: media/media-usage-state.html Pass media element state to the UI process whenever it changes. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::MediaElementSession): (WebCore::MediaElementSession::~MediaElementSession): (WebCore::MediaElementSession::updateMediaUsageIfChanged): * html/MediaElementSession.h: * page/ChromeClient.h: (WebCore::ChromeClient::addMediaUsageManagerSession): (WebCore::ChromeClient::updateMediaUsageManagerSessionState): (WebCore::ChromeClient::removeMediaUsageManagerSession): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::PlatformMediaSession): * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::updateMediaUsageIfChanged): (WebCore::PlatformMediaSession::mediaSessionIdentifier const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): * platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::scheduleUpdateSessionStatus): (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing): (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::scheduleUpdateSessionStatus): (WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback): (WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerCocoa::removeSession): (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): (WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged): (WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged): (WebCore::MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): * platform/graphics/MediaUsageInfo.h: Added. (WebCore::MediaUsageInfo::operator== const): (WebCore::MediaUsageInfo::operator!= const): (WebCore::MediaUsageInfo::encode const): (WebCore::MediaUsageInfo::decode): * testing/Internals.cpp: (WebCore::Internals::setMediaElementRestrictions): (WebCore::Internals::mediaUsageState const): * testing/Internals.h: * testing/Internals.idl: Source/WebCore/PAL: Soft link the UsageTracking framework. * PAL.xcodeproj/project.pbxproj: * pal/cocoa/UsageTrackingSoftLink.h: Added. * pal/cocoa/UsageTrackingSoftLink.mm: Added. Source/WebKit: Add a manager that gets media element state changes, and a Cocoa-specific implementation that passes that state to ScreenTime. * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::mediaUsageManager): (WebKit::WebPageProxy::addMediaUsageManagerSession): (WebKit::WebPageProxy::updateMediaUsageManagerSessionState): (WebKit::WebPageProxy::removeMediaUsageManagerSession): * UIProcess/Media/MediaUsageManager.cpp: Added. (WebKit::MediaUsageManager::create): (WebKit::reset): (WebKit::MediaUsageManager::addMediaSession): (WebKit::MediaUsageManager::removeMediaSession): (WebKit::MediaUsageManager::updateMediaUsage): * UIProcess/Media/MediaUsageManager.h: Added. * UIProcess/Media/cocoa/MediaUsageManagerCocoa.h: Added. (WebKit::MediaUsageManagerCocoa::SessionMediaUsage::SessionMediaUsage): * UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: Added. (WebKit::usageTrackingAvailable): (WebKit::MediaUsageManager::create): (WebKit::MediaUsageManagerCocoa::~MediaUsageManagerCocoa): (WebKit::MediaUsageManagerCocoa::reset): (WebKit::MediaUsageManagerCocoa::addMediaSession): (WebKit::MediaUsageManagerCocoa::removeMediaSession): (WebKit::MediaUsageManagerCocoa::updateMediaUsage): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMediaUsageManagerSession): (WebKit::WebChromeClient::updateMediaUsageManagerSessionState): (WebKit::WebChromeClient::removeMediaUsageManagerSession): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addMediaUsageManagerSession): (WebKit::WebPage::updateMediaUsageManagerSessionState): (WebKit::WebPage::removeMediaUsageManagerSession): * WebProcess/WebPage/WebPage.h: Source/WTF: Define HAVE_MEDIA_USAGE_FRAMEWORK and ENABLE_MEDIA_USAGE * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: LayoutTests: * media/media-usage-state-expected.txt: Added. * media/media-usage-state.html: Added. * platform/gtk/TestExpectations: Skip new test. * platform/win/TestExpectations: Ditto. * platform/wpe/TestExpectations: Ditto. Canonical link: https://commits.webkit.org/223468@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-16 13:36:07 +00:00
#if !defined(ENABLE_WKPDFVIEW) && (PLATFORM(IOS) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000))
Sort PlatformEnableCocoa.h and add definitions for the simple cases from FeatureDefines.xcconfig https://bugs.webkit.org/show_bug.cgi?id=212389 Reviewed by Anders Carlsson. Added more PlatformEnableCocoa.h; allowing us to later remove things from FeatureDefines.xcconfig (patch forthcoming). * wtf/PlatformEnableCocoa.h: Added definitions from FeatureDefines.xcconfig that were simple, and that differ from the defaults in PlatformEnable.h. That includes 3D_TRANSFORMS, ACCESSIBILITY_ISOLATED_TREE (macOS >= 10.6), APPLICATION_MANIFEST, ASYNC_SCROLLING, ATTACHMENT_ELEMENT, AVF_CAPTIONS, CACHE_PARTITIONING, CSS_COMPOSITING, CSS_PAINTING_API, CSS_SCROLL_SNAP, CSS_SELECTORS_LEVEL4, CSS_TRAILING_WORD, CSS_TYPED_OM, DATACUE_VALUE, DATALIST_ELEMENT, FILTERS_LEVEL_2, GPU_PROCESS, INDEXED_DATABASE, INDEXED_DATABASE_IN_WORKERS, INSPECTOR_TELEMETRY, INTERSECTION_OBSERVER, LAYOUT_FORMATTING_CONTEXT, LEGACY_CSS_VENDOR_PREFIXES, LEGACY_CUSTOM_PROTOCOL_MANAGER, MEDIA_CONTROLS_SCRIPT, MEMORY_SAMPLER, MOUSE_CURSOR_SCALE (macOS), NETWORK_CACHE_SPECULATIVE_REVALIDATION, NETWORK_CACHE_STALE_WHILE_REVALIDATE, NOTIFICATIONS (macOS), PDFKIT_PLUGIN (macOS), PERIODIC_MEMORY_MONITOR (macOS), PUBLIC_SUFFIX_LIST, RESIZE_OBSERVER, RESOURCE_LOAD_STATISTICS, RUBBER_BANDING (macOS), SANDBOX_EXTENSIONS, SERVER_PRECONNECT, SERVICE_CONTROLS (macOS), SHAREABLE_RESOURCE, TELEPHONE_NUMBER_DETECTION, TEXT_AUTOSIZING, USERSELECT_ALL, USER_MESSAGE_HANDLERS, VARIATION_FONTS, VIDEO, VIDEO_USES_ELEMENT_FULLSCREEN (macOS), WEBDRIVER_KEYBOARD_INTERACTIONS, WEBDRIVER_MOUSE_INTERACTIONS (macOS), WEBGL, WEBGL2, WEB_AUDIO, WEB_CRYPTO, and WIRELESS_PLAYBACK_TARGET. Sorted and merged all the existing settings. Canonical link: https://commits.webkit.org/225259@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-27 17:22:31 +00:00
#define ENABLE_WKPDFVIEW 1
[macOS] Update ScreenTime as playback state changes https://bugs.webkit.org/show_bug.cgi?id=210518 <rdar://problem/61181092> Reviewed by Jer Noble. Source/WebCore: Test: media/media-usage-state.html Pass media element state to the UI process whenever it changes. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::MediaElementSession): (WebCore::MediaElementSession::~MediaElementSession): (WebCore::MediaElementSession::updateMediaUsageIfChanged): * html/MediaElementSession.h: * page/ChromeClient.h: (WebCore::ChromeClient::addMediaUsageManagerSession): (WebCore::ChromeClient::updateMediaUsageManagerSessionState): (WebCore::ChromeClient::removeMediaUsageManagerSession): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::PlatformMediaSession): * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::updateMediaUsageIfChanged): (WebCore::PlatformMediaSession::mediaSessionIdentifier const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): * platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::scheduleUpdateSessionStatus): (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing): (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::scheduleUpdateSessionStatus): (WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback): (WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerCocoa::removeSession): (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): (WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged): (WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged): (WebCore::MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): * platform/graphics/MediaUsageInfo.h: Added. (WebCore::MediaUsageInfo::operator== const): (WebCore::MediaUsageInfo::operator!= const): (WebCore::MediaUsageInfo::encode const): (WebCore::MediaUsageInfo::decode): * testing/Internals.cpp: (WebCore::Internals::setMediaElementRestrictions): (WebCore::Internals::mediaUsageState const): * testing/Internals.h: * testing/Internals.idl: Source/WebCore/PAL: Soft link the UsageTracking framework. * PAL.xcodeproj/project.pbxproj: * pal/cocoa/UsageTrackingSoftLink.h: Added. * pal/cocoa/UsageTrackingSoftLink.mm: Added. Source/WebKit: Add a manager that gets media element state changes, and a Cocoa-specific implementation that passes that state to ScreenTime. * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::mediaUsageManager): (WebKit::WebPageProxy::addMediaUsageManagerSession): (WebKit::WebPageProxy::updateMediaUsageManagerSessionState): (WebKit::WebPageProxy::removeMediaUsageManagerSession): * UIProcess/Media/MediaUsageManager.cpp: Added. (WebKit::MediaUsageManager::create): (WebKit::reset): (WebKit::MediaUsageManager::addMediaSession): (WebKit::MediaUsageManager::removeMediaSession): (WebKit::MediaUsageManager::updateMediaUsage): * UIProcess/Media/MediaUsageManager.h: Added. * UIProcess/Media/cocoa/MediaUsageManagerCocoa.h: Added. (WebKit::MediaUsageManagerCocoa::SessionMediaUsage::SessionMediaUsage): * UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: Added. (WebKit::usageTrackingAvailable): (WebKit::MediaUsageManager::create): (WebKit::MediaUsageManagerCocoa::~MediaUsageManagerCocoa): (WebKit::MediaUsageManagerCocoa::reset): (WebKit::MediaUsageManagerCocoa::addMediaSession): (WebKit::MediaUsageManagerCocoa::removeMediaSession): (WebKit::MediaUsageManagerCocoa::updateMediaUsage): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMediaUsageManagerSession): (WebKit::WebChromeClient::updateMediaUsageManagerSessionState): (WebKit::WebChromeClient::removeMediaUsageManagerSession): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addMediaUsageManagerSession): (WebKit::WebPage::updateMediaUsageManagerSessionState): (WebKit::WebPage::removeMediaUsageManagerSession): * WebProcess/WebPage/WebPage.h: Source/WTF: Define HAVE_MEDIA_USAGE_FRAMEWORK and ENABLE_MEDIA_USAGE * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: LayoutTests: * media/media-usage-state-expected.txt: Added. * media/media-usage-state.html: Added. * platform/gtk/TestExpectations: Skip new test. * platform/win/TestExpectations: Ditto. * platform/wpe/TestExpectations: Ditto. Canonical link: https://commits.webkit.org/223468@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-16 13:36:07 +00:00
#endif
#if !defined(ENABLE_VORBIS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
#define ENABLE_VORBIS 1
#endif
2021-01-27 18:36:53 +00:00
#if !defined(ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
#define ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS 1
#endif
[Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER) https://bugs.webkit.org/show_bug.cgi?id=220374 <rdar://problem/72600426> Reviewed by Eric Carlson. Source/WebCore: * page/RuntimeEnabledFeatures.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::webMFormatReaderEnabled): (WebCore::PlatformMediaSessionManager::setWebMFormatReaderEnabled): * platform/audio/PlatformMediaSessionManager.h: * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType): (WebCore::AVAssetMIMETypeCache::initializeCache): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::registerFormatReaderIfNecessary): (WebCore::willUseWebMFormatReaderForType): * platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::canLoadFormatReader): Source/WebKit: * Shared/API/c/mac/WKFormatReader.cpp: (WKFormatReaderCreate): (WKFormatReaderStartOnMainThread): * Shared/WebPreferencesDefaultValues.cpp: * Shared/WebPreferencesDefaultValues.h: * Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp: * Shared/mac/MediaFormatReader/CoreMediaWrapped.h: * Shared/mac/MediaFormatReader/FormatReader.cpp: * Shared/mac/MediaFormatReader/FormatReader.h: * Shared/mac/MediaFormatReader/SampleCursor.cpp: * Shared/mac/MediaFormatReader/SampleCursor.h: * Shared/mac/MediaFormatReader/TrackReader.cpp: * Shared/mac/MediaFormatReader/TrackReader.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Source/WTF: * Scripts/Preferences/WebPreferencesExperimental.yaml: * wtf/PlatformEnableCocoa.h: Canonical link: https://commits.webkit.org/232810@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-06 22:36:06 +00:00
#if !defined(ENABLE_WEBM_FORMAT_READER) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
#define ENABLE_WEBM_FORMAT_READER 1
#endif
[Mac] Add Experimental Opus Codec support https://bugs.webkit.org/show_bug.cgi?id=221745 Reviewed by Eric Carlson. Source/ThirdParty/libwebrtc: Copy libopus headers into the libwebrtc header directory. * libwebrtc.xcodeproj/project.pbxproj: Source/WebCore: Add support for the Opus Codec in a WebM container by parsing the Opus private codec data into a CoreAudio-specific magic cookie, and using that cookie to initialize an AudioFormatDescription necessary to instantiate the CoreAudio Opus decoder. This magic cookie requires information both from the private codec data, but also requires information parsed directly from the stream itself; update the createOpusAudioFormatDescription() to take frame data as well as cookie data. * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::opusDecoderEnabled): (WebCore::PlatformMediaSessionManager::setOpusDecoderEnabled): * platform/audio/PlatformMediaSessionManager.h: * platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::SourceBufferParserWebM::AudioTrackData::consumeFrameData): * platform/graphics/cocoa/WebMAudioUtilitiesCocoa.h: * platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm: (WebCore::createAudioFormatDescriptionForFormat): (WebCore::opusConfigToFrameDuration): (WebCore::opusConfigToBandwidth): (WebCore::cookieFromOpusCodecPrivate): (WebCore::isOpusDecoderAvailable): (WebCore::createOpusAudioFormatDescription): (WebCore::createVorbisAudioFormatDescription): Source/WebKit: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Source/WTF: Add a new experimental feature setting, disabled by default, controlling whether to enable parsing of Opus tracks from WebM files. * Scripts/Preferences/WebPreferencesExperimental.yaml: * wtf/PlatformEnableCocoa.h: Canonical link: https://commits.webkit.org/233996@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-12 00:08:36 +00:00
#if !defined(ENABLE_OPUS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
#define ENABLE_OPUS 1
#endif
#if !defined(ENABLE_CSS_TRANSFORM_STYLE_OPTIMIZED_3D) && HAVE(UIKIT_WEBKIT_INTERNALS)
#define ENABLE_CSS_TRANSFORM_STYLE_OPTIMIZED_3D 1
#endif
#if !defined(ENABLE_SEPARATED_MODEL) && HAVE(UIKIT_WEBKIT_INTERNALS) && HAVE(CORE_ANIMATION_SEPARATED_LAYERS)
#define ENABLE_SEPARATED_MODEL 1
#endif
#if !defined(ENABLE_NOTIFY_FILTERING) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
#define ENABLE_NOTIFY_FILTERING 1
#endif
#if !defined(ENABLE_APP_PRIVACY_REPORT) && PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
#define ENABLE_APP_PRIVACY_REPORT 1
#endif
Make destination color space enumeration match supported destination color spaces for the port https://bugs.webkit.org/show_bug.cgi?id=225237 Reviewed by Simon Fraser. Add ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB and enabled it for all ports except the Apple Windows port, which is the only one doesn't have any support for it. Source/WebCore: Removes existing behavior of returning SRGB when LinearSRGB was requested in the Apple Windows port. Now, the callers are responisble for dealing with a ports lack of support of LinearSRGB, making it very clear at those call sites that something is different and wrong. * platform/graphics/Color.cpp: * platform/graphics/Color.h: * platform/graphics/ColorConversion.cpp: * platform/graphics/ColorConversion.h: Add new functions to perform color conversion to and from an color space denoted by the ColorSpace or DestinationColorSpace enum. Previously, we only had convient ways to convert if the color was strongly typed (and this is implemented using that mechanism). This is useful when converting for final ouput, such in as the caller in FELighting::drawLighting. * platform/graphics/cg/ColorSpaceCG.h: * platform/graphics/ColorSpace.cpp: * platform/graphics/ColorSpace.h: * platform/graphics/filters/FELighting.cpp: * platform/graphics/filters/FilterEffect.h: * rendering/CSSFilter.cpp: * rendering/svg/RenderSVGResourceFilter.cpp: * rendering/svg/RenderSVGResourceMasker.cpp: Wrap uses of DestinationColorSpace::LinearSRGB in ENABLE(DESTINATION_COLOR_SPACE_LINEAR_SRGB). Source/WTF: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: * wtf/PlatformEnableWinApple.h: Canonical link: https://commits.webkit.org/237221@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-01 18:06:08 +00:00
#if !defined(ENABLE_DESTINATION_COLOR_SPACE_DISPLAY_P3)
#define ENABLE_DESTINATION_COLOR_SPACE_DISPLAY_P3 1
#endif
Make destination color space enumeration match supported destination color spaces for the port https://bugs.webkit.org/show_bug.cgi?id=225237 Reviewed by Simon Fraser. Add ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB and enabled it for all ports except the Apple Windows port, which is the only one doesn't have any support for it. Source/WebCore: Removes existing behavior of returning SRGB when LinearSRGB was requested in the Apple Windows port. Now, the callers are responisble for dealing with a ports lack of support of LinearSRGB, making it very clear at those call sites that something is different and wrong. * platform/graphics/Color.cpp: * platform/graphics/Color.h: * platform/graphics/ColorConversion.cpp: * platform/graphics/ColorConversion.h: Add new functions to perform color conversion to and from an color space denoted by the ColorSpace or DestinationColorSpace enum. Previously, we only had convient ways to convert if the color was strongly typed (and this is implemented using that mechanism). This is useful when converting for final ouput, such in as the caller in FELighting::drawLighting. * platform/graphics/cg/ColorSpaceCG.h: * platform/graphics/ColorSpace.cpp: * platform/graphics/ColorSpace.h: * platform/graphics/filters/FELighting.cpp: * platform/graphics/filters/FilterEffect.h: * rendering/CSSFilter.cpp: * rendering/svg/RenderSVGResourceFilter.cpp: * rendering/svg/RenderSVGResourceMasker.cpp: Wrap uses of DestinationColorSpace::LinearSRGB in ENABLE(DESTINATION_COLOR_SPACE_LINEAR_SRGB). Source/WTF: * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: * wtf/PlatformEnableWinApple.h: Canonical link: https://commits.webkit.org/237221@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-01 18:06:08 +00:00
#if !defined(ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB)
#define ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB 1
#endif
Upstream WebKit support for Live Text https://bugs.webkit.org/show_bug.cgi?id=226706 <rdar://problem/78933684> Reviewed by Tim Horton. Source/WebCore: Upstream WebKit support for the family of "live text" and visual intelligence features from WebKitAdditions. This encompasses the following features on macOS 12 and iOS 15: - Text selection and interaction in images. - Data detectors in images. - Visual search (Look Up) via context menu in images. To do this, we rename the IMAGE_EXTRACTION feature flag (and any other similar symbol names that reference "image extraction" in some capacity) to their real names in macOS and iOS: - "Text recognition", in code that supports automatic OCR and data detectors in images. - "Look Up", in code that references the context menu action to invoke visual search. - "Visual Search", in code that manages QuickLook integration for invoking visual search. - "Image analysis", in code that directly integrates with VKImageAnalyzer and VKImageAnalyzerRequest. Tests: fast/images/text-recognition/basic-image-overlay.html fast/images/text-recognition/click-link-with-image-overlay.html fast/images/text-recognition/image-overlay-creation-is-idempotent.html fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html fast/images/text-recognition/image-overlay-with-selection-styles.html fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html fast/images/text-recognition/ios/reselect-word-in-image-overlay.html fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html fast/images/text-recognition/ios/select-word-in-image-overlay.html fast/images/text-recognition/ios/selection-rects-in-image-overlay.html fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html * WebCore.xcodeproj/project.pbxproj: * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::createElementForImageOverlay): * en.lproj/Localizable.strings: * html/HTMLElement.cpp: (WebCore::HTMLElement::updateWithTextRecognitionResult): (WebCore::HTMLElement::updateWithImageExtractionResult): Deleted. * html/HTMLElement.h: * page/ChromeClient.h: (WebCore::ChromeClient::requestTextRecognition): (WebCore::ChromeClient::requestImageExtraction): Deleted. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded const): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::m_textRecognitionHoverTimerFired): (WebCore::EventHandler::imageExtractionTimerFired): Deleted. * page/EventHandler.h: * page/Quirks.cpp: * page/Quirks.h: * platform/ContextMenuItem.cpp: (WebCore::isValidContextMenuAction): * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/TextRecognitionResult.h: Renamed from Source/WebCore/platform/ImageExtractionResult.h. Rename the following: - ImageExtractionResult => TextRecognitionResult - ImageExtractionTextData => TextRecognitionWordData - ImageExtractionLineData => TextRecognitionLineData - ImageExtractionDataDetectorInfo => TextRecognitionDataDetector (WebCore::TextRecognitionWordData::TextRecognitionWordData): (WebCore::TextRecognitionWordData::encode const): (WebCore::TextRecognitionWordData::decode): (WebCore::TextRecognitionLineData::TextRecognitionLineData): (WebCore::TextRecognitionDataDetector::TextRecognitionDataDetector): (WebCore::TextRecognitionLineData::encode const): (WebCore::TextRecognitionLineData::decode): (WebCore::TextRecognitionResult::isEmpty const): (WebCore::TextRecognitionResult::encode const): (WebCore::TextRecognitionResult::decode): * platform/cocoa/LocalizedStringsCocoa.mm: (WebCore::contextMenuItemTagLookUpImage): (WebCore::contextMenuItemTagRevealImage): Deleted. * testing/Internals.cpp: (WebCore::makeDataForLine): (WebCore::Internals::installImageOverlay): Source/WebKit: See WebCore/ChangeLog for more details. * Platform/cocoa/ImageExtractionUtilities.mm: Removed. * Platform/cocoa/TextRecognitionUtilities.h: Renamed from Source/WebKit/Platform/cocoa/ImageExtractionUtilities.h. * Platform/cocoa/TextRecognitionUtilities.mm: Added. Rename ImageExtractionUtilities to TextRecognitionUtilities. (WebKit::floatQuad): (WebKit::floatQuads): (WebKit::makeTextRecognitionResult): (WebKit::isLiveTextEnabled): * Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::encodePlatformData): (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::decodePlatformData): (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::encodePlatformData): Deleted. (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::decodePlatformData): Deleted. * Shared/TextRecognitionUpdateResult.h: Renamed from Source/WebKit/Shared/ImageExtractionUpdateResult.h. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<TextRecognitionDataDetector>::encode): (IPC::ArgumentCoder<TextRecognitionDataDetector>::decode): (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode): Deleted. (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * SourcesCocoa.txt: * UIProcess/API/Cocoa/_WKElementAction.mm: (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): (+[_WKElementAction imageForElementActionType:]): Note that we need to keep the _WKElementActionTypeRevealImage SPI symbol, to avoid breaking MobileMail. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::handleContextMenuLookUpImage): (WebKit::WebPageProxy::handleContextMenuRevealImage): Deleted. Rename `handleContextMenuRevealImage` to `handleContextMenuLookUpImage`. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::ensureImageAnalyzer): (WebKit::createImageAnalysisRequest): (WebKit::WebViewImpl::requestTextRecognition): (WebKit::WebViewImpl::computeHasVisualSearchResults): Rename `computeCanRevealImage` to `computeHasVisualSearchResults`. (WebKit::WebViewImpl::acceptsPreviewPanelControl): * UIProcess/PageClient.h: (WebKit::PageClient::requestTextRecognition): (WebKit::PageClient::computeHasVisualSearchResults): (WebKit::PageClient::requestImageExtraction): Deleted. (WebKit::PageClient::computeCanRevealImage): Deleted. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): (WebKit::WebPageProxy::requestTextRecognition): (WebKit::WebPageProxy::computeHasVisualSearchResults): (WebKit::WebPageProxy::updateWithTextRecognitionResult): (WebKit::WebPageProxy::requestImageExtraction): Deleted. (WebKit::WebPageProxy::computeCanRevealImage): Deleted. (WebKit::WebPageProxy::updateWithImageExtractionResult): Deleted. Rename `updateWithImageExtractionResult` to `updateWithTextRecognitionResult`. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::requestImageExtraction): Deleted. Rename `requestImageExtraction` to `requestTextRecognition`. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]): (-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView cleanUpInteraction]): (-[WKContentView deferringGestures]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]): (-[WKContentView hasSelectablePositionAtPoint:]): (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): (-[WKContentView canPerformActionForWebView:withSender:]): (-[WKContentView targetForAction:withSender:]): (-[WKContentView _didStartProvisionalLoadForMainFrame]): (-[WKContentView shouldDeferGestureDueToImageAnalysis:]): (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): (-[WKContentView _dragInteraction:prepareForSession:completion:]): (-[WKContentView _endImageAnalysisGestureDeferral:]): (-[WKContentView _doAfterPendingImageAnalysis:]): (-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]): (-[WKContentView presentVisualSearchPreviewControllerForImage:imageURL:title:imageBounds:appearanceActions:]): (-[WKContentView previewController:frameForPreviewItem:inSourceView:]): (-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]): (-[WKContentView previewControllerDidDismiss:]): (-[WKContentView numberOfPreviewItemsInPreviewController:]): (-[WKContentView previewController:previewItemAtIndex:]): (-[WKContentView provideDataForItem:]): (-[WKContentView actionSheetAssistant:shouldIncludeShowTextActionForElement:]): (-[WKContentView actionSheetAssistant:showTextForImage:imageURL:title:imageBounds:]): (-[WKContentView actionSheetAssistant:shouldIncludeLookUpImageActionForElement:]): (-[WKContentView actionSheetAssistant:lookUpImage:imageURL:title:imageBounds:]): (-[WKContentView imageAnalyzer]): (-[WKContentView hasPendingImageAnalysisRequest]): (-[WKContentView _setUpImageAnalysis]): (-[WKContentView _tearDownImageAnalysis]): (-[WKContentView _cancelImageAnalysis]): (-[WKContentView createImageAnalysisRequest:image:imageURL:]): (-[WKContentView createImageAnalysisRequest:image:]): (-[WKContentView validateImageAnalysisRequestIdentifier:]): (-[WKContentView requestTextRecognition:imageData:completionHandler:]): (-[WKContentView imageAnalysisGestureDidBegin:]): (-[WKContentView imageAnalysisGestureDidFail:]): (-[WKContentView imageAnalysisGestureDidTimeOut:]): (-[WKContentView _insertTextFromCameraForWebView:]): (-[WKContentView captureTextFromCameraForWebView:]): (-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]): (-[WKContentView continueContextMenuInteraction:]): (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]): (-[WKContentView shouldDeferGestureDueToImageExtraction:]): Deleted. (-[WKContentView _endImageExtractionGestureDeferral:]): Deleted. (-[WKContentView _doAfterPendingImageExtraction:]): Deleted. (-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]): Deleted. * UIProcess/ios/WKImageAnalysisGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.h. * UIProcess/ios/WKImageAnalysisGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.mm. (-[WKImageAnalysisGestureRecognizer initWithImageAnalysisGestureDelegate:]): (-[WKImageAnalysisGestureRecognizer setState:]): Rename WKImageExtractionGestureRecognizer to WKImageAnalysisGestureRecognizer (along with all adjacent classes). * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::computeHasVisualSearchResults): (WebKit::PageClientImpl::requestImageExtraction): Deleted. (WebKit::PageClientImpl::computeCanRevealImage): Deleted. * UIProcess/mac/WKVisualSearchPreviewController.h: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.h. * UIProcess/mac/WKVisualSearchPreviewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.mm. (-[WKVisualSearchPreviewController initWithPage:imageData:title:imageURL:]): (-[WKVisualSearchPreviewController beginControl:]): (-[WKVisualSearchPreviewController endControl:]): (-[WKVisualSearchPreviewController closePanelIfNecessary]): (-[WKVisualSearchPreviewController isControlling:]): (-[WKVisualSearchPreviewController provideDataForItem:]): (-[WKVisualSearchPreviewController numberOfPreviewItemsInPreviewPanel:]): (-[WKVisualSearchPreviewController previewPanel:previewItemAtIndex:]): (-[WKVisualSearchPreviewController previewPanel:initialActivityForItem:]): Rename `WKImageExtractionPreviewController` to `WKVisualSearchPreviewController`. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::getContextMenuFromItems): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::beginPreviewPanelControl): (WebKit::WebPageProxy::endPreviewPanelControl): (WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary): (WebKit::WebPageProxy::showImageInVisualSearchPreviewPanel): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::requestTextRecognition): (WebKit::WebChromeClient::requestImageExtraction): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): (WebKit::WebPage::requestTextRecognition): (WebKit::WebPage::updateWithTextRecognitionResult): (WebKit::WebPage::requestImageExtraction): Deleted. (WebKit::WebPage::updateWithImageExtractionResult): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: * WebView/WebHTMLView.mm: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. Source/WTF: * wtf/PlatformEnableCocoa.h: Move the feature flag out of WebKitAdditions and into OpenSource as IMAGE_ANALYSIS. Tools: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. * TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: * TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: LayoutTests: Rename `fast/images/image-extraction` to `fast/images/text-recognition`. * TestExpectations: * fast/images/text-recognition/basic-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay-expected-mismatch.html. * fast/images/text-recognition/basic-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay.html. * fast/images/text-recognition/click-link-with-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay-expected.txt. * fast/images/text-recognition/click-link-with-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay.html. * fast/images/text-recognition/image-overlay-creation-is-idempotent-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt. * fast/images/text-recognition/image-overlay-creation-is-idempotent.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html. * fast/images/text-recognition/image-overlay-with-selection-styles-expected.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html. * fast/images/text-recognition/image-overlay-with-selection-styles.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html. * fast/images/text-recognition/ios/reselect-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/reselect-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay.html. * fast/images/text-recognition/ios/select-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html. * fast/images/text-recognition/ios/select-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay.html. * fast/images/text-recognition/ios/selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay.html. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu-expected.txt. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu.html. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html. Canonical link: https://commits.webkit.org/238571@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-07 22:11:29 +00:00
#if !defined(ENABLE_IMAGE_ANALYSIS) && HAVE(VK_IMAGE_ANALYSIS)
Upstream WebKit support for Live Text https://bugs.webkit.org/show_bug.cgi?id=226706 <rdar://problem/78933684> Reviewed by Tim Horton. Source/WebCore: Upstream WebKit support for the family of "live text" and visual intelligence features from WebKitAdditions. This encompasses the following features on macOS 12 and iOS 15: - Text selection and interaction in images. - Data detectors in images. - Visual search (Look Up) via context menu in images. To do this, we rename the IMAGE_EXTRACTION feature flag (and any other similar symbol names that reference "image extraction" in some capacity) to their real names in macOS and iOS: - "Text recognition", in code that supports automatic OCR and data detectors in images. - "Look Up", in code that references the context menu action to invoke visual search. - "Visual Search", in code that manages QuickLook integration for invoking visual search. - "Image analysis", in code that directly integrates with VKImageAnalyzer and VKImageAnalyzerRequest. Tests: fast/images/text-recognition/basic-image-overlay.html fast/images/text-recognition/click-link-with-image-overlay.html fast/images/text-recognition/image-overlay-creation-is-idempotent.html fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html fast/images/text-recognition/image-overlay-with-selection-styles.html fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html fast/images/text-recognition/ios/reselect-word-in-image-overlay.html fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html fast/images/text-recognition/ios/select-word-in-image-overlay.html fast/images/text-recognition/ios/selection-rects-in-image-overlay.html fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html * WebCore.xcodeproj/project.pbxproj: * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::createElementForImageOverlay): * en.lproj/Localizable.strings: * html/HTMLElement.cpp: (WebCore::HTMLElement::updateWithTextRecognitionResult): (WebCore::HTMLElement::updateWithImageExtractionResult): Deleted. * html/HTMLElement.h: * page/ChromeClient.h: (WebCore::ChromeClient::requestTextRecognition): (WebCore::ChromeClient::requestImageExtraction): Deleted. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded const): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::m_textRecognitionHoverTimerFired): (WebCore::EventHandler::imageExtractionTimerFired): Deleted. * page/EventHandler.h: * page/Quirks.cpp: * page/Quirks.h: * platform/ContextMenuItem.cpp: (WebCore::isValidContextMenuAction): * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/TextRecognitionResult.h: Renamed from Source/WebCore/platform/ImageExtractionResult.h. Rename the following: - ImageExtractionResult => TextRecognitionResult - ImageExtractionTextData => TextRecognitionWordData - ImageExtractionLineData => TextRecognitionLineData - ImageExtractionDataDetectorInfo => TextRecognitionDataDetector (WebCore::TextRecognitionWordData::TextRecognitionWordData): (WebCore::TextRecognitionWordData::encode const): (WebCore::TextRecognitionWordData::decode): (WebCore::TextRecognitionLineData::TextRecognitionLineData): (WebCore::TextRecognitionDataDetector::TextRecognitionDataDetector): (WebCore::TextRecognitionLineData::encode const): (WebCore::TextRecognitionLineData::decode): (WebCore::TextRecognitionResult::isEmpty const): (WebCore::TextRecognitionResult::encode const): (WebCore::TextRecognitionResult::decode): * platform/cocoa/LocalizedStringsCocoa.mm: (WebCore::contextMenuItemTagLookUpImage): (WebCore::contextMenuItemTagRevealImage): Deleted. * testing/Internals.cpp: (WebCore::makeDataForLine): (WebCore::Internals::installImageOverlay): Source/WebKit: See WebCore/ChangeLog for more details. * Platform/cocoa/ImageExtractionUtilities.mm: Removed. * Platform/cocoa/TextRecognitionUtilities.h: Renamed from Source/WebKit/Platform/cocoa/ImageExtractionUtilities.h. * Platform/cocoa/TextRecognitionUtilities.mm: Added. Rename ImageExtractionUtilities to TextRecognitionUtilities. (WebKit::floatQuad): (WebKit::floatQuads): (WebKit::makeTextRecognitionResult): (WebKit::isLiveTextEnabled): * Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::encodePlatformData): (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::decodePlatformData): (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::encodePlatformData): Deleted. (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::decodePlatformData): Deleted. * Shared/TextRecognitionUpdateResult.h: Renamed from Source/WebKit/Shared/ImageExtractionUpdateResult.h. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<TextRecognitionDataDetector>::encode): (IPC::ArgumentCoder<TextRecognitionDataDetector>::decode): (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode): Deleted. (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * SourcesCocoa.txt: * UIProcess/API/Cocoa/_WKElementAction.mm: (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): (+[_WKElementAction imageForElementActionType:]): Note that we need to keep the _WKElementActionTypeRevealImage SPI symbol, to avoid breaking MobileMail. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::handleContextMenuLookUpImage): (WebKit::WebPageProxy::handleContextMenuRevealImage): Deleted. Rename `handleContextMenuRevealImage` to `handleContextMenuLookUpImage`. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::ensureImageAnalyzer): (WebKit::createImageAnalysisRequest): (WebKit::WebViewImpl::requestTextRecognition): (WebKit::WebViewImpl::computeHasVisualSearchResults): Rename `computeCanRevealImage` to `computeHasVisualSearchResults`. (WebKit::WebViewImpl::acceptsPreviewPanelControl): * UIProcess/PageClient.h: (WebKit::PageClient::requestTextRecognition): (WebKit::PageClient::computeHasVisualSearchResults): (WebKit::PageClient::requestImageExtraction): Deleted. (WebKit::PageClient::computeCanRevealImage): Deleted. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): (WebKit::WebPageProxy::requestTextRecognition): (WebKit::WebPageProxy::computeHasVisualSearchResults): (WebKit::WebPageProxy::updateWithTextRecognitionResult): (WebKit::WebPageProxy::requestImageExtraction): Deleted. (WebKit::WebPageProxy::computeCanRevealImage): Deleted. (WebKit::WebPageProxy::updateWithImageExtractionResult): Deleted. Rename `updateWithImageExtractionResult` to `updateWithTextRecognitionResult`. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::requestImageExtraction): Deleted. Rename `requestImageExtraction` to `requestTextRecognition`. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]): (-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView cleanUpInteraction]): (-[WKContentView deferringGestures]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]): (-[WKContentView hasSelectablePositionAtPoint:]): (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): (-[WKContentView canPerformActionForWebView:withSender:]): (-[WKContentView targetForAction:withSender:]): (-[WKContentView _didStartProvisionalLoadForMainFrame]): (-[WKContentView shouldDeferGestureDueToImageAnalysis:]): (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): (-[WKContentView _dragInteraction:prepareForSession:completion:]): (-[WKContentView _endImageAnalysisGestureDeferral:]): (-[WKContentView _doAfterPendingImageAnalysis:]): (-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]): (-[WKContentView presentVisualSearchPreviewControllerForImage:imageURL:title:imageBounds:appearanceActions:]): (-[WKContentView previewController:frameForPreviewItem:inSourceView:]): (-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]): (-[WKContentView previewControllerDidDismiss:]): (-[WKContentView numberOfPreviewItemsInPreviewController:]): (-[WKContentView previewController:previewItemAtIndex:]): (-[WKContentView provideDataForItem:]): (-[WKContentView actionSheetAssistant:shouldIncludeShowTextActionForElement:]): (-[WKContentView actionSheetAssistant:showTextForImage:imageURL:title:imageBounds:]): (-[WKContentView actionSheetAssistant:shouldIncludeLookUpImageActionForElement:]): (-[WKContentView actionSheetAssistant:lookUpImage:imageURL:title:imageBounds:]): (-[WKContentView imageAnalyzer]): (-[WKContentView hasPendingImageAnalysisRequest]): (-[WKContentView _setUpImageAnalysis]): (-[WKContentView _tearDownImageAnalysis]): (-[WKContentView _cancelImageAnalysis]): (-[WKContentView createImageAnalysisRequest:image:imageURL:]): (-[WKContentView createImageAnalysisRequest:image:]): (-[WKContentView validateImageAnalysisRequestIdentifier:]): (-[WKContentView requestTextRecognition:imageData:completionHandler:]): (-[WKContentView imageAnalysisGestureDidBegin:]): (-[WKContentView imageAnalysisGestureDidFail:]): (-[WKContentView imageAnalysisGestureDidTimeOut:]): (-[WKContentView _insertTextFromCameraForWebView:]): (-[WKContentView captureTextFromCameraForWebView:]): (-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]): (-[WKContentView continueContextMenuInteraction:]): (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]): (-[WKContentView shouldDeferGestureDueToImageExtraction:]): Deleted. (-[WKContentView _endImageExtractionGestureDeferral:]): Deleted. (-[WKContentView _doAfterPendingImageExtraction:]): Deleted. (-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]): Deleted. * UIProcess/ios/WKImageAnalysisGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.h. * UIProcess/ios/WKImageAnalysisGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.mm. (-[WKImageAnalysisGestureRecognizer initWithImageAnalysisGestureDelegate:]): (-[WKImageAnalysisGestureRecognizer setState:]): Rename WKImageExtractionGestureRecognizer to WKImageAnalysisGestureRecognizer (along with all adjacent classes). * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::computeHasVisualSearchResults): (WebKit::PageClientImpl::requestImageExtraction): Deleted. (WebKit::PageClientImpl::computeCanRevealImage): Deleted. * UIProcess/mac/WKVisualSearchPreviewController.h: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.h. * UIProcess/mac/WKVisualSearchPreviewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.mm. (-[WKVisualSearchPreviewController initWithPage:imageData:title:imageURL:]): (-[WKVisualSearchPreviewController beginControl:]): (-[WKVisualSearchPreviewController endControl:]): (-[WKVisualSearchPreviewController closePanelIfNecessary]): (-[WKVisualSearchPreviewController isControlling:]): (-[WKVisualSearchPreviewController provideDataForItem:]): (-[WKVisualSearchPreviewController numberOfPreviewItemsInPreviewPanel:]): (-[WKVisualSearchPreviewController previewPanel:previewItemAtIndex:]): (-[WKVisualSearchPreviewController previewPanel:initialActivityForItem:]): Rename `WKImageExtractionPreviewController` to `WKVisualSearchPreviewController`. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::getContextMenuFromItems): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::beginPreviewPanelControl): (WebKit::WebPageProxy::endPreviewPanelControl): (WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary): (WebKit::WebPageProxy::showImageInVisualSearchPreviewPanel): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::requestTextRecognition): (WebKit::WebChromeClient::requestImageExtraction): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): (WebKit::WebPage::requestTextRecognition): (WebKit::WebPage::updateWithTextRecognitionResult): (WebKit::WebPage::requestImageExtraction): Deleted. (WebKit::WebPage::updateWithImageExtractionResult): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: * WebView/WebHTMLView.mm: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. Source/WTF: * wtf/PlatformEnableCocoa.h: Move the feature flag out of WebKitAdditions and into OpenSource as IMAGE_ANALYSIS. Tools: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. * TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: * TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: LayoutTests: Rename `fast/images/image-extraction` to `fast/images/text-recognition`. * TestExpectations: * fast/images/text-recognition/basic-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay-expected-mismatch.html. * fast/images/text-recognition/basic-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay.html. * fast/images/text-recognition/click-link-with-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay-expected.txt. * fast/images/text-recognition/click-link-with-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay.html. * fast/images/text-recognition/image-overlay-creation-is-idempotent-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt. * fast/images/text-recognition/image-overlay-creation-is-idempotent.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html. * fast/images/text-recognition/image-overlay-with-selection-styles-expected.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html. * fast/images/text-recognition/image-overlay-with-selection-styles.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html. * fast/images/text-recognition/ios/reselect-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/reselect-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay.html. * fast/images/text-recognition/ios/select-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html. * fast/images/text-recognition/ios/select-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay.html. * fast/images/text-recognition/ios/selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay.html. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu-expected.txt. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu.html. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html. Canonical link: https://commits.webkit.org/238571@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-07 22:11:29 +00:00
#define ENABLE_IMAGE_ANALYSIS 1
#endif
#if !defined(ENABLE_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES) && HAVE(VK_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES)
#define ENABLE_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES 1
Upstream WebKit support for Live Text https://bugs.webkit.org/show_bug.cgi?id=226706 <rdar://problem/78933684> Reviewed by Tim Horton. Source/WebCore: Upstream WebKit support for the family of "live text" and visual intelligence features from WebKitAdditions. This encompasses the following features on macOS 12 and iOS 15: - Text selection and interaction in images. - Data detectors in images. - Visual search (Look Up) via context menu in images. To do this, we rename the IMAGE_EXTRACTION feature flag (and any other similar symbol names that reference "image extraction" in some capacity) to their real names in macOS and iOS: - "Text recognition", in code that supports automatic OCR and data detectors in images. - "Look Up", in code that references the context menu action to invoke visual search. - "Visual Search", in code that manages QuickLook integration for invoking visual search. - "Image analysis", in code that directly integrates with VKImageAnalyzer and VKImageAnalyzerRequest. Tests: fast/images/text-recognition/basic-image-overlay.html fast/images/text-recognition/click-link-with-image-overlay.html fast/images/text-recognition/image-overlay-creation-is-idempotent.html fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html fast/images/text-recognition/image-overlay-with-selection-styles.html fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html fast/images/text-recognition/ios/reselect-word-in-image-overlay.html fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html fast/images/text-recognition/ios/select-word-in-image-overlay.html fast/images/text-recognition/ios/selection-rects-in-image-overlay.html fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html * WebCore.xcodeproj/project.pbxproj: * editing/cocoa/DataDetection.h: * editing/cocoa/DataDetection.mm: (WebCore::DataDetection::createElementForImageOverlay): * en.lproj/Localizable.strings: * html/HTMLElement.cpp: (WebCore::HTMLElement::updateWithTextRecognitionResult): (WebCore::HTMLElement::updateWithImageExtractionResult): Deleted. * html/HTMLElement.h: * page/ChromeClient.h: (WebCore::ChromeClient::requestTextRecognition): (WebCore::ChromeClient::requestImageExtraction): Deleted. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded const): * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): (WebCore::EventHandler::m_textRecognitionHoverTimerFired): (WebCore::EventHandler::imageExtractionTimerFired): Deleted. * page/EventHandler.h: * page/Quirks.cpp: * page/Quirks.h: * platform/ContextMenuItem.cpp: (WebCore::isValidContextMenuAction): * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/TextRecognitionResult.h: Renamed from Source/WebCore/platform/ImageExtractionResult.h. Rename the following: - ImageExtractionResult => TextRecognitionResult - ImageExtractionTextData => TextRecognitionWordData - ImageExtractionLineData => TextRecognitionLineData - ImageExtractionDataDetectorInfo => TextRecognitionDataDetector (WebCore::TextRecognitionWordData::TextRecognitionWordData): (WebCore::TextRecognitionWordData::encode const): (WebCore::TextRecognitionWordData::decode): (WebCore::TextRecognitionLineData::TextRecognitionLineData): (WebCore::TextRecognitionDataDetector::TextRecognitionDataDetector): (WebCore::TextRecognitionLineData::encode const): (WebCore::TextRecognitionLineData::decode): (WebCore::TextRecognitionResult::isEmpty const): (WebCore::TextRecognitionResult::encode const): (WebCore::TextRecognitionResult::decode): * platform/cocoa/LocalizedStringsCocoa.mm: (WebCore::contextMenuItemTagLookUpImage): (WebCore::contextMenuItemTagRevealImage): Deleted. * testing/Internals.cpp: (WebCore::makeDataForLine): (WebCore::Internals::installImageOverlay): Source/WebKit: See WebCore/ChangeLog for more details. * Platform/cocoa/ImageExtractionUtilities.mm: Removed. * Platform/cocoa/TextRecognitionUtilities.h: Renamed from Source/WebKit/Platform/cocoa/ImageExtractionUtilities.h. * Platform/cocoa/TextRecognitionUtilities.mm: Added. Rename ImageExtractionUtilities to TextRecognitionUtilities. (WebKit::floatQuad): (WebKit::floatQuads): (WebKit::makeTextRecognitionResult): (WebKit::isLiveTextEnabled): * Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::encodePlatformData): (IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::decodePlatformData): (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::encodePlatformData): Deleted. (IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::decodePlatformData): Deleted. * Shared/TextRecognitionUpdateResult.h: Renamed from Source/WebKit/Shared/ImageExtractionUpdateResult.h. * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<TextRecognitionDataDetector>::encode): (IPC::ArgumentCoder<TextRecognitionDataDetector>::decode): (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode): Deleted. (IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode): Deleted. * Shared/WebCoreArgumentCoders.h: * SourcesCocoa.txt: * UIProcess/API/Cocoa/_WKElementAction.mm: (+[_WKElementAction _elementActionWithType:customTitle:assistant:]): (+[_WKElementAction imageForElementActionType:]): Note that we need to keep the _WKElementActionTypeRevealImage SPI symbol, to avoid breaking MobileMail. * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::handleContextMenuLookUpImage): (WebKit::WebPageProxy::handleContextMenuRevealImage): Deleted. Rename `handleContextMenuRevealImage` to `handleContextMenuLookUpImage`. * UIProcess/Cocoa/WebViewImpl.h: * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::ensureImageAnalyzer): (WebKit::createImageAnalysisRequest): (WebKit::WebViewImpl::requestTextRecognition): (WebKit::WebViewImpl::computeHasVisualSearchResults): Rename `computeCanRevealImage` to `computeHasVisualSearchResults`. (WebKit::WebViewImpl::acceptsPreviewPanelControl): * UIProcess/PageClient.h: (WebKit::PageClient::requestTextRecognition): (WebKit::PageClient::computeHasVisualSearchResults): (WebKit::PageClient::requestImageExtraction): Deleted. (WebKit::PageClient::computeCanRevealImage): Deleted. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected): (WebKit::WebPageProxy::requestTextRecognition): (WebKit::WebPageProxy::computeHasVisualSearchResults): (WebKit::WebPageProxy::updateWithTextRecognitionResult): (WebKit::WebPageProxy::requestImageExtraction): Deleted. (WebKit::WebPageProxy::computeCanRevealImage): Deleted. (WebKit::WebPageProxy::updateWithImageExtractionResult): Deleted. Rename `updateWithImageExtractionResult` to `updateWithTextRecognitionResult`. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::requestImageExtraction): Deleted. Rename `requestImageExtraction` to `requestTextRecognition`. * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]): (-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]): * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpInteraction]): (-[WKContentView cleanUpInteraction]): (-[WKContentView deferringGestures]): (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]): (-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]): (-[WKContentView hasSelectablePositionAtPoint:]): (-[WKContentView textInteractionGesture:shouldBeginAtPoint:]): (-[WKContentView canPerformActionForWebView:withSender:]): (-[WKContentView targetForAction:withSender:]): (-[WKContentView _didStartProvisionalLoadForMainFrame]): (-[WKContentView shouldDeferGestureDueToImageAnalysis:]): (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]): (-[WKContentView _dragInteraction:prepareForSession:completion:]): (-[WKContentView _endImageAnalysisGestureDeferral:]): (-[WKContentView _doAfterPendingImageAnalysis:]): (-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]): (-[WKContentView presentVisualSearchPreviewControllerForImage:imageURL:title:imageBounds:appearanceActions:]): (-[WKContentView previewController:frameForPreviewItem:inSourceView:]): (-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]): (-[WKContentView previewControllerDidDismiss:]): (-[WKContentView numberOfPreviewItemsInPreviewController:]): (-[WKContentView previewController:previewItemAtIndex:]): (-[WKContentView provideDataForItem:]): (-[WKContentView actionSheetAssistant:shouldIncludeShowTextActionForElement:]): (-[WKContentView actionSheetAssistant:showTextForImage:imageURL:title:imageBounds:]): (-[WKContentView actionSheetAssistant:shouldIncludeLookUpImageActionForElement:]): (-[WKContentView actionSheetAssistant:lookUpImage:imageURL:title:imageBounds:]): (-[WKContentView imageAnalyzer]): (-[WKContentView hasPendingImageAnalysisRequest]): (-[WKContentView _setUpImageAnalysis]): (-[WKContentView _tearDownImageAnalysis]): (-[WKContentView _cancelImageAnalysis]): (-[WKContentView createImageAnalysisRequest:image:imageURL:]): (-[WKContentView createImageAnalysisRequest:image:]): (-[WKContentView validateImageAnalysisRequestIdentifier:]): (-[WKContentView requestTextRecognition:imageData:completionHandler:]): (-[WKContentView imageAnalysisGestureDidBegin:]): (-[WKContentView imageAnalysisGestureDidFail:]): (-[WKContentView imageAnalysisGestureDidTimeOut:]): (-[WKContentView _insertTextFromCameraForWebView:]): (-[WKContentView captureTextFromCameraForWebView:]): (-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]): (-[WKContentView continueContextMenuInteraction:]): (-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]): (-[WKContentView shouldDeferGestureDueToImageExtraction:]): Deleted. (-[WKContentView _endImageExtractionGestureDeferral:]): Deleted. (-[WKContentView _doAfterPendingImageExtraction:]): Deleted. (-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]): Deleted. * UIProcess/ios/WKImageAnalysisGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.h. * UIProcess/ios/WKImageAnalysisGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.mm. (-[WKImageAnalysisGestureRecognizer initWithImageAnalysisGestureDelegate:]): (-[WKImageAnalysisGestureRecognizer setState:]): Rename WKImageExtractionGestureRecognizer to WKImageAnalysisGestureRecognizer (along with all adjacent classes). * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::requestTextRecognition): (WebKit::PageClientImpl::computeHasVisualSearchResults): (WebKit::PageClientImpl::requestImageExtraction): Deleted. (WebKit::PageClientImpl::computeCanRevealImage): Deleted. * UIProcess/mac/WKVisualSearchPreviewController.h: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.h. * UIProcess/mac/WKVisualSearchPreviewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.mm. (-[WKVisualSearchPreviewController initWithPage:imageData:title:imageURL:]): (-[WKVisualSearchPreviewController beginControl:]): (-[WKVisualSearchPreviewController endControl:]): (-[WKVisualSearchPreviewController closePanelIfNecessary]): (-[WKVisualSearchPreviewController isControlling:]): (-[WKVisualSearchPreviewController provideDataForItem:]): (-[WKVisualSearchPreviewController numberOfPreviewItemsInPreviewPanel:]): (-[WKVisualSearchPreviewController previewPanel:previewItemAtIndex:]): (-[WKVisualSearchPreviewController previewPanel:initialActivityForItem:]): Rename `WKImageExtractionPreviewController` to `WKVisualSearchPreviewController`. * UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::getContextMenuFromItems): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::beginPreviewPanelControl): (WebKit::WebPageProxy::endPreviewPanelControl): (WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary): (WebKit::WebPageProxy::showImageInVisualSearchPreviewPanel): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::requestTextRecognition): (WebKit::WebChromeClient::requestImageExtraction): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didCommitLoad): (WebKit::WebPage::requestTextRecognition): (WebKit::WebPage::updateWithTextRecognitionResult): (WebKit::WebPage::requestImageExtraction): Deleted. (WebKit::WebPage::updateWithImageExtractionResult): Deleted. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Source/WebKitLegacy/mac: * WebView/WebHTMLView.mm: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. Source/WTF: * wtf/PlatformEnableCocoa.h: Move the feature flag out of WebKitAdditions and into OpenSource as IMAGE_ANALYSIS. Tools: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS. * TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm: * TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: * TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm: * TestWebKitAPI/Tests/mac/ImmediateActionTests.mm: LayoutTests: Rename `fast/images/image-extraction` to `fast/images/text-recognition`. * TestExpectations: * fast/images/text-recognition/basic-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay-expected-mismatch.html. * fast/images/text-recognition/basic-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay.html. * fast/images/text-recognition/click-link-with-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay-expected.txt. * fast/images/text-recognition/click-link-with-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay.html. * fast/images/text-recognition/image-overlay-creation-is-idempotent-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt. * fast/images/text-recognition/image-overlay-creation-is-idempotent.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html. * fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html. * fast/images/text-recognition/image-overlay-with-selection-styles-expected.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html. * fast/images/text-recognition/image-overlay-with-selection-styles.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html. * fast/images/text-recognition/ios/reselect-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/reselect-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay.html. * fast/images/text-recognition/ios/select-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt. * fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html. * fast/images/text-recognition/ios/select-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay.html. * fast/images/text-recognition/ios/selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt. * fast/images/text-recognition/ios/selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay.html. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu-expected.txt. * fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu.html. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt. * fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html. * fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html. * fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html. * fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html. Canonical link: https://commits.webkit.org/238571@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-07 22:11:29 +00:00
#endif