2020-01-16 14:47:17 +00:00
|
|
|
/*
|
2021-02-11 17:43:57 +00:00
|
|
|
* Copyright (C) 2006-2021 Apple Inc. All rights reserved.
|
2020-01-16 14:47:17 +00:00
|
|
|
* Copyright (C) 2007-2009 Torch Mobile, Inc.
|
|
|
|
* Copyright (C) 2010, 2011 Research In Motion Limited. 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
|
|
|
|
|
2020-01-17 01:16:43 +00:00
|
|
|
#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
|
|
|
|
#error "Please #include <wtf/Platform.h> instead of this file directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
/* HAVE() - specific system features (headers, functions or similar) that are present or not */
|
|
|
|
#define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAVE_FEATURES_H) && HAVE_FEATURES_H
|
|
|
|
/* If the included features.h is glibc's one, __GLIBC__ is defined. */
|
|
|
|
#include <features.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if CPU(ARM_NEON)
|
|
|
|
/* All NEON intrinsics usage can be disabled by this macro. */
|
|
|
|
#define HAVE_ARM_NEON_INTRINSICS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* FIXME: This should be renamed to WTF_CPU_ARM_IDIV_INSTRUCTIONS and moved to CPU.h */
|
|
|
|
#if defined(__ARM_ARCH_EXT_IDIV__) || CPU(APPLE_ARMV7S)
|
|
|
|
#define HAVE_ARM_IDIV_INSTRUCTIONS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_OUT_OF_PROCESS_LAYER_HOSTING 1
|
|
|
|
#endif
|
|
|
|
|
2020-04-08 09:38:51 +00:00
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_REMAP_JIT 1
|
|
|
|
#endif
|
2020-01-16 14:47:17 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_SEC_KEYCHAIN 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_HISERVICES 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_READLINE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && CPU(ARM_NEON)
|
|
|
|
#undef HAVE_ARM_NEON_INTRINSICS
|
|
|
|
#define HAVE_ARM_NEON_INTRINSICS 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_VISIBILITY_PROPAGATION_VIEW) && PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_VISIBILITY_PROPAGATION_VIEW 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_AVSTREAMSESSION) && PLATFORM(MAC)
|
|
|
|
#define HAVE_AVSTREAMSESSION 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(USE_UIKIT_KEYBOARD_ADDITIONS) && (PLATFORM(IOS) || PLATFORM(MACCATALYST))
|
|
|
|
#define USE_UIKIT_KEYBOARD_ADDITIONS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_ACCESSIBILITY) && (PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(WPE))
|
|
|
|
#define HAVE_ACCESSIBILITY 1
|
|
|
|
#endif
|
|
|
|
|
2021-05-27 21:35:51 +00:00
|
|
|
#if !defined(HAVE_TIMINGSAFE_BCMP) && (PLATFORM(COCOA) || OS(OPENBSD) || OS(FREEBSD))
|
|
|
|
#define HAVE_TIMINGSAFE_BCMP 1
|
|
|
|
#endif
|
|
|
|
|
2021-05-25 17:34:01 +00:00
|
|
|
#if !defined(HAVE_STD_FILESYSTEM)
|
|
|
|
#if __has_include(<filesystem>)
|
|
|
|
#define HAVE_STD_FILESYSTEM 1
|
|
|
|
#else
|
|
|
|
#define HAVE_STD_FILESYSTEM 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_STD_EXPERIMENTAL_FILESYSTEM)
|
|
|
|
#if __has_include(<experimental/filesystem>)
|
|
|
|
#define STD_EXPERIMENTAL_FILESYSTEM 1
|
|
|
|
#else
|
|
|
|
#define STD_EXPERIMENTAL_FILESYSTEM 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
/* FIXME: Remove after CMake build enabled on Darwin */
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_ERRNO_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_LANGINFO_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_LOCALTIME_R 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_MMAP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_REGEX_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_SIGNAL_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_STAT_BIRTHTIME 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_STRNSTR 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_SYS_PARAM_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_SYS_TIME_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_TM_GMTOFF 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_TM_ZONE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_TIMEGM 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_PTHREAD_MAIN_NP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN) && (CPU(X86_64) || CPU(ARM64))
|
|
|
|
#define HAVE_INT128_T 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(UNIX) && !OS(FUCHSIA)
|
|
|
|
#define HAVE_RESOURCE_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(UNIX) && !OS(FUCHSIA)
|
|
|
|
#define HAVE_PTHREAD_SETSCHEDPARAM 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_DISPATCH_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_MADV_FREE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_MADV_FREE_REUSE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_MADV_DONTNEED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_PTHREAD_SETNAME_NP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_READLINE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_SYS_TIMEB_H 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN)
|
|
|
|
#define HAVE_AUDIT_TOKEN 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OS(DARWIN) && __has_include(<mach/mach_exc.defs>) && !PLATFORM(GTK)
|
|
|
|
#define HAVE_MACH_EXCEPTIONS 1
|
|
|
|
#endif
|
|
|
|
|
2021-01-27 23:58:02 +00:00
|
|
|
#if OS(DARWIN) && __has_include(<mach/memory_entry.h>)
|
|
|
|
#define HAVE_MACH_MEMORY_ENTRY 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-06 15:00:50 +00:00
|
|
|
#if PLATFORM(MAC)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_HOSTED_CORE_ANIMATION 1
|
|
|
|
#endif
|
|
|
|
|
2021-04-29 20:01:05 +00:00
|
|
|
#if OS(DARWIN) || OS(FUCHSIA) || OS(HAIKU) || ((OS(FREEBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_MACHINE_CONTEXT 1
|
|
|
|
#endif
|
|
|
|
|
2021-01-05 20:02:58 +00:00
|
|
|
#if OS(DARWIN) || OS(HAIKU) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS))
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_BACKTRACE 1
|
|
|
|
#endif
|
|
|
|
|
2020-02-25 14:14:38 +00:00
|
|
|
#if (OS(DARWIN) || OS(LINUX)) && (PLATFORM(GTK) || PLATFORM(WPE)) && defined(__GLIBC__) && !defined(__UCLIBC__) && !CPU(MIPS)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_BACKTRACE_SYMBOLS 1
|
|
|
|
#endif
|
|
|
|
|
2021-01-05 20:02:58 +00:00
|
|
|
#if OS(DARWIN) || OS(HAIKU) || OS(LINUX)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_DLADDR 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __has_include(<System/pthread_machdep.h>)
|
|
|
|
#define HAVE_FAST_TLS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if COMPILER(GCC_COMPATIBLE)
|
|
|
|
#define HAVE_COMPUTED_GOTO 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CPU(ARM64E) && OS(DARWIN)
|
|
|
|
#define HAVE_FJCVTZS_INSTRUCTION 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-20 18:31:38 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_APP_LINKS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_CELESTIAL 1
|
|
|
|
#endif
|
|
|
|
|
2020-09-10 23:52:11 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
|
|
|
|
#define HAVE_FIG_PHOTO_DECOMPRESSION_SET_HARDWARE_CUTOFF 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_CORE_ANIMATION_RENDER_SERVER 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) && !PLATFORM(APPLETV)
|
|
|
|
#define HAVE_PARENTAL_CONTROLS_WITH_UNBLOCK_HANDLER 1
|
|
|
|
#endif
|
|
|
|
|
2020-06-04 16:02:13 +00:00
|
|
|
#if PLATFORM(COCOA) && (!PLATFORM(APPLETV) && (!PLATFORM(WATCHOS) || !PLATFORM(IOS_FAMILY_SIMULATOR) || __WATCH_OS_VERSION_MIN_REQUIRED >= 70000))
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_PARENTAL_CONTROLS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA) && !PLATFORM(APPLETV)
|
|
|
|
#define HAVE_AVKIT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_APPLE_GRAPHICS_CONTROL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_NSCURSOR 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_QOS_CLASSES) && PLATFORM(COCOA)
|
|
|
|
#define HAVE_QOS_CLASSES 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_AVASSETREADER 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_IOSURFACE 1
|
|
|
|
#endif
|
|
|
|
|
2021-03-01 19:15:01 +00:00
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_CVDISPLAYLINK 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)
|
|
|
|
#define HAVE_IOSURFACE_COREIMAGE_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_IOSURFACE_ACCELERATOR 1
|
|
|
|
#endif
|
|
|
|
|
2021-01-20 00:07:38 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) \
|
2021-01-22 01:40:16 +00:00
|
|
|
|| (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) \
|
|
|
|
|| (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MIN_REQUIRED >= 130000)
|
2021-01-20 00:07:38 +00:00
|
|
|
#define HAVE_IOSURFACE_SET_OWNERSHIP 1
|
|
|
|
#endif
|
|
|
|
|
2021-03-04 18:41:02 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
|
|
|
|
|| (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#define HAVE_IOSURFACE_SET_OWNERSHIP_IDENTITY 1
|
|
|
|
#endif
|
|
|
|
|
2021-06-09 05:08:25 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| ((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 HAVE_NETWORK_CONNECTION_PRIVACY_STANCE 1
|
|
|
|
#endif
|
|
|
|
|
2021-02-23 00:31:56 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300) \
|
|
|
|
|| (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140500) \
|
|
|
|
|| (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MAX_ALLOWED >= 70500) \
|
|
|
|
|| (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MAX_ALLOWED >= 140500)
|
|
|
|
#define HAVE_TASK_IDENTITY_TOKEN 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_NS_ACTIVITY 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_SEC_TRUST_SERIALIZATION 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_TOUCH_BAR 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_HSTS_STORAGE_PATH 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_URL_FORMATTING 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !OS(WINDOWS)
|
|
|
|
#define HAVE_STACK_BOUNDS_FOR_NEW_THREAD 1
|
2020-08-27 19:52:20 +00:00
|
|
|
#endif
|
|
|
|
|
2021-01-05 20:02:58 +00:00
|
|
|
#if !OS(WINDOWS) && !PLATFORM(PLAYSTATION) && !OS(HAIKU)
|
2020-08-24 22:36:02 +00:00
|
|
|
#define HAVE_MEMMEM 1
|
2020-01-16 14:47:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_AVCONTENTKEYSESSION 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_SEC_KEY_PROXY 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* FIXME: Should this be enabled for IOS_FAMILY, not just IOS? */
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101400
|
|
|
|
#define HAVE_NSHTTPCOOKIESTORAGE__INITWITHIDENTIFIER_WITH_INACCURATE_NULLABILITY 1
|
|
|
|
#endif
|
|
|
|
|
[GTK][WPE] Support color-schemes CSS property
https://bugs.webkit.org/show_bug.cgi?id=208204
Patch by Alexander Mikhaylenko <alexm@gnome.org> on 2021-07-16
Reviewed by Adrian Perez de Castro.
.:
* Source/cmake/OptionsGTK.cmake:
Enable HAVE_OS_DARK_MODE_SUPPORT.
* Source/cmake/OptionsWPE.cmake:
Enable ENABLE_DARK_MODE_CSS and HAVE_OS_DARK_MODE_SUPPORT.
Source/WebCore:
Last time we tried enabling dark mode, we broke many webpages since we couldn't have diferent
controls, and more importantly, different system colors and defaults for pages that do and
don't support dark mode.
Now that we don't use GTK for this, we can try again. This time, use hardcoded system colors
and return different colors depending on StyleColor::Options::UseDarkAppearance.
To avoid dark-on-dark text on entries, we also need to enable HAVE_OS_DARK_MODE_SUPPORT for GTK
and make sure it's passed to use agent CSS. And since Adwaita controls are also used in WPE, we
need to enable it for WPE as well, and since WPE didn't have ENABLE_DARK_MODE_CSS, flip that as
well, all in lockstep.
No new tests, reenabled the existing css-dark-mode tests.
* PlatformGTK.cmake:
* PlatformWPE.cmake:
Pass HAVE_OS_DARK_MODE_SUPPORT to user agent CSS.
* css/CSSValueKeywords.in:
Expose -webkit-control-background for anything with HAVE_OS_DARK_MODE_SUPPORT.
* css/themeAdwaita.css:
(input[type="search"]::-webkit-search-results-button,):
(input[type="search"]::-webkit-search-cancel-button):
(body[dir="rtl"] input[type="search"]::-webkit-search-cancel-button):
(input[type="search"]::-webkit-search-results-button:hover,):
(input[type="search"]::-webkit-search-cancel-button:hover): Deleted.
Use mask images instead of content so we can recolor them. Change
color on hover as opacity and inherit entry's color otherwise to
make sure it's legible with dark appearance.
* page/FrameView.cpp:
(WebCore::FrameView::updateBackgroundRecursively):
Use CSSValueWindow for background instead of CSSValueAppleSystemControlBackground
when the latter is not available.
* platform/adwaita/ThemeAdwaita.cpp:
(WebCore::ThemeAdwaita::focusColor):
(WebCore::ThemeAdwaita::paintFocus):
(WebCore::ThemeAdwaita::paintArrow):
(WebCore::ThemeAdwaita::paint):
(WebCore::ThemeAdwaita::paintCheckbox):
(WebCore::ThemeAdwaita::paintRadio):
(WebCore::ThemeAdwaita::paintButton):
(WebCore::ThemeAdwaita::paintSpinButton):
* platform/adwaita/ThemeAdwaita.h:
* rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::platformFocusRingColor const):
(WebCore::RenderThemeAdwaita::systemColor const):
(WebCore::RenderThemeAdwaita::paintTextField):
(WebCore::RenderThemeAdwaita::adjustTextFieldStyle const):
(WebCore::RenderThemeAdwaita::adjustTextAreaStyle const):
(WebCore::RenderThemeAdwaita::adjustSearchFieldStyle const):
Add a border radius to the default style, so the background doesn't bleed through
the corners.
(WebCore::RenderThemeAdwaita::paintMenuList):
(WebCore::RenderThemeAdwaita::paintProgressBar):
(WebCore::RenderThemeAdwaita::paintSliderTrack):
(WebCore::RenderThemeAdwaita::paintSliderThumb):
* rendering/RenderThemeAdwaita.h:
Source/WTF:
* wtf/PlatformHave.h:
Enable HAVE_OS_DARK_MODE_SUPPORT for GTK and WPE.
LayoutTests:
Reenable css-dark-mode tests for GTK as they pass now. Enable the same tests in WPE.
Keep css-dark-mode/older-syntax/supported-color-schemes-css.html as [ Pass Crash ] for now,
according to https://bugs.webkit.org/show_bug.cgi?id=202229#c2
* platform/gtk/TestExpectations:
* platform/gtk/css-dark-mode/color-scheme-css-expected.txt: Removed.
* platform/gtk/css-dark-mode/color-scheme-meta-expected.txt: Removed.
* platform/gtk/css-dark-mode/color-scheme-priority-expected.txt: Removed.
* platform/gtk/css-dark-mode/default-colors-expected.txt: Removed.
* platform/gtk/css-dark-mode/older-syntax/supported-color-schemes-css-expected.txt: Removed.
* platform/gtk/css-dark-mode/older-syntax/supported-color-schemes-meta-expected.txt: Removed.
* platform/wpe/TestExpectations:
Canonical link: https://commits.webkit.org/239730@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 16:39:15 +00:00
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST) || PLATFORM(GTK) || PLATFORM(WPE)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_OS_DARK_MODE_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
2020-09-16 00:06:45 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CG_FONT_RENDERING_GET_FONT_SMOOTHING_DISABLED 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-19 22:50:16 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
|
|
|
|
#define HAVE_READ_ONLY_SYSTEM_VOLUME 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#ifdef __APPLE__
|
|
|
|
#define HAVE_FUNC_USLEEP 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_SEC_ACCESS_CONTROL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS)
|
|
|
|
/* FIXME: SafariServices.framework exists on macOS. It is only used by WebKit on iOS, so the behavior is correct, but the name is misleading. */
|
|
|
|
#define HAVE_SAFARI_SERVICES_FRAMEWORK 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-11 21:02:10 +00:00
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WATCHOS) || PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_SAFE_BROWSING 1
|
|
|
|
#endif
|
|
|
|
|
2020-12-09 01:15:31 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_LINK_PREVIEW 1
|
|
|
|
#endif
|
|
|
|
|
2020-06-09 04:34:35 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_ACCESSIBILITY_BUNDLES_PATH 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && !(__MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101404))
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CFNETWORK_OVERRIDE_SESSION_COOKIE_ACCEPT_POLICY 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE 1
|
|
|
|
#endif
|
|
|
|
|
2021-03-09 19:08:33 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_CFNETWORK_NSURLSESSION_CONNECTION_CACHE_LIMITS 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_CFNETWORK_NEGOTIATED_SSL_PROTOCOL_CIPHER 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-23 23:00:50 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || PLATFORM(MACCATALYST) || PLATFORM(WATCHOS) || PLATFORM(APPLETV)
|
|
|
|
#define HAVE_CFNETWORK_SAMESITE_COOKIE_API 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-26 00:03:15 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 130000)
|
|
|
|
#define HAVE_CFNETWORK_METRICS_CONNECTION_PROPERTIES 1
|
|
|
|
#endif
|
|
|
|
|
2021-02-25 23:20:59 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 110300
|
|
|
|
#define HAVE_SAFARI_FOR_WEBKIT_DEVELOPMENT_REQUIRING_EXTRA_SYMBOLS 1
|
|
|
|
#endif
|
|
|
|
|
2020-06-11 23:51:24 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 140000
|
|
|
|
#define HAVE_BROKEN_DOWNLOAD_RESUME_UNLINK 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CFNETWORK_METRICS_APIS_V4 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-03-03 18:21:17 +00:00
|
|
|
#define HAVE_CFNETWORK_ALTERNATIVE_SERVICE 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
|
|
|
|
#define HAVE_CSCHECKFIXDISABLE 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_MDNS_FAST_REGISTRATION 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CTFONTCREATEFORCHARACTERSWITHLANGUAGEANDOPTION 1
|
|
|
|
#endif
|
|
|
|
|
2021-06-29 22:50:17 +00:00
|
|
|
#if PLATFORM(IOS)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_ARKIT_QUICK_LOOK_PREVIEW_ITEM 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_UI_WK_DOCUMENT_CONTEXT 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-19 19:16:33 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400)
|
2020-10-28 00:10:14 +00:00
|
|
|
#define HAVE_UI_POINTER_INTERACTION 1
|
2020-06-11 21:02:52 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-19 19:16:33 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_UIKIT_WITH_MOUSE_SUPPORT 1
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER 1
|
|
|
|
#endif
|
|
|
|
|
2021-05-12 03:55:46 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
|
|
|
|
#define HAVE_MOUSE_DEVICE_OBSERVATION 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-21 15:42:19 +00:00
|
|
|
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
|
|
|
|
#define HAVE_UI_HOVER_EVENT_RESPONDABLE 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-19 19:16:33 +00:00
|
|
|
#if PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_LOOKUP_GESTURE_RECOGNIZER 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_ALLOWS_SENSITIVE_LOGGING 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_FAIRPLAYSTREAMING_CENC_INITDATA 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_APP_LINKS_WITH_ISENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(IOS)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_DEVICE_MANAGEMENT 1
|
|
|
|
#endif
|
|
|
|
|
2021-04-02 10:44:16 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_NSURLSESSION_WEBSOCKET 1
|
|
|
|
#endif
|
|
|
|
|
2021-07-01 20:56:00 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#define HAVE_NWPARAMETERS_TRACKER_API 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_AVPLAYER_RESOURCE_CONSERVATION_LEVEL 1
|
|
|
|
#endif
|
|
|
|
|
[Cocoa] PERF: Don't instantiate AVPlayer-based audio decoders or renderers if an element is initially muted.
https://bugs.webkit.org/show_bug.cgi?id=216299
Reviewed by Eric Carlson.
Source/WebCore:
When an AVPlayer is created, even if muted, it will still instantiate an audio decoder and renderer if the
AVAsset in the current player item has an audio track. Ostensibly, this is so that an unmute operation is
instantaneous, as it's merely applying a zero gain to the decoded audio. However for web content, there's
many autoplaying, muted <video> elements which may never be un-muted before being destroyed.
Implement a policy where, if an AVPlayer is initially muted, we adopt AVFoundation SPI to forcibly prevent
audio decoding and rendering until the first time the AVPlayer is unmuted. This means the first un-mute may
not be instantaneous, as an audio decoder will have to be created and fed before any audio is rendered.
There's some incorrect caching of mute state at the MediaPlayer level; so MediaPlayer and MPPAVFoundationObjC
can get their respective m_muted states out of sync. Make sure that HTMLMediaElement always sets muted state
after creating a MediaPlayer and that, respectively, MPPAVFoundationObjC always queries it's parent MediaPlayer's
mute state when it in turn is created.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted):
Source/WebCore/PAL:
* pal/spi/cocoa/AVFoundationSPI.h:
Source/WTF:
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/229202@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-10 18:23:51 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_AVPLAYER_SUPRESSES_AUDIO_RENDERING 1
|
|
|
|
#endif
|
|
|
|
|
2020-02-17 21:55:51 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101404)
|
|
|
|
#define HAVE_VIDEO_PERFORMANCE_METRICS 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(COCOA) && !PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_CORETEXT_AUTO_OPTICAL_SIZING 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_NSFONT_WITH_OPTICAL_SIZING_BUG 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500))
|
|
|
|
#define HAVE_APP_SSO 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_TLS_PROTOCOL_VERSION_T 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
|
|
|
|
#define HAVE_SUBVIEWS_IVAR_SPI 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
|
|
|
|
#define HAVE_SUBVIEWS_IVAR_DECLARED_BY_SDK 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
|
|
|
|
#define HAVE_AX_CLIENT_TYPE 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-24 16:32:26 +00:00
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500) && !PLATFORM(MACCATALYST)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_DESIGN_SYSTEM_UI_FONTS 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-02-18 06:32:42 +00:00
|
|
|
#define HAVE_COOKIE_CHANGE_LISTENER_API 1
|
|
|
|
#endif
|
|
|
|
|
2020-01-16 14:47:17 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_DATA_PROTECTION_KEYCHAIN 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR))
|
|
|
|
#define HAVE_NEAR_FIELD 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(COCOA)
|
2020-01-16 14:47:17 +00:00
|
|
|
#define HAVE_OS_SIGNPOST 1
|
|
|
|
#endif
|
2020-01-28 02:07:06 +00:00
|
|
|
|
2020-10-02 09:38:52 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
|
2020-06-08 11:49:15 +00:00
|
|
|
#define HAVE_AVASSETWRITERDELEGATE 1
|
|
|
|
#endif
|
|
|
|
|
2020-10-02 09:38:52 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_AVASSETWRITERDELEGATE_API 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
|
2020-07-22 19:27:05 +00:00
|
|
|
#define HAVE_AVPLAYER_VIDEORANGEOVERRIDE 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
2020-01-28 18:10:49 +00:00
|
|
|
#define HAVE_CG_PATH_UNEVEN_CORNERS_ROUNDEDRECT 1
|
|
|
|
#endif
|
2020-01-30 21:36:37 +00:00
|
|
|
|
|
|
|
#if PLATFORM(WATCHOS) || PLATFORM(APPLETV) || (PLATFORM(IOS_FAMILY) && !(defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)))
|
|
|
|
#define HAVE_NSPROGRESS_PUBLISHING_SPI 1
|
|
|
|
#endif
|
2020-02-10 22:38:22 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
|
|
|
|
#define HAVE_GCEXTENDEDGAMEPAD_BUTTONS_OPTIONS_MENU 1
|
|
|
|
#endif
|
|
|
|
|
2020-05-05 05:51:47 +00:00
|
|
|
#if PLATFORM(COCOA)
|
2020-02-10 22:38:22 +00:00
|
|
|
#define HAVE_GCEXTENDEDGAMEPAD_BUTTONS_THUMBSTICK 1
|
|
|
|
#endif
|
2020-02-13 05:53:32 +00:00
|
|
|
|
2020-07-10 18:51:39 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_MULTIGAMEPADPROVIDER_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
2020-07-23 16:36:15 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_HID_FRAMEWORK 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-07-10 23:34:44 +00:00
|
|
|
#define HAVE_GCEXTENDEDGAMEPAD_HOME_BUTTON 1
|
|
|
|
#endif
|
|
|
|
|
2020-07-23 04:49:02 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000)
|
Resolve race between IOHIDManager and GameController framework.
<rdar://problem/65554490> and https://bugs.webkit.org/show_bug.cgi?id=214245
Reviewed by Tim Horton.
Source/WebCore:
No automated testing available.
IOHIDDevices and IOHIDServices are two separate things.
An IOHIDDevice and IOHIDService often have a 1-to-1 correlation, but the IOHIDDevice might be
published to the application before the IOHIDService is.
WebKit's HID gamepad manager uses IOHIDDevice.
GameController.framework uses IOHIDServices.
When we added the ability for WebKit to switch between HID and GCF, the following happens:
- Sometimes the IOHIDServiceClient will get published first. Then when the IOHIDDevice is published,
and WebKit was deciding which gamepad manager to use, the device's services are available,
and we get the right answer.
- Sometimes, the IOHIDDevice is published first. Then when WebKit is deciding which gamepad
manager to use, it can't check the IOHIDServiceClient against GameController framework.
So we have the HID manager handle the device... but then GCF comes along a split second later
and ALSO handles it.
The "device before service" scenario results in the same gamepad showing up twice.
To resolve this, we do the following:
1 - If an IOHIDDevice attaches and its services aren't available yet, we delay managing it.
2 - When we delay managing a device, we start listening for IOHIDServiceClient additions.
3 - Each time a GamePad service is published, we once again try to determine if GCF will handle
the device.
4 - As long as the answer is "Maybe" - instead of "Yes" or "No" - we refuse to manage the device.
5 - After a brief delay (currently 1 second), we will give up waiting for published services
and manage the device with the HID gamepad provider.
In my testing, when the service publishes after the devices, it's always within 50ms,
(and usually just a spin or two of the runloop) so the 1s delay seems sufficient.
NOTE: The above all holds true with the "MultiGamepadProvider" on Catalina.
On Big Sur, there's brand new GameController framework API that makes this much easier. 👍
* platform/gamepad/mac/HIDGamepadProvider.h:
* platform/gamepad/mac/HIDGamepadProvider.mm:
(WebCore::deviceAddedCallback):
(WebCore::gameControllerFrameworkWillHandleHIDDevice):
(WebCore::HIDGamepadProvider::waitForManagementDecisionForDevice):
(WebCore::HIDGamepadProvider::removeDeviceWaitingForManagementDecision):
(WebCore::HIDGamepadProvider::newGamePadServicePublished):
(WebCore::HIDGamepadProvider::deviceAdded):
(WebCore::HIDGamepadProvider::deviceRemoved):
Source/WebCore/PAL:
* pal/spi/mac/IOKitSPIMac.h:
Source/WTF:
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/227142@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-15 08:00:13 +00:00
|
|
|
#define HAVE_GCCONTROLLER_HID_DEVICE_CHECK 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-03-05 05:26:14 +00:00
|
|
|
#define HAVE_INCREMENTAL_PDF_APIS 1
|
|
|
|
#endif
|
2020-03-06 21:32:45 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-06-04 22:10:18 +00:00
|
|
|
#define HAVE_ALTERNATE_ICONS 1
|
2020-05-14 18:06:05 +00:00
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
|
2020-07-15 22:14:55 +00:00
|
|
|
#define HAVE_LARGE_CONTROL_SIZE 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-10 04:04:06 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_UICONTEXTMENU_LOCATION 1
|
|
|
|
#endif
|
|
|
|
|
2020-12-09 21:42:33 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
2021-08-11 06:57:42 +00:00
|
|
|
|| (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
|
2020-12-09 21:42:33 +00:00
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| PLATFORM(WIN)
|
2020-03-06 21:32:45 +00:00
|
|
|
#define HAVE_SYSTEM_FEATURE_FLAGS 1
|
|
|
|
#endif
|
2020-03-19 05:23:14 +00:00
|
|
|
|
2020-03-20 18:31:38 +00:00
|
|
|
#if PLATFORM(IOS)
|
2020-03-19 05:23:14 +00:00
|
|
|
#define HAVE_AVOBSERVATIONCONTROLLER 1
|
|
|
|
#endif
|
2020-03-20 18:31:38 +00:00
|
|
|
|
|
|
|
// FIXME: Should this be enabled on other iOS-family platforms?
|
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_CANCEL_WEB_TOUCH_EVENTS_GESTURE 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-03-31 03:12:12 +00:00
|
|
|
#define HAVE_DD_HIGHLIGHT_CREATE_WITH_SCALE 1
|
|
|
|
#endif
|
|
|
|
|
2020-03-20 18:31:38 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
|
|
|
|
#define HAVE_UISCENE_BASED_VIEW_SERVICE_STATE_NOTIFICATIONS 1
|
|
|
|
#endif
|
2020-04-08 09:38:51 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_IOS_JIT_RESTRICTIONS 1
|
|
|
|
#endif
|
2020-04-14 22:35:47 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-04-14 22:35:47 +00:00
|
|
|
#define HAVE_AVAUDIO_ROUTING_ARBITER 1
|
|
|
|
#endif
|
2020-04-16 13:36:07 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-04-16 13:36:07 +00:00
|
|
|
#define HAVE_MEDIA_USAGE_FRAMEWORK 1
|
|
|
|
#endif
|
2020-04-21 00:27:46 +00:00
|
|
|
|
2020-06-08 15:34:09 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER 1
|
|
|
|
#endif
|
|
|
|
|
2020-06-17 15:55:49 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_PASSKIT_INSTALLMENTS 1
|
2020-05-19 02:32:50 +00:00
|
|
|
#endif
|
|
|
|
|
2020-06-17 15:55:49 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_PASSKIT_PAYMENT_METHOD_BILLING_ADDRESS 1
|
2020-05-19 02:32:50 +00:00
|
|
|
#endif
|
|
|
|
|
2021-06-08 22:15:18 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#define HAVE_PASSKIT_RECURRING_SUMMARY_ITEM 1
|
|
|
|
#define HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM 1
|
|
|
|
#define HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE 1
|
|
|
|
#define HAVE_PASSKIT_COUPON_CODE 1
|
|
|
|
#define HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE 1
|
[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
|
|
|
#define HAVE_PASSKIT_UPDATE_SHIPPING_METHODS_WHEN_CHANGING_SUMMARY_ITEMS 1
|
2021-06-08 22:15:18 +00:00
|
|
|
#endif
|
|
|
|
|
2020-04-21 04:48:51 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
2020-04-21 00:27:46 +00:00
|
|
|
#define HAVE_QUICKLOOK_THUMBNAILING 1
|
|
|
|
#endif
|
2020-05-20 13:30:42 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-05-20 13:30:42 +00:00
|
|
|
#define HAVE_DISPLAY_LAYER_BIPLANAR_SUPPORT 1
|
|
|
|
#endif
|
REGRESSION (r261812): editing/async-clipboard/clipboard-item-get-type-basic.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=212281
<rdar://problem/63554912>
Reviewed by Tim Horton.
Source/WebKit:
Declare `-delegateSupportsImagePaste` on UIKeyboardImpl.
* Platform/spi/ios/UIKitSPI.h:
Source/WTF:
Add a new `HAVE()` define.
* wtf/PlatformHave.h:
Tools:
On some shipping versions of iOS, returning `NO` from `-supportsImagePaste` still results in UIKit keyboard
code pinning temporary items to the general pasteboard, which increments the change count of the pasteboard.
If this happens in the middle of an attempt to read from the pasteboard, we end up falsely denying access to the
contents of the pasteboard, since we believe that the contents of the pasteboard have changed.
This has the potential to affect any test that attempts to read from the pasteboard on iOS, though the titular
layout test seems to trigger the bug more frequently than other tests.
This item pinning was added in support of being able to insert Memojis from the software keyboard, and works by
pretending to copy a temporary PNG image, asking the delegate whether it `-canPerformAction:withSender:`, and
then restoring the items previously on the pasteboard. To work around this in the test runner, we can simply
swizzle out `-[UIKeyboardImpl delegateSupportsImagePaste]` to always return `NO`, which has the same effect as
disabling the Memoji keyboard.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/ios/TestControllerIOS.mm:
(overrideKeyboardDelegateSupportsImagePaste):
(WTR::TestController::platformResetStateToConsistentValues):
LayoutTests:
Remove the failing test expectation.
* platform/ios-simulator-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/225335@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-29 07:27:03 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
|
|
|
|
#define HAVE_NONDESTRUCTIVE_IMAGE_PASTE_SUPPORT_QUERY 1
|
|
|
|
#endif
|
2020-05-30 01:19:25 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-05-30 01:19:25 +00:00
|
|
|
#define HAVE_LOGGING_PRIVACY_LEVEL 1
|
|
|
|
#endif
|
2020-06-05 19:07:20 +00:00
|
|
|
|
2020-06-09 19:08:20 +00:00
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_FRONTBOARD_SYSTEM_APP_SERVICES 1
|
|
|
|
#endif
|
2020-06-22 21:05:09 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if OS(DARWIN) && CPU(X86_64) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000))
|
2020-06-22 21:05:09 +00:00
|
|
|
#define HAVE_CPU_TRANSLATION_CAPABILITY 1
|
|
|
|
#endif
|
2020-06-23 01:28:17 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000
|
2020-07-01 20:29:58 +00:00
|
|
|
#define HAVE_APP_ACCENT_COLORS 1
|
|
|
|
#endif
|
[Cocoa] Update Launch Services database in the WebContent process from the Network process
https://bugs.webkit.org/show_bug.cgi?id=213794
Reviewed by Brent Fulgham.
Source/WebCore/PAL:
Declare interface for observing and consuming the Launch Services database.
* pal/spi/cocoa/LaunchServicesSPI.h:
Source/WebKit:
To be able to deny mach lookup access to the Launch Services database mapping service in the WebContent process, the database needs to be
sent from the Networking process to the WebContent process, represented by an xpc object. The Networking process is chosen instead of the UI
process, since WebKit is controlling the sandbox of the Networking process. There is already a direct connection between the Networking
process and the WebContent process, but this is a CoreIPC connection. Since the database is represented by an xpc object, an xpc connection
is requiered to transfer the database. This patch creates a direct xpc connection between the Networking process and the WebContent process,
by creating an xpc endpoint in the Networking process, sending this to the UI process over the bootstrap xpc connection, and then providing
each WebContent process with this endpoint by sending it over the bootstrap xpc connection between the UI process and the WebContent process.
This endpoint has to be sent via the xpc connections to the UI process, since the already existing direct connection between the Networking
process and the WebContent process is a lower level CoreIPC connection, which does not support transferring xpc objects like the xpc endpoint.
When the WebContent process receives the endpoint, it will create an xpc connection from the endpoint, which will create a direct connection
with the Networking process. A message is then sent over the connection to request the database xpc object. When the Networking process
receives this message, it checks the entitlement of the remote end to make sure it is communicating with a WebContent process, and then sends
the database if the entitlement check succeeds. When the WebContent process receives this message, it performs an entitlement check as well,
and if successful, the database object is consumed. Consuming this database object, will make sure UTI to MIME type mapping is working
correctly in the WebContent process.
For the UI process to be able to pick up xpc messages on the bootstrap connection, a new virtual method, handleXPCEvent, is added to the
ProcessLauncher Client class. This way, a ProcessLauncher client will be able to pick up xpc messages from the xpc bootstrap connection.
Previously the event handler for the bootstrap connection in the UI process would handle only xpc error messages. It has now been expanded
to handle normal messages, which are being forwarded to the ProcessLauncher client. In this case the client is the Network process proxy,
which will check the message received, and if it turns out to be a message containing an xpc endpoint, the message will be forwarded to
all Web processes. The ProcessLauncher client can be expanded to handle any xpc message, but right not the Network process proxy only
handles the xpc endpoint message. The handleXPCEvent virtual method return a RefPtr to an XPCEventHandler, which is captured in the event
handler of the bootstrap xpc connection.
No new tests, since there already exist tests for this. UTI to MIME type mapping is being used in WebKit and underlying framework, and many
tests would fail if this mapping was not working.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeConnection):
* NetworkProcess/cocoa/LaunchServicesDatabaseObserver.h: Added.
* NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm: Added.
(WebKit::LaunchServicesDatabaseObserver::singleton):
(WebKit::LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver):
(WebKit::LaunchServicesDatabaseObserver::startObserving):
(WebKit::LaunchServicesDatabaseObserver::~LaunchServicesDatabaseObserver):
(WebKit::LaunchServicesDatabaseObserver::xpcEndpointMessageNameKey const):
(WebKit::LaunchServicesDatabaseObserver::xpcEndpointMessageName const):
(WebKit::LaunchServicesDatabaseObserver::xpcEndpointNameKey const):
(WebKit::LaunchServicesDatabaseObserver::handleEvent):
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Scripts/process-entitlements.sh:
* Shared/Cocoa/LaunchServicesDatabaseXPCConstants.h: Added.
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* SourcesCocoa.txt:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::xpcEndpointMessage const):
(WebKit::WebProcessPool::sendNetworkProcessXPCEndpointToWebProcess):
* UIProcess/Cocoa/XPCEventHandler.h: Added.
(WebKit::XPCEventHandler::~XPCEventHandler):
* UIProcess/Launcher/ProcessLauncher.h:
(WebKit::ProcessLauncher::Client::xpcEventHandler const):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxyCocoa.mm: Added.
(WebKit::NetworkProcessProxy::xpcEventHandler const):
(WebKit::NetworkProcessProxy::XPCEventHandler::handleXPCEvent const):
(WebKit::NetworkProcessProxy::XPCEventHandler::XPCEventHandler):
(WebKit::NetworkProcessProxy::XPCEventHandler::~XPCEventHandler):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/LaunchServicesDatabaseManager.h: Added.
* WebProcess/cocoa/LaunchServicesDatabaseManager.mm: Added.
(WebKit::LaunchServicesDatabaseManager::singleton):
(WebKit::LaunchServicesDatabaseManager::handleEvent):
(WebKit::LaunchServicesDatabaseManager::didConnect):
(WebKit::LaunchServicesDatabaseManager::waitForDatabaseUpdate):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::handleXPCEndpointMessages const):
(WebKit::WebProcess::platformInitializeWebProcess):
Source/WTF:
Added HAVE define for determining if the class LSDatabaseContext is present.
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/226950@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-09 17:06:14 +00:00
|
|
|
|
2020-08-06 00:58:34 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-07-21 17:46:28 +00:00
|
|
|
#define HAVE_AVROUTEPICKERVIEW 1
|
|
|
|
#endif
|
[macOS] Datalist dropdown scrollbar position does not match visible region
https://bugs.webkit.org/show_bug.cgi?id=214656
Reviewed by Wenson Hsieh.
Source/WebKit:
Currently, the content insets for the dropdown are set on an NSScrollView's contentView,
rather than the NSScrollView itself. On the latest macOS, this results in accurate state
within the NSScrollView, leading to an inaccurate scrollbar position. To fix, set the
content insets directly on the NSScrollView.
However, on older macOS, setting content insets on the NSScrollView causes the view to start
out slightly scrolled (by a value equal to the top inset). This issue is solved by preserving
the existing behavior (setting insets on the contentView) on older macOS.
Also, set the style of the embedded NSTableView to NSTableViewStyleFullWidth, to ensure the
view respects the insets we specify.
No new tests, as the change is purely visual and affects native UI.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionTableView initWithElementRect:]):
(-[WKDataListSuggestionsController initWithInformation:inView:]):
Source/WTF:
* wtf/PlatformHave.h: Define HAVE_NSTABLEVIEWSTYLE.
Canonical link: https://commits.webkit.org/227515@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-23 19:46:11 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
|
|
|
#define HAVE_NSTABLEVIEWSTYLE 1
|
|
|
|
#endif
|
2020-08-07 20:40:32 +00:00
|
|
|
|
2020-09-23 14:04:20 +00:00
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#define HAVE_AUDIO_OUTPUT_DEVICE_UNIQUE_ID 1
|
|
|
|
#endif
|
|
|
|
|
2020-09-01 18:13:52 +00:00
|
|
|
#if ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_UIKEYBOARDIMPL_SMARTINSERTDELETE_CLASS_METHOD 1
|
|
|
|
#endif
|
|
|
|
|
2020-08-07 20:40:32 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
2020-09-10 15:57:54 +00:00
|
|
|
#define HAVE_CF_PREFS_SET_READ_ONLY 1
|
2020-08-07 20:40:32 +00:00
|
|
|
#define HAVE_CFNETWORK_CNAME_AND_COOKIE_TRANSFORM_SPI 1
|
2020-09-10 15:57:54 +00:00
|
|
|
#define HAVE_CGIMAGESOURCE_WITH_ACCURATE_LOOP_COUNT 1
|
2021-02-16 00:09:40 +00:00
|
|
|
#define HAVE_CGIMAGESOURCE_WITH_SET_ALLOWABLE_TYPES 1
|
2020-09-10 15:57:54 +00:00
|
|
|
#define HAVE_HSTS_STORAGE 1
|
|
|
|
#define HAVE_LSDATABASECONTEXT 1
|
|
|
|
#define HAVE_PRECONNECT_PING 1
|
|
|
|
#define HAVE_WEBP 1
|
2021-02-02 21:54:31 +00:00
|
|
|
#define HAVE_IMAGEIO_FIX_FOR_RADAR_59589723 1
|
2020-08-07 20:40:32 +00:00
|
|
|
#endif
|
2020-09-05 18:21:20 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_CTFONTISSYSTEMUIFONT 1
|
|
|
|
#endif
|
2020-09-07 01:33:30 +00:00
|
|
|
|
|
|
|
#if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500)
|
|
|
|
#define HAVE_CTFONTGETPHYSICALSYMBOLICTRAITS 1
|
|
|
|
#endif
|
2020-09-07 06:19:36 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_CTFONTDESCRIPTOR_CREATE_WITH_TEXT_STYLE_AND_ATTRIBUTES 1
|
|
|
|
#endif
|
Text copied and pasted from Mac Catalyst apps appears larger than expected
https://bugs.webkit.org/show_bug.cgi?id=215971
<rdar://problem/65768907>
Reviewed by Tim Horton.
Source/WebKit:
Various pieces of platform logic in Mac Catalyst depend on the user interface idiom (i.e. Mac or iPad) of the
app, as well as the application-wide "scale factor". In the context of this bug, NSAttributedString to RTF data
conversion methods in `UIFoundation` consult the scale factor of `UIiOSMacIdiomManager` to determine whether to
emit 0 (standard) or 1 (iOS) for the `\cocoatextscaling` attribute. The fact that the web process' scale factor
may be out of sync with the UI process' scale factor leads to copied RTF data in the web process appearing
either larger or smaller than expected, due to an incorrect `NSTextScalingType` value.
To mitigate this (as well as any other issues), we add a mechanism for the UI process to forward the global
scale factor and user interface idiom to the web process inside of the web process creation parameters, and then
use new UIKit SPI to override the scale factor and idiom within the web process.
* Scripts/process-entitlements.sh:
Add a new entitlement needed to use `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
Use `_UIApplicationCatalystUserInterfaceIdiom` and `_UIApplicationCatalystScaleFactor` to grab the global user
interface idiom and scale factor, respectively.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Override the idiom and scale factor in the web process with the idiom and scale factor from the UI process,
using the new SPI `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`. As this function hasn't landed
yet, we soft link the function for now to avoid causing the web process to instantly crash on any builds without
the fix for <rdar://problem/68524148>.
Source/WTF:
Add a new flag to guard the presence of `_UIApplicationCatalystUserInterfaceIdiom`,
`_UIApplicationCatalystScaleFactor`, and `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`.
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/229163@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-09 22:19:10 +00:00
|
|
|
|
2021-01-06 03:24:49 +00:00
|
|
|
#if ((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 HAVE_RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
2021-02-04 00:08:45 +00:00
|
|
|
// FIXME: This should include PLATFORM(MACCATALYST) but our internal bots have not updated enough yet.
|
|
|
|
// Try again when they do. See rdar://problem/73940814
|
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
2021-02-02 20:57:05 +00:00
|
|
|
#define HAVE_UI_EVENT_ATTRIBUTION 1
|
|
|
|
#endif
|
|
|
|
|
2021-01-21 22:55:23 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| ((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 HAVE_NETWORK_LOADER 1
|
2021-06-08 02:25:49 +00:00
|
|
|
#define HAVE_SEC_TRUST_COPY_CERTIFICATE_CHAIN 1
|
2021-01-21 22:55:23 +00:00
|
|
|
#endif
|
|
|
|
|
Text copied and pasted from Mac Catalyst apps appears larger than expected
https://bugs.webkit.org/show_bug.cgi?id=215971
<rdar://problem/65768907>
Reviewed by Tim Horton.
Source/WebKit:
Various pieces of platform logic in Mac Catalyst depend on the user interface idiom (i.e. Mac or iPad) of the
app, as well as the application-wide "scale factor". In the context of this bug, NSAttributedString to RTF data
conversion methods in `UIFoundation` consult the scale factor of `UIiOSMacIdiomManager` to determine whether to
emit 0 (standard) or 1 (iOS) for the `\cocoatextscaling` attribute. The fact that the web process' scale factor
may be out of sync with the UI process' scale factor leads to copied RTF data in the web process appearing
either larger or smaller than expected, due to an incorrect `NSTextScalingType` value.
To mitigate this (as well as any other issues), we add a mechanism for the UI process to forward the global
scale factor and user interface idiom to the web process inside of the web process creation parameters, and then
use new UIKit SPI to override the scale factor and idiom within the web process.
* Scripts/process-entitlements.sh:
Add a new entitlement needed to use `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
Use `_UIApplicationCatalystUserInterfaceIdiom` and `_UIApplicationCatalystScaleFactor` to grab the global user
interface idiom and scale factor, respectively.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Override the idiom and scale factor in the web process with the idiom and scale factor from the UI process,
using the new SPI `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`. As this function hasn't landed
yet, we soft link the function for now to avoid causing the web process to instantly crash on any builds without
the fix for <rdar://problem/68524148>.
Source/WTF:
Add a new flag to guard the presence of `_UIApplicationCatalystUserInterfaceIdiom`,
`_UIApplicationCatalystScaleFactor`, and `_UIApplicationCatalystRequestViewServiceIdiomAndScaleFactor`.
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/229163@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-09 22:19:10 +00:00
|
|
|
#if PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
|
|
|
|
#define HAVE_CATALYST_USER_INTERFACE_IDIOM_AND_SCALE_FACTOR 1
|
|
|
|
#endif
|
2020-10-07 20:56:13 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
|
|
|
|
#define HAVE_PENCILKIT_TEXT_INPUT 1
|
|
|
|
#endif
|
2020-10-16 07:52:45 +00:00
|
|
|
|
2021-05-12 03:55:46 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
|
|
|
|
#define HAVE_STYLUS_DEVICE_OBSERVATION 1
|
|
|
|
#endif
|
|
|
|
|
2020-10-16 07:52:45 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000 || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
|
|
|
#if !defined(HAVE_APPLE_ATTESTATION)
|
|
|
|
#define HAVE_APPLE_ATTESTATION 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-10-30 22:59:11 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140300
|
|
|
|
#if !defined(HAVE_AVSPEECHSYNTHESIS_SYSTEMVOICE)
|
|
|
|
#define HAVE_AVSPEECHSYNTHESIS_SYSTEMVOICE 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-11-03 23:58:46 +00:00
|
|
|
|
2021-07-29 19:54:30 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
|
|
|
|
#if !defined(HAVE_SPEECHSYNTHESIS_MONTEREY_SPI)
|
|
|
|
#define HAVE_SPEECHSYNTHESIS_MONTEREY_SPI 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-11-03 23:58:46 +00:00
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#if !defined(HAVE_CG_CONTEXT_DRAW_PATH_DIRECT)
|
|
|
|
#define HAVE_CG_CONTEXT_DRAW_PATH_DIRECT 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-11-04 22:36:46 +00:00
|
|
|
|
|
|
|
#if PLATFORM(COCOA) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
|
|
|
#define HAVE_CONTACTSUI 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
|
|
|
#define HAVE_CNCONTACTPICKERVIEWCONTROLLER 1
|
|
|
|
#endif
|
2020-11-10 21:17:29 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_AVOUTPUTDEVICE_SPATIALAUDIO 1
|
|
|
|
#endif
|
2020-11-14 02:16:49 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
|
|
|
|
#define HAVE_SPEECHRECOGNIZER 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST) || PLATFORM(MAC)
|
|
|
|
#define HAVE_AVCAPTUREDEVICE 1
|
|
|
|
#endif
|
2020-11-16 19:52:43 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 110000 && defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
|
|
|
|
#define HAVE_SANDBOX_MESSAGE_FILTERING 1
|
|
|
|
#endif
|
2020-11-17 14:07:00 +00:00
|
|
|
|
2020-11-17 23:51:11 +00:00
|
|
|
#if (PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
2020-11-17 15:31:47 +00:00
|
|
|
#define HAVE_COREVIDEO_COMPRESSED_PIXEL_FORMAT_TYPES 1
|
2020-11-17 14:07:00 +00:00
|
|
|
#endif
|
2020-12-03 21:14:53 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY)
|
|
|
|
#define HAVE_APPLE_LOW_POWER_MODE_SUPPORT 1
|
|
|
|
#endif
|
2020-12-04 20:10:22 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110200) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140400) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 70300) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 140400)
|
|
|
|
#define HAVE_LIBXSLT_FIX_FOR_RADAR_71864140 1
|
|
|
|
#endif
|
2020-12-10 11:26:15 +00:00
|
|
|
|
2021-04-01 18:09:13 +00:00
|
|
|
#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140400)
|
2020-12-10 11:26:15 +00:00
|
|
|
#define HAVE_ASC_AUTH_UI 1
|
|
|
|
#endif
|
2020-12-11 05:21:26 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC)
|
|
|
|
#if !defined(HAVE_MT_PLUGIN_FORMAT_READER)
|
|
|
|
#define HAVE_MT_PLUGIN_FORMAT_READER 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-12-14 03:38:59 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
|
|
|
|
#if !defined(HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON)
|
|
|
|
#define HAVE_MT_PLUGIN_SAMPLE_CURSOR_PLAYABLE_HORIZON 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2020-12-16 00:01:59 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110200) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140400)
|
|
|
|
#define HAVE_AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS 1
|
|
|
|
#endif
|
[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>
Reviewed by Tim Horton.
Source/WebKit:
Starting in Big Sur, NSWindows with a titlebar display a separator if
there is a scrolled NSScrollView adjacent to the titlebar. Since
WKWebViews are scrollable views, but not backed by NSScrollView, we
need to adopt SPI to support this functionality.
This patch updates WKWebView to conform to the NSScrollViewSeparatorTrackingAdapter
protocol, ensuring the titlebar separator is displayed when
necessary. Note that since WKWebViews are not actually NSScrollView's we
don't already have the scroll position of the view in the UIProcess. To
determine whether or not the view is scrolled, this patch adds plumbing
so that the WebProcess can tell the UIProcess the new scroll position
when a page is scrolled.
Tests: WKWebViewTitlebarSeparatorTests.BackForwardCache
WKWebViewTitlebarSeparatorTests.ChangeTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ChangeViewVisibility
WKWebViewTitlebarSeparatorTests.NavigationResetsTitlebarAppearance
WKWebViewTitlebarSeparatorTests.ScrollWithTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ScrollWithoutTitlebarAdjacency
* Platform/spi/mac/AppKitSPI.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollViewFrame]):
(-[WKView hasScrolledContentsUnderTitlebar]):
(-[WKView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKView _web_unregisterScrollViewSeparatorTrackingAdapter]):
* UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView scrollViewFrame]):
(-[WKWebView hasScrolledContentsUnderTitlebar]):
(-[WKWebView _web_registerScrollViewSeparatorTrackingAdapter]):
(-[WKWebView _web_unregisterScrollViewSeparatorTrackingAdapter]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateWindowAndViewFrames):
If the WKWebView's frame changes, update the titlebar adjacency
state and notify observers of the change.
(WebKit::WebViewImpl::viewWillMoveToWindowImpl):
Unregister the WKWebView as an NSScrollViewSeparatorTrackingAdapter if
it is removed from the window.
(WebKit::WebViewImpl::viewDidHide):
Hidden views are not adjacent to the titlebar.
(WebKit::WebViewImpl::viewDidUnhide):
An unhidden view may be adjacent to the titlebar.
(WebKit::WebViewImpl::pageDidScroll):
Use the scroll position of the page to determine whether or not the
WKWebView is scrolled.
(WebKit::WebViewImpl::scrollViewFrame):
Needed to conform to NSScrollViewSeparatorTrackingAdapter.
(WebKit::WebViewImpl::hasScrolledContentsUnderTitlebar):
Needed to conform to NSScrollViewSeparatorTrackingAdapter. Returns true
if the view is registered as an NSScrollViewSeparatorTrackingAdapter
and is scrolled.
(WebKit::WebViewImpl::updateTitlebarAdjacencyState):
The WKWebView needs to be registered as an NSScrollViewSeparatorTrackingAdapter
if it's adjacent to the titlebar and unregistered otherwise.
* UIProcess/PageClient.h:
(WebKit::PageClient::pageDidScroll):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
Reset the scroll position upon navigation, as pageDidScroll does not get
called when navigating.
(WebKit::PageClientImpl::pageDidScroll):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pageDidScroll):
Pass the current scroll position when the page is scrolled, so that the
UIProcess knows whether or not the page has a non-zero scroll position.
Source/WTF:
* wtf/PlatformHave.h: Defined HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER.
Tools:
Added API tests to verify that the delegate implementation returns the
correct value for `hasScrolledContentsUnderTitlebar` depending on
the view's scroll position, visibility, and frame.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
* TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added.
(-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]):
(-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]):
(BackForwardCache):
(ChangeTitlebarAdjacency):
(ChangeViewVisibility):
(NavigationResetsTitlebarAppearance):
(ScrollWithTitlebarAdjacency):
(ScrollWithoutTitlebarAdjacency):
Canonical link: https://commits.webkit.org/233200@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-21 15:47:16 +00:00
|
|
|
|
2021-01-21 18:39:58 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
2021-01-22 00:15:45 +00:00
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
|
2021-01-21 18:39:58 +00:00
|
|
|
#if !defined(HAVE_CORE_ANIMATION_SEPARATED_LAYERS)
|
|
|
|
#define HAVE_CORE_ANIMATION_SEPARATED_LAYERS 1
|
2021-05-28 18:54:27 +00:00
|
|
|
#define HAVE_CORE_ANIMATION_SEPARATED_PORTALS 1
|
2021-01-21 18:39:58 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2021-01-29 20:19:59 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| ((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 HAVE_LEVEL_3_SYSTEM_FONT_WIDTH_VALUES 1
|
|
|
|
#elif (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_LEVEL_2_SYSTEM_FONT_WIDTH_VALUES 1
|
|
|
|
#endif
|
2021-02-02 03:23:38 +00:00
|
|
|
|
|
|
|
#if __has_include(<AVFoundation/AVPlayerInterstitialEventController.h>)
|
|
|
|
#if !defined(HAVE_AVFOUNDATION_INTERSTITIAL_EVENTS)
|
|
|
|
#define HAVE_AVFOUNDATION_INTERSTITIAL_EVENTS 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2021-02-10 19:58:12 +00:00
|
|
|
|
|
|
|
#if PLATFORM(WATCHOS)
|
|
|
|
#define HAVE_PEPPER_UI_CORE 1
|
|
|
|
#endif
|
2021-02-11 17:43:57 +00:00
|
|
|
|
2021-06-12 21:45:31 +00:00
|
|
|
#if PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000
|
|
|
|
#define HAVE_QUICKBOARD_CONTROLLER 1
|
|
|
|
#define HAVE_PUIC_BUTTON_TYPE_PILL 1
|
|
|
|
#endif
|
|
|
|
|
2021-02-11 17:43:57 +00:00
|
|
|
#if PLATFORM(COCOA)
|
|
|
|
#define HAVE_CORE_GRAPHICS_ADOBE_RGB_1998_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_DISPLAY_P3_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_EXTENDED_SRGB_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_ITUR_2020_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_LINEAR_SRGB_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_ROMMRGB_COLOR_SPACE 1
|
|
|
|
#define HAVE_CORE_GRAPHICS_XYZ_COLOR_SPACE 1
|
|
|
|
#endif
|
2021-02-17 16:16:20 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
|
|
|
|
#define HAVE_STATIC_FONT_REGISTRY 1
|
2021-03-13 09:03:04 +00:00
|
|
|
#define HAVE_DATA_DETECTORS_MAC_ACTION 1
|
[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>
Reviewed by Darin Adler.
Source/WebKit:
Starting in Big Sur, NSWindows with a titlebar display a separator if
there is a scrolled NSScrollView adjacent to the titlebar. Since
WKWebViews are scrollable views, but not backed by NSScrollView, we
need to adopt SPI to support this functionality.
This patch updates WKWebView to conform to the NSScrollViewSeparatorTrackingAdapter
protocol, ensuring the titlebar separator is displayed when
necessary. Note that since WKWebViews are not actually NSScrollView's we
don't already have the scroll position of the view in the UIProcess. To
determine whether or not the view is scrolled, this patch adds plumbing
so that the WebProcess can tell the UIProcess the new scroll position
when a page is scrolled.
Tests: WKWebViewTitlebarSeparatorTests.BackForwardCache
WKWebViewTitlebarSeparatorTests.ChangeTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ChangeViewVisibility
WKWebViewTitlebarSeparatorTests.NavigationResetsTitlebarAppearance
WKWebViewTitlebarSeparatorTests.ParentWhileScrolled
WKWebViewTitlebarSeparatorTests.ScrollWithTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ScrollWithoutTitlebarAdjacency
* Platform/spi/mac/AppKitSPI.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollViewFrame]):
(-[WKView hasScrolledContentsUnderTitlebar]):
* UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView scrollViewFrame]):
(-[WKWebView hasScrolledContentsUnderTitlebar]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateWindowAndViewFrames):
If the WKWebView's frame changes, update the titlebar adjacency
state and notify observers of the change.
(WebKit::WebViewImpl::viewWillMoveToWindowImpl):
Unregister the WKWebView as an NSScrollViewSeparatorTrackingAdapter if
it is removed from the window.
(WebKit::WebViewImpl::viewDidHide):
Hidden views are not adjacent to the titlebar.
(WebKit::WebViewImpl::viewDidUnhide):
An unhidden view may be adjacent to the titlebar.
(WebKit::WebViewImpl::pageDidScroll):
Use the scroll position of the page to determine whether or not the
WKWebView is scrolled.
(WebKit::WebViewImpl::scrollViewFrame):
Needed to conform to NSScrollViewSeparatorTrackingAdapter.
(WebKit::WebViewImpl::hasScrolledContentsUnderTitlebar):
Needed to conform to NSScrollViewSeparatorTrackingAdapter. Returns true
if the view is registered as an NSScrollViewSeparatorTrackingAdapter
and is scrolled.
(WebKit::WebViewImpl::updateTitlebarAdjacencyState):
The WKWebView needs to be registered as an NSScrollViewSeparatorTrackingAdapter
if it's adjacent to the titlebar and unregistered otherwise.
* UIProcess/PageClient.h:
(WebKit::PageClient::pageDidScroll):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
Reset the scroll position upon navigation, as pageDidScroll does not get
called when navigating.
(WebKit::PageClientImpl::pageDidScroll):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pageDidScroll):
Pass the current scroll position when the page is scrolled, so that the
UIProcess knows whether or not the page has a non-zero scroll position.
Source/WTF:
* wtf/PlatformHave.h: Defined HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER.
Tools:
Added API tests to verify that the delegate implementation returns the
correct value for `hasScrolledContentsUnderTitlebar` depending on
the view's scroll position, visibility, and frame.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
* TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added.
(-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]):
(-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]):
(BackForwardCache):
(ChangeTitlebarAdjacency):
(ChangeViewVisibility):
(NavigationResetsTitlebarAppearance):
(ParentWhileScrolled):
(ScrollWithTitlebarAdjacency):
(ScrollWithoutTitlebarAdjacency):
Canonical link: https://commits.webkit.org/237884@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-18 23:15:23 +00:00
|
|
|
#define HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER 1
|
2021-02-17 16:16:20 +00:00
|
|
|
#endif
|
2021-02-19 23:15:22 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#define HAVE_RSA_BSSA 1
|
|
|
|
#endif
|
2021-02-20 00:51:03 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
|
|
|
|
#define HAVE_PASTEBOARD_ITEM_PROVIDERS 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_PASTEBOARD_PRESENTATION_STYLE_AND_TEAM_DATA 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_NSURL_TITLE 1
|
|
|
|
#endif
|
2021-03-03 21:04:47 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_PDFKIT 1
|
|
|
|
#endif
|
2021-03-12 05:43:53 +00:00
|
|
|
|
2021-03-18 06:06:13 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300) \
|
2021-03-12 05:43:53 +00:00
|
|
|
|| (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140500) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 140500) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 70400)
|
|
|
|
#define HAVE_VM_FLAGS_PERMANENT 1
|
|
|
|
#endif
|
2021-03-17 19:10:06 +00:00
|
|
|
|
2021-06-18 04:09:24 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101600) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000)
|
|
|
|
#define HAVE_VIDEO_RESTRICTED_DECODING 1
|
|
|
|
#endif
|
|
|
|
|
2021-03-17 19:10:06 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#define HAVE_CFNETWORK_NSURLSESSION_ATTRIBUTED_BUNDLE_IDENTIFIER 1
|
2021-05-17 21:26:59 +00:00
|
|
|
#define HAVE_AUDIO_OBJECT_PROPERTY_ELEMENT_MAIN 1
|
2021-06-18 04:09:24 +00:00
|
|
|
#define HAVE_IMAGE_RESTRICTED_DECODING 1
|
2021-03-17 19:10:06 +00:00
|
|
|
#endif
|
2021-04-21 01:05:30 +00:00
|
|
|
|
2021-06-27 08:55:52 +00:00
|
|
|
#if defined __has_include && __has_include(<AssetViewer/ASVInlinePreview.h>)
|
2021-06-30 10:19:03 +00:00
|
|
|
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && !PLATFORM(IOS_SIMULATOR) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
2021-06-27 08:55:52 +00:00
|
|
|
#define HAVE_ARKIT_INLINE_PREVIEW_IOS 1
|
|
|
|
#endif
|
[Model] [macOS] Add support for rendering model resources
https://bugs.webkit.org/show_bug.cgi?id=227530
<rdar://problem/79968206>
Reviewed by Dean Jackson.
Source/WebCore:
On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.
On the WebCore side, in the WebProcess, after writing the model resource as a file to disk, we create an instance when a
<model> element is created and message the UIProcess through the ChromeClient providing the UUID generated for it. When
the UIProcess is done processing this message, it will reply with another message which calls into
HTMLModelElement::inlinePreviewDidObtainContextId() with the matching UUID and a context ID for the remote context.
We can then set that remote context ID on our ASVInlinePreview instance.
We also introduce a HTMLModelElement::platformLayer() method such that RenderLayerBacking::updateConfiguration() can call
it to host the ASVInlinePreview layer.
* Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::~HTMLModelElement):
(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::notifyFinished):
* Modules/model-element/HTMLModelElement.h:
* Modules/model-element/HTMLModelElementCocoa.mm: Added.
(WebCore::HTMLModelElement::createFile):
(WebCore::HTMLModelElement::clearFile):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::inlinePreviewDidObtainContextId):
(WebCore::HTMLModelElement::platformLayer const):
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::modelElementDidCreatePreview const):
* loader/EmptyClients.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::modelElementDidCreatePreview const):
* platform/Logging.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Source/WebCore/PAL:
Declare the ASVInlinePreview class for macOS.
* PAL.xcodeproj/project.pbxproj:
* pal/spi/mac/SystemPreviewSPI.h: Added.
Source/WebKit:
On macOS, ASVInlinePreview requires an instance in both the WebProcess and the UIProcess to exist with a matching UUID.
On the WebKit side, in the UIProcess, we receive a message from the WebProcess when the ASVInlinePreview in that process
was created with its generated UUID. We provide this to the ModelElementController, set the remote connection up and load
the file. When those tasks complete successfully we message back the WebProcess with the UUID and the provided ElementContext
to talk back to the HTMLModelElement instance that initiated the message to the UIProcess in the first place.
* UIProcess/Cocoa/ModelElementControllerCocoa.mm:
(WebKit::ModelElementController::modelElementDidCreatePreview):
* UIProcess/ModelElementController.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::modelElementDidCreatePreview):
(WebKit::WebPageProxy::modelElementPreviewDidObtainContextId):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::modelElementDidCreatePreview const):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::modelElementDidCreatePreview):
(WebKit::WebPage::modelElementPreviewDidObtainContextId):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Source/WTF:
Add a new compile-time flag indicating the availability of the ASVInlinePreview SPI on macOS.
We only define it when the header itself is present for now to avoid issues with older macOS
12 SDKs, but ultimately we will only use the macOS version check.
* wtf/PlatformHave.h:
Canonical link: https://commits.webkit.org/239307@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-01 06:32:12 +00:00
|
|
|
|
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
|
|
|
|
#define HAVE_ARKIT_INLINE_PREVIEW_MAC 1
|
|
|
|
#endif
|
2021-07-01 19:37:13 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_ARKIT_INLINE_PREVIEW_IOS) || defined(HAVE_ARKIT_INLINE_PREVIEW_MAC)
|
|
|
|
#define HAVE_ARKIT_INLINE_PREVIEW 1
|
|
|
|
#endif
|
2021-06-27 08:55:52 +00:00
|
|
|
#endif
|
|
|
|
|
2021-04-21 01:05:30 +00:00
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
|
|
|
#define HAVE_NSURLPROTOCOL_WITH_SKIPAPPSSO 1
|
|
|
|
#endif
|
2021-04-21 22:59:11 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
|
|
|
#define HAVE_UICONTEXTMENU_STYLE_CUSTOM_PRESENTATION 1
|
|
|
|
#define HAVE_UIDATEPICKER_INSETS 1
|
2021-08-19 23:13:51 +00:00
|
|
|
#define HAVE_UIDATEPICKER_OVERLAY_PRESENTATION 1
|
2021-07-01 18:34:39 +00:00
|
|
|
#define HAVE_UIMENUOPTIONS_SINGLE_SELECTION 1
|
2021-04-21 22:59:11 +00:00
|
|
|
#endif
|
2021-04-22 18:05:23 +00:00
|
|
|
|
2021-06-10 23:10:49 +00:00
|
|
|
#if (((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
|
|
|
|
|| (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000))
|
2021-07-12 23:07:14 +00:00
|
|
|
#define HAVE_UPDATE_WEB_ACCESSIBILITY_SETTINGS 1
|
2021-06-10 23:10:49 +00:00
|
|
|
#endif
|
|
|
|
|
2021-04-22 18:05:23 +00:00
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_UIBLUREFFECT_STYLE_SYSTEM_MATERIAL 1
|
|
|
|
#endif
|
2021-05-12 00:05:49 +00:00
|
|
|
|
2021-05-27 06:42:52 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 70000) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 140000) \
|
|
|
|
|| (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000))
|
|
|
|
#define HAVE_CORE_TEXT_SBIX_IMAGE_SIZE_FUNCTIONS 1
|
2021-05-12 00:05:49 +00:00
|
|
|
#endif
|
2021-06-11 20:44:21 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
|
|
|
|
|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
|
|
|
|
#if !defined(HAVE_VK_IMAGE_ANALYSIS)
|
|
|
|
#define HAVE_VK_IMAGE_ANALYSIS 1
|
|
|
|
#endif
|
|
|
|
#endif
|
2021-06-14 09:28:55 +00:00
|
|
|
|
2021-08-02 21:39:02 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
|
|
|
#if !defined(HAVE_VK_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES)
|
|
|
|
#define HAVE_VK_IMAGE_ANALYSIS_FOR_MACHINE_READABLE_CODES 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2021-06-14 09:28:55 +00:00
|
|
|
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
|
|
|
#define HAVE_PER_APP_ACCESSIBILITY_PREFERENCES 1
|
|
|
|
#endif
|
2021-06-15 16:46:14 +00:00
|
|
|
|
|
|
|
#if (PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
|
|
|
|
#define HAVE_PAC_SHARED_REGION_ID 1
|
|
|
|
#endif
|
2021-06-20 23:22:06 +00:00
|
|
|
|
|
|
|
#if !defined(HAVE_QUICKLOOK_PREVIEW_ITEM_DATA_PROVIDER) \
|
|
|
|
&& (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000)
|
|
|
|
#define HAVE_QUICKLOOK_PREVIEW_ITEM_DATA_PROVIDER 1
|
|
|
|
#define HAVE_QUICKLOOK_ITEM_PREVIEW_OPTIONS 1
|
|
|
|
#define HAVE_QUICKLOOK_PREVIEW_ACTIVITY 1
|
|
|
|
#endif
|
2021-06-23 20:02:35 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
|
|
|
|
#define HAVE_UITOOLBAR_STANDARD_APPEARANCE 1
|
|
|
|
#endif
|
2021-06-23 20:27:12 +00:00
|
|
|
|
|
|
|
#if !PLATFORM(IOS_FAMILY_SIMULATOR) && !PLATFORM(WATCHOS)
|
|
|
|
#define HAVE_SYMPTOMS_FRAMEWORK 1
|
|
|
|
#endif
|
2021-07-01 07:07:49 +00:00
|
|
|
|
|
|
|
#if !defined(HAVE_GROUP_ACTIVITIES) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
|
|
|
|
#define HAVE_GROUP_ACTIVITIES 1
|
|
|
|
#endif
|
2021-07-02 23:21:00 +00:00
|
|
|
|
|
|
|
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000)
|
|
|
|
#define HAVE_WEBGL_COMPATIBLE_METAL 1
|
|
|
|
#endif
|
2021-07-09 16:46:05 +00:00
|
|
|
|
2021-07-26 22:07:20 +00:00
|
|
|
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000
|
|
|
|
#define HAVE_CMPHOTO_TILE_DECODER_AVAILABLE 1
|
|
|
|
#endif
|
|
|
|
|
2021-07-09 16:46:05 +00:00
|
|
|
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300 \
|
|
|
|
|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140500) \
|
|
|
|
|| (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 70400) \
|
|
|
|
|| (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 140500) \
|
|
|
|
|| (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140500))
|
|
|
|
#define HAVE_AVSAMPLEBUFFERRENDERSYNCHRONIZER_RATEATHOSTTIME 1
|
|
|
|
#endif
|
2021-07-14 22:56:48 +00:00
|
|
|
|
2021-07-29 20:43:17 +00:00
|
|
|
#if (PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000
|
2021-07-14 22:56:48 +00:00
|
|
|
#define HAVE_SYSTEM_STATUS 1
|
|
|
|
#endif
|