2019-01-05 01:12:19 +00:00
|
|
|
find_library(ACCELERATE_LIBRARY Accelerate)
|
2016-05-25 19:49:46 +00:00
|
|
|
find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
|
2016-03-27 01:05:12 +00:00
|
|
|
find_library(AVFOUNDATION_LIBRARY AVFoundation)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
|
|
|
|
find_library(AUDIOUNIT_LIBRARY AudioUnit)
|
|
|
|
find_library(CARBON_LIBRARY Carbon)
|
2017-10-05 02:57:01 +00:00
|
|
|
find_library(CFNETWORK_LIBRARY CFNetwork)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(COCOA_LIBRARY Cocoa)
|
2019-10-31 22:45:05 +00:00
|
|
|
find_library(COMPRESSION_LIBRARY Compression)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(COREAUDIO_LIBRARY CoreAudio)
|
2021-04-06 03:19:14 +00:00
|
|
|
find_library(COREMEDIA_LIBRARY CoreMedia)
|
2017-09-15 19:53:01 +00:00
|
|
|
find_library(CORESERVICES_LIBRARY CoreServices)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(DISKARBITRATION_LIBRARY DiskArbitration)
|
|
|
|
find_library(IOKIT_LIBRARY IOKit)
|
|
|
|
find_library(IOSURFACE_LIBRARY IOSurface)
|
2017-03-10 03:43:10 +00:00
|
|
|
find_library(METAL_LIBRARY Metal)
|
2021-04-06 03:19:14 +00:00
|
|
|
find_library(NETWORKEXTENSION_LIBRARY NetworkExtension)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(OPENGL_LIBRARY OpenGL)
|
|
|
|
find_library(QUARTZ_LIBRARY Quartz)
|
|
|
|
find_library(QUARTZCORE_LIBRARY QuartzCore)
|
|
|
|
find_library(SECURITY_LIBRARY Security)
|
|
|
|
find_library(SYSTEMCONFIGURATION_LIBRARY SystemConfiguration)
|
2021-04-06 03:19:14 +00:00
|
|
|
find_library(VIDEOTOOLBOX_LIBRARY VideoToolbox)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_library(XML2_LIBRARY XML2)
|
2021-04-06 03:19:14 +00:00
|
|
|
|
|
|
|
find_package(SQLite3 REQUIRED)
|
2015-10-30 04:14:34 +00:00
|
|
|
find_package(ZLIB REQUIRED)
|
|
|
|
|
2017-10-18 19:14:51 +00:00
|
|
|
list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
|
|
|
|
"SourcesCocoa.txt"
|
|
|
|
)
|
|
|
|
|
2015-10-30 04:14:34 +00:00
|
|
|
list(APPEND WebCore_LIBRARIES
|
2019-01-05 01:12:19 +00:00
|
|
|
${ACCELERATE_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${AUDIOTOOLBOX_LIBRARY}
|
|
|
|
${AUDIOUNIT_LIBRARY}
|
2016-03-27 01:05:12 +00:00
|
|
|
${AVFOUNDATION_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${CARBON_LIBRARY}
|
2017-10-05 02:57:01 +00:00
|
|
|
${CFNETWORK_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${COCOA_LIBRARY}
|
2019-10-31 22:45:05 +00:00
|
|
|
${COMPRESSION_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${COREAUDIO_LIBRARY}
|
2021-04-06 03:19:14 +00:00
|
|
|
${COREMEDIA_LIBRARY}
|
2017-09-15 19:53:01 +00:00
|
|
|
${CORESERVICES_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${DISKARBITRATION_LIBRARY}
|
|
|
|
${IOKIT_LIBRARY}
|
|
|
|
${IOSURFACE_LIBRARY}
|
2017-03-10 03:43:10 +00:00
|
|
|
${METAL_LIBRARY}
|
2021-04-06 03:19:14 +00:00
|
|
|
${NETWORKEXTENSION_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${OPENGL_LIBRARY}
|
|
|
|
${QUARTZ_LIBRARY}
|
|
|
|
${QUARTZCORE_LIBRARY}
|
|
|
|
${SECURITY_LIBRARY}
|
2020-02-04 23:36:21 +00:00
|
|
|
${SQLITE3_LIBRARIES}
|
2015-10-30 04:14:34 +00:00
|
|
|
${SYSTEMCONFIGURATION_LIBRARY}
|
2021-04-06 03:19:14 +00:00
|
|
|
${VIDEOTOOLBOX_LIBRARY}
|
2015-10-30 04:14:34 +00:00
|
|
|
${XML2_LIBRARY}
|
2021-04-06 03:19:14 +00:00
|
|
|
opus
|
|
|
|
usrsctp
|
|
|
|
vpx
|
|
|
|
webm
|
|
|
|
yuv
|
2015-10-30 04:14:34 +00:00
|
|
|
)
|
|
|
|
|
2016-05-25 19:49:46 +00:00
|
|
|
add_definitions(-iframework ${APPLICATIONSERVICES_LIBRARY}/Versions/Current/Frameworks)
|
2016-10-15 00:11:24 +00:00
|
|
|
add_definitions(-iframework ${AVFOUNDATION_LIBRARY}/Versions/Current/Frameworks)
|
|
|
|
add_definitions(-iframework ${CARBON_LIBRARY}/Versions/Current/Frameworks)
|
2017-09-15 19:53:01 +00:00
|
|
|
add_definitions(-iframework ${CORESERVICES_LIBRARY}/Versions/Current/Frameworks)
|
2016-10-15 00:11:24 +00:00
|
|
|
add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
find_library(COREUI_FRAMEWORK CoreUI HINTS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
|
2019-01-05 01:12:19 +00:00
|
|
|
if (NOT COREUI_FRAMEWORK-NOTFOUND)
|
|
|
|
list(APPEND WebCore_LIBRARIES ${COREUI_FRAMEWORK})
|
|
|
|
endif ()
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
find_library(DATADETECTORSCORE_FRAMEWORK DataDetectorsCore HINTS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
|
2015-09-25 22:04:32 +00:00
|
|
|
if (NOT DATADETECTORSCORE_FRAMEWORK-NOTFOUND)
|
|
|
|
list(APPEND WebCore_LIBRARIES ${DATADETECTORSCORE_FRAMEWORK})
|
|
|
|
endif ()
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
find_library(LOOKUP_FRAMEWORK Lookup HINTS ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks)
|
2015-09-25 22:04:32 +00:00
|
|
|
if (NOT LOOKUP_FRAMEWORK-NOTFOUND)
|
|
|
|
list(APPEND WebCore_LIBRARIES ${LOOKUP_FRAMEWORK})
|
|
|
|
endif ()
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
|
2021-04-06 03:19:14 +00:00
|
|
|
"${CMAKE_BINARY_DIR}/libwebrtc/PrivateHeaders"
|
|
|
|
"${CMAKE_SOURCE_DIR}/Source/ThirdParty/libwebrtc/Source"
|
2019-10-31 22:45:05 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/webauthn/apdu"
|
2019-06-05 21:11:39 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/webgpu/WHLSL/Metal"
|
2020-01-27 21:31:01 +00:00
|
|
|
"${WEBCORE_DIR}/accessibility/isolatedtree/mac"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/accessibility/mac"
|
2014-08-08 18:13:54 +00:00
|
|
|
"${WEBCORE_DIR}/bridge/objc"
|
2019-10-31 22:45:05 +00:00
|
|
|
"${WEBCORE_DIR}/crypto/mac"
|
2015-04-15 22:45:51 +00:00
|
|
|
"${WEBCORE_DIR}/editing/cocoa"
|
2017-09-26 05:26:34 +00:00
|
|
|
"${WEBCORE_DIR}/editing/ios"
|
2015-03-17 00:29:55 +00:00
|
|
|
"${WEBCORE_DIR}/editing/mac"
|
2017-11-29 21:31:07 +00:00
|
|
|
"${WEBCORE_DIR}/html/shadow/cocoa"
|
2019-10-31 22:45:05 +00:00
|
|
|
"${WEBCORE_DIR}/layout/tableformatting"
|
2014-08-08 18:13:54 +00:00
|
|
|
"${WEBCORE_DIR}/loader/archive/cf"
|
|
|
|
"${WEBCORE_DIR}/loader/cf"
|
2014-08-13 22:53:12 +00:00
|
|
|
"${WEBCORE_DIR}/loader/mac"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/page/cocoa"
|
|
|
|
"${WEBCORE_DIR}/page/mac"
|
2019-06-05 21:11:39 +00:00
|
|
|
"${WEBCORE_DIR}/page/scrolling/cocoa"
|
2015-09-14 21:22:46 +00:00
|
|
|
"${WEBCORE_DIR}/page/scrolling/mac"
|
2019-10-31 03:06:31 +00:00
|
|
|
"${WEBCORE_DIR}/platform/audio/cocoa"
|
2015-03-26 22:53:46 +00:00
|
|
|
"${WEBCORE_DIR}/platform/audio/mac"
|
2014-08-08 18:13:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/cf"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/cocoa"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/platform/gamepad/cocoa"
|
|
|
|
"${WEBCORE_DIR}/platform/graphics/angle"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/avfoundation"
|
|
|
|
"${WEBCORE_DIR}/platform/graphics/avfoundation/cf"
|
|
|
|
"${WEBCORE_DIR}/platform/graphics/avfoundation/objc"
|
|
|
|
"${WEBCORE_DIR}/platform/graphics/ca"
|
2015-09-14 21:22:46 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/ca/cocoa"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/cocoa"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/coreimage"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/cg"
|
2016-03-01 11:17:19 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/cv"
|
2017-03-07 22:23:33 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/gpu"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/gpu/cocoa"
|
2018-12-27 16:13:47 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/gpu/legacy"
|
2016-12-23 00:32:25 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/egl"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/opentype"
|
2015-03-26 22:53:46 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/opengl"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/platform/graphics/mac"
|
2015-03-14 02:57:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/mac"
|
2018-08-05 09:26:00 +00:00
|
|
|
"${WEBCORE_DIR}/platform/mediacapabilities"
|
2019-10-31 22:45:05 +00:00
|
|
|
"${WEBCORE_DIR}/platform/mediarecorder/cocoa"
|
2015-11-09 21:20:08 +00:00
|
|
|
"${WEBCORE_DIR}/platform/mediastream/mac"
|
2014-08-05 22:28:19 +00:00
|
|
|
"${WEBCORE_DIR}/platform/network/cocoa"
|
|
|
|
"${WEBCORE_DIR}/platform/network/cf"
|
2017-03-31 17:08:50 +00:00
|
|
|
"${WEBCORE_DIR}/platform/network/ios"
|
2014-08-05 22:28:19 +00:00
|
|
|
"${WEBCORE_DIR}/platform/network/mac"
|
2014-08-08 18:13:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/text/cf"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/platform/text/cocoa"
|
2014-08-08 18:13:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/text/mac"
|
2015-03-14 02:57:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/spi/cf"
|
|
|
|
"${WEBCORE_DIR}/platform/spi/cg"
|
|
|
|
"${WEBCORE_DIR}/platform/spi/cocoa"
|
2015-09-14 21:22:46 +00:00
|
|
|
"${WEBCORE_DIR}/platform/spi/ios"
|
2015-03-14 02:57:54 +00:00
|
|
|
"${WEBCORE_DIR}/platform/spi/mac"
|
2014-08-05 00:30:15 +00:00
|
|
|
"${WEBCORE_DIR}/plugins/mac"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
|
2015-09-14 21:22:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
|
|
|
|
${WEBCORE_DIR}/Modules/plugins/QuickTimePluginReplacement.css
|
2021-04-06 03:19:14 +00:00
|
|
|
${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.css
|
2015-09-14 21:22:46 +00:00
|
|
|
)
|
|
|
|
|
2015-10-22 22:33:58 +00:00
|
|
|
set(WebCore_USER_AGENT_SCRIPTS
|
|
|
|
${WEBCORE_DIR}/Modules/plugins/QuickTimePluginReplacement.js
|
2021-04-06 03:19:14 +00:00
|
|
|
${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.js
|
2015-10-22 22:33:58 +00:00
|
|
|
)
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2015-05-19 01:35:57 +00:00
|
|
|
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
|
2015-10-22 21:17:59 +00:00
|
|
|
"${CMAKE_OSX_SYSROOT}/usr/include/libxslt"
|
|
|
|
"${CMAKE_OSX_SYSROOT}/usr/include/libxml2"
|
2014-08-05 00:30:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND WebCore_SOURCES
|
2018-01-16 18:55:09 +00:00
|
|
|
Modules/paymentrequest/MerchantValidationEvent.cpp
|
|
|
|
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/webaudio/MediaStreamAudioSourceCocoa.cpp
|
|
|
|
|
2020-01-27 21:31:01 +00:00
|
|
|
accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
accessibility/mac/AXObjectCacheMac.mm
|
|
|
|
accessibility/mac/AccessibilityObjectMac.mm
|
|
|
|
accessibility/mac/WebAccessibilityObjectWrapperMac.mm
|
|
|
|
|
2015-09-14 21:22:46 +00:00
|
|
|
dom/DataTransferMac.mm
|
2015-09-28 22:08:55 +00:00
|
|
|
dom/SlotAssignment.cpp
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2020-03-09 01:03:34 +00:00
|
|
|
editing/cocoa/AlternativeTextUIController.mm
|
2019-07-10 20:30:26 +00:00
|
|
|
editing/cocoa/AutofillElements.cpp
|
2017-09-26 06:43:42 +00:00
|
|
|
|
2015-04-15 22:45:51 +00:00
|
|
|
editing/mac/EditorMac.mm
|
|
|
|
editing/mac/TextAlternativeWithRange.mm
|
|
|
|
editing/mac/TextUndoInsertionMarkupMac.mm
|
2021-04-06 03:19:14 +00:00
|
|
|
editing/mac/UniversalAccessZoom.mm
|
2015-04-15 22:45:51 +00:00
|
|
|
|
2015-09-28 22:08:55 +00:00
|
|
|
html/HTMLSlotElement.cpp
|
|
|
|
|
2015-09-14 21:22:46 +00:00
|
|
|
page/PageDebuggable.cpp
|
|
|
|
|
2014-08-05 00:30:15 +00:00
|
|
|
page/mac/EventHandlerMac.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
page/mac/ServicesOverlayController.mm
|
|
|
|
page/mac/TextIndicatorWindow.mm
|
2015-10-22 21:17:59 +00:00
|
|
|
page/mac/WheelEventDeltaFilterMac.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
|
2015-09-14 21:22:46 +00:00
|
|
|
page/scrolling/mac/ScrollingCoordinatorMac.mm
|
2016-11-30 09:41:55 +00:00
|
|
|
page/scrolling/mac/ScrollingMomentumCalculatorMac.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
|
2020-03-08 22:33:30 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeMac.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2017-03-13 20:17:17 +00:00
|
|
|
platform/CPUMonitor.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/LocalizedStrings.cpp
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/ScrollableArea.cpp
|
|
|
|
|
|
|
|
platform/audio/AudioSession.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
|
2018-08-31 19:13:04 +00:00
|
|
|
platform/audio/cocoa/WebAudioBufferList.cpp
|
2016-06-30 01:03:27 +00:00
|
|
|
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/audio/mac/AudioBusMac.mm
|
|
|
|
platform/audio/mac/AudioHardwareListenerMac.cpp
|
|
|
|
platform/audio/mac/FFTFrameMac.cpp
|
|
|
|
|
2015-10-23 23:55:41 +00:00
|
|
|
platform/cf/KeyedDecoderCF.cpp
|
|
|
|
platform/cf/KeyedEncoderCF.cpp
|
2015-10-30 13:25:26 +00:00
|
|
|
platform/cf/MainThreadSharedTimerCF.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/cf/MediaAccessibilitySoftLink.cpp
|
|
|
|
platform/cf/RunLoopObserver.cpp
|
|
|
|
platform/cf/SharedBufferCF.cpp
|
|
|
|
|
2015-04-15 22:45:51 +00:00
|
|
|
platform/cocoa/ContentFilterUnblockHandlerCocoa.mm
|
2016-03-01 11:58:59 +00:00
|
|
|
platform/cocoa/CoreVideoSoftLink.cpp
|
2017-06-29 16:47:47 +00:00
|
|
|
platform/cocoa/FileMonitorCocoa.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/cocoa/KeyEventCocoa.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/cocoa/LocalizedStringsCocoa.mm
|
2016-03-17 13:17:55 +00:00
|
|
|
platform/cocoa/MIMETypeRegistryCocoa.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/cocoa/NetworkExtensionContentFilter.mm
|
|
|
|
platform/cocoa/ParentalControlsContentFilter.mm
|
Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
https://bugs.webkit.org/show_bug.cgi?id=170449
<rdar://problem/31432525>
Reviewed by Wenson Hsieh.
Source/WebCore:
The bug was caused by image types in NSPasteboard or UIPasteboard not being treated as file items in dataTransfer.
Because there is no Web API to get binary data out of dataTransfer unlike text data, we need to treat any image
data as files even if they're entirely in the memory.
This patch introduces the notion of pasteboard types to be treated as files and expose them on dataTransfer.files
as well as dataTransfer.items of type "file". Because in-memory images are stored as TIFF in macOS and websites
don't typically support image/tiff, we convert all such in-memory TIFF images into PNG images ourselves for
a better web compatibility. This is done inside read(PasteboardFileReader&) in PasteboardCocoa.mm.
Note that PasteboardFileReader cannot directly have RefPtr<File> as a member variable as code in WebCore/platform
including Pasteboard code is not supposed to depend on WebCore types. WebCorePasteboardFileReader, a subclass of
PasteboardFileReader was introduced to resolve this reverse dependency.
In addition, this patch removes the restriction on dataTransfer.items that it only includes files of the supported
MIME types. This was unwarranted since 1. we don't have any restriction on what an user can drag & drop into a web
page via input element so there is no security benefit in this, and 2. the user should be able to copy & paste
whatever file he/she desires regardless of the MIME type on websites like Google Drive.
Tests: PasteImage
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* WebCore/PlatformMac.cmake:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::types const): Now excludes image/gif, image/png, image/jpeg, and image/tiff.
(WebCore::DataTransfer::files const): Add fake files we create for in-memory images but only when there are no real
files in the pasteboard since it's expensive to copy image data across UI/Web processes to create a blob URL.
* dom/DataTransferItemList.cpp:
(WebCore::DataTransferItemList::ensureItems const): Just expose every file type. If the user had decided to paste
a file, it's okay for the page to access that file regardless of whether it's a zip file, JPEG image, etc...
* editing/WebCorePasteboardFileReader.cpp:
(WebCorePasteboardFileReader::~WebCorePasteboardFileReader):
(WebCorePasteboardFileReader::read):
* editing/WebCorePasteboardFileReader.h:
(WebCorePasteboardFileReader):
* platform/Pasteboard.cpp:
(WebCore::PasteboardImage::PasteboardImage): Moved from platform specific translation units.
(WebCore::PasteboardImage::~PasteboardImage): Ditto.
* platform/Pasteboard.h:
(PasteboardFileReader): Added.
(* platform/StaticPasteboard.h:
(StaticPasteboard::typesForBindings): Added.
(StaticPasteboard::typesTreatedAsFiles): Added. Returns an empty list we don't support the web content writing image
files into pasteboard at the moment.
* platform/cocoa/PasteboardCocoa.mm: Added.
(WebCore::PasteboardWebContent::PasteboardWebContent): Moved from PasteboardMac.mm and PasteboardIOS.mm.
(WebCore::PasteboardWebContent::~PasteboardWebContent):
(WebCore::cocoaTypeToImageType): Added.
(WebCore::imageTypeToMIMEType): Added. Pretends to have image/png when the Cocoa type is image/tiff since most of
websites don't support image/tiff.
(WebCore::imageTypeToFakeFilename): Added.
(WebCore::mimeTypeToImageType): Added.
(WebCore::Pasteboard::shouldTreatCocoaTypeAsFile): Added. Pasteboard::typesForBindings excludes the type for which
this function returns true.
(WebCore::Pasteboard::typesTreatedAsFiles): Returns the list of all in-memory image types in the pasteboard.
(WebCore::Pasteboard::read): Added. On macOS, we convert TIFF to PNG for web compatibility. We don't do this rather
memory intensive coercion on iOS where most of apps like Photos put PNG file into the pasteboard in the first place.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
* platform/ios/PasteboardIOS.mm:
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::Pasteboard::typesForBindings):
(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::types): Deleted.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Add "Files" to dataTransfer.types when there is an in-memory
image type in the pasteboard.
* platform/mac/PasteboardMac.mm:
(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::addHTMLClipboardTypesForCocoaType): Moved the check for the legacy NeXT plain text check here. Also add
"Files" to dataTransfer.types when there is an in-memory image type in the pasteboard.
(WebCore::Pasteboard::typesForBindings): Renamed from types.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Ditto to add "Files".
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):
* platform/wpe/PasteboardWPE.cpp:
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):
Source/WebKit:
Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
since WebCore will now create File objects for these pasted files.
Tools:
Added an API test to paste an image from pasteboard. The test is shared between iOS and macOS.
The tests to paste image files are only enabled on macOS since putting files into pasteboard isn't a thing on iOS.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm: Added.
(writeImageDataToPasteboard):
(writeBundleFileToPasteboard):
* TestWebKitAPI/Tests/WebKitCocoa/paste-image.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-100px.tiff: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-200px.png: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-400px.gif: Added.
* TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-600px.jpg: Added.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm: Rebaselined the test now that types contain "Files".
Canonical link: https://commits.webkit.org/193940@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-29 18:46:51 +00:00
|
|
|
platform/cocoa/PasteboardCocoa.mm
|
2017-05-16 06:06:58 +00:00
|
|
|
platform/cocoa/RuntimeApplicationChecksCocoa.mm
|
2015-10-22 21:17:59 +00:00
|
|
|
platform/cocoa/SearchPopupMenuCocoa.mm
|
2017-01-04 00:36:32 +00:00
|
|
|
platform/cocoa/SharedBufferCocoa.mm
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/cocoa/SystemBattery.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/cocoa/SystemVersion.mm
|
|
|
|
platform/cocoa/TelephoneNumberDetectorCocoa.cpp
|
2016-05-05 08:25:23 +00:00
|
|
|
platform/cocoa/ThemeCocoa.mm
|
2017-06-17 20:03:58 +00:00
|
|
|
platform/cocoa/VideoToolboxSoftLink.cpp
|
2016-01-22 05:49:26 +00:00
|
|
|
platform/cocoa/WebCoreNSErrorExtras.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/gamepad/cocoa/GameControllerSoftLink.mm
|
|
|
|
|
2016-08-17 02:29:30 +00:00
|
|
|
platform/gamepad/mac/HIDGamepad.cpp
|
|
|
|
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/graphics/DisplayRefreshMonitor.cpp
|
|
|
|
platform/graphics/DisplayRefreshMonitorManager.cpp
|
2017-06-17 20:03:58 +00:00
|
|
|
platform/graphics/FourCC.cpp
|
2014-08-05 00:30:15 +00:00
|
|
|
|
|
|
|
platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
|
2019-10-31 22:45:05 +00:00
|
|
|
platform/graphics/avfoundation/CDMFairPlayStreaming.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp
|
|
|
|
platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp
|
[iPad] YouTube does not automatically AirPlay when a route is selected from Control Center
https://bugs.webkit.org/show_bug.cgi?id=206539
Source/WebCore:
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
No new tests; change affects an interaction with two platform features (local AirPlay
route picking and actual remote playback over AirPlay routes) that is not testable in
an automated fashion.
The underlying source of the bug is the difference in how the platform communitcates that an
AirPlay route was picked between iOS and macOS. On iOS, route changes are global and are
generally pushed up from AVPlayer notifications. On macOS, route changes are local to the
app and are pushed down from the UIProcess. But when MSE playback was enabled on iPadOS,
there was now a limbo where media playback was no longer using an AVPlayer, but at the same
time, route changes could be initiated globally. The end result is that MSE-based media
elements are never notified that they "should play to playback target", and no remote
playback events are ever fired.
To re-create the same macOS behavior when MSE-backed media elements are used on iPadOS,
re-use the existing route change detection logic in MediaSessionManageriOS to query whether
the newly established route supports AirPlay Video, and if so, send a message to the "now
playing" media element that it should begin AirPlaying, which will fail, but will trigger
the YouTube player to switch to a HLS-backed media element.
This requires renaming MediaPlaybackTargetMac -> MediaPlaybackTargetCocoa.
* SourcesCocoa.txt:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.h.
(WebCore::MediaPlaybackTargetCocoa::outputContext const):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm.
(WebCore::MediaPlaybackTargetCocoa::create):
(WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::targetContext const):
(WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const):
(WebCore::MediaPlaybackTargetCocoa::deviceName const):
(WebCore::toMediaPlaybackTargetCocoa):
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
Source/WebKit:
<rdar://problem/54173689>
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected const):
Canonical link: https://commits.webkit.org/219613@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 21:44:00 +00:00
|
|
|
platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
|
2017-06-17 07:47:16 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp
|
2019-10-31 22:45:05 +00:00
|
|
|
platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
|
2016-02-02 01:51:14 +00:00
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm
|
2016-02-02 01:51:14 +00:00
|
|
|
platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm
|
2017-09-25 19:03:00 +00:00
|
|
|
platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
|
2016-08-02 21:17:37 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp
|
|
|
|
platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm
|
|
|
|
platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm
|
|
|
|
|
|
|
|
platform/graphics/ca/GraphicsLayerCA.cpp
|
|
|
|
platform/graphics/ca/LayerPool.cpp
|
2015-10-23 23:55:41 +00:00
|
|
|
platform/graphics/ca/PlatformCAAnimation.cpp
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/ca/PlatformCALayer.cpp
|
|
|
|
platform/graphics/ca/TileController.cpp
|
|
|
|
platform/graphics/ca/TileCoverageMap.cpp
|
|
|
|
platform/graphics/ca/TileGrid.cpp
|
|
|
|
platform/graphics/ca/TransformationMatrixCA.cpp
|
|
|
|
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
|
|
|
|
platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm
|
|
|
|
platform/graphics/ca/cocoa/WebTiledBackingLayer.mm
|
|
|
|
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/cg/ColorCG.cpp
|
Simplify adding new color spaces to WebCore
https://bugs.webkit.org/show_bug.cgi?id=220146
Reviewed by Dean Jackson.
Reduce the number of places one needs to touch when adding new color types to:
- ColorTypes.h
- ColorConversion.h/cpp
- ColorSpace.h/cpp (only needed if support in Color is required).
- ColorSerialization.h (only needed if support in Color is required).
- ColorSpaceCG.h/cpp (only needed if support in Color is required).
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add ColorSpace.cpp, ColorSpaceCG.h and ColorSpaceCG.cpp.
* platform/graphics/Color.cpp:
* platform/graphics/Color.h:
(WebCore::Color::Color):
(WebCore::Color::setColor):
Replace specific overloads of the contructor and setColor with template functions
that do the same things. These are safe to make as if a non-supported color type
(one that doesn't have a colorSpace member) is passed it will fail to compile due
to use beneath ExtendedColor::create().
Also moves WTF::TextStream operator<< overload for ColorSpace out and into
ColorSpace.cpp where it makes more sense.
* platform/graphics/ColorConversion.cpp:
* platform/graphics/ColorConversion.h:
Re-order and explicitly comment conversion functions to be more clear.
As the comment indicates, all color types must implement at least the following
conversions:
XYZA<float> toXYZA(const ColorType<float>&);
ColorType<float> toColorType(const XYZA<float>&);
This allows generic fallback code, inline at the bottom of the header, to
support conversion to and from any set of colors. Additional conversion functions
are useful for the cases where the optimal or base conversion is not through XYZ
such as from SRGBA to LinearSRGBA.
To allow this to work a few additional conversion functions were added which just
combine existing conversions together and one was added for SRGBA to CMYKA which
was missing, though currently unused.
* platform/graphics/ColorSpace.cpp: Added.
(WebCore::operator<<):
* platform/graphics/ColorSpace.h:
Moved from Color.h
* platform/graphics/ColorTypes.h:
(WebCore::callWithColorType):
This is a generalization of ExtendedColor::callOnUnderlyingType() that also
has the benefit of now being in the same file as the color type definitions,
reducing the number of files people need to touch.
* platform/graphics/ColorUtilities.h:
(WebCore::colorByModifingEachNonAlphaComponent):
Update to not assume that colors use the names red/green/blue for non-alpha
components. This makes it work generically for all four component color types.
* platform/graphics/ExtendedColor.h:
(WebCore::ExtendedColor::callOnUnderlyingType const):
Use generalized form, callWithColorType to avoid requiring modiftying this
when new color types are added.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
When going to generalize this (we could have simply called
`return CGColorCreate(cachedCGColorSpace(colorSpace), cgFloatComponents))`
I noticed this was not doing the right thing for CG ports that don't support
all the color spaces WebCore requires (such as Windows). For instance,
displayP3ColorSpaceRef() just returns sRGBColorSpaceRef() on windows, meaning
we would be taking some DisplayP3 components and having CG interpret them as
sRGB. To avoid this, we now check if the color space returned is the fallback
color space, sRGB, and do our own conversion to sRGB using ColorConversion
before creating the color.
This also resolves a long standing bug / FIXME around LinearRGB where we were
using sRGBColorSpaceRef() for them. In practice, we don't actually ever create
LinearRGB CGColorRefs right now, but if we ever do in the future, makes sense
to use the right color space.
* platform/graphics/cg/ColorSpaceCG.cpp: Added.
(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
* platform/graphics/cg/ColorSpaceCG.h: Added.
(WebCore::cachedCGColorSpace):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef): Deleted.
(WebCore::linearRGBColorSpaceRef): Deleted.
(WebCore::extendedSRGBColorSpaceRef): Deleted.
(WebCore::displayP3ColorSpaceRef): Deleted.
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace): Deleted.
Moved color space specific CG code to its own files to make it more clear
where to find them.
Canonical link: https://commits.webkit.org/232686@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-26 17:42:33 +00:00
|
|
|
platform/graphics/cg/ColorSpaceCG.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/cg/FloatPointCG.cpp
|
|
|
|
platform/graphics/cg/FloatRectCG.cpp
|
|
|
|
platform/graphics/cg/FloatSizeCG.cpp
|
|
|
|
platform/graphics/cg/GradientCG.cpp
|
2020-01-06 18:52:42 +00:00
|
|
|
platform/graphics/cg/GraphicsContextGLCG.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/cg/GraphicsContextCG.cpp
|
|
|
|
platform/graphics/cg/IOSurfacePool.cpp
|
2020-02-19 01:12:47 +00:00
|
|
|
platform/graphics/cg/ImageBufferCGBackend.cpp
|
|
|
|
platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
|
|
|
|
platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
|
|
|
|
platform/graphics/cg/ImageBufferUtilitiesCG.cpp
|
2016-03-30 19:10:18 +00:00
|
|
|
platform/graphics/cg/ImageDecoderCG.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/cg/ImageSourceCGMac.mm
|
|
|
|
platform/graphics/cg/IntPointCG.cpp
|
|
|
|
platform/graphics/cg/IntRectCG.cpp
|
|
|
|
platform/graphics/cg/IntSizeCG.cpp
|
2016-09-09 01:06:47 +00:00
|
|
|
platform/graphics/cg/NativeImageCG.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/cg/PDFDocumentImage.cpp
|
|
|
|
platform/graphics/cg/PathCG.cpp
|
|
|
|
platform/graphics/cg/PatternCG.cpp
|
|
|
|
platform/graphics/cg/SubimageCacheWithTimer.cpp
|
|
|
|
platform/graphics/cg/TransformationMatrixCG.cpp
|
2017-04-26 19:01:58 +00:00
|
|
|
platform/graphics/cg/UTIRegistry.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
|
[Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
https://bugs.webkit.org/show_bug.cgi?id=210138
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToObjectWithoutCopy): Use @().
(valueToNumber): Ditto.
* API/tests/testapi.mm:
(-[TestObject callback:]): Use @[], @(), and @{}.
(-[TextXYZ click]): Ditto.
(testObjectiveCAPIMain): Ditto.
Source/WebCore:
- Added createNSArray and makeVector.
- Use createNSArray and makeVector<String> in many places where we convert
between NSArray and Vector, replacing multiple existing functions that were
doing the same job before; later can use them even more.
- Use @[] many places where we create an autoreleased NSArray.
- Use @{} many places where we create an autoreleased NSDictionary.
- Use @() many places where we create an autoreleased NSNumber.
* PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
* SourcesCocoa.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
(-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
(-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textReplacementChangeDictionary): Use @().
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(makeVectorElement): Aded overload for AccessibilitySearchKey.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
Use makeVector<AccessibilitySearchKey>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(AXAttributeStringSetStyle): Use @().
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
(convertStringsToNSArray): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use @(), @[], and createNSArray.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Ditto.
* bridge/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
Use @().
* editing/cocoa/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::alternativesForContext):
Use makeVector<String>.
* editing/cocoa/HTMLConverter.mm:
(defaultParagraphStyle): Use @[].
(HTMLConverter::computedAttributesForElement): Use @().
(HTMLConverter::_processMetaElementWithName): Use @().
(HTMLConverter::_addTableForElement): Use @().
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Use @[].
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.
* platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
convert Vector<FloatRect> into NSArray<NSValue>.
* platform/graphics/IntRect.h: Similarly for IntRect.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
Use @(), @[], modern for loops, auto, and allocate with capacity.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::filterValueForOperation): Use @().
* platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
(WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
into NSArray<NSValue>.
* platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
(WebCore::makeNSArrayElement): Similarly for IntRect.
(WebCore::enclosingIntRect): Use clampTo to be consistent with what
enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
how sources get unified (and was affecting my local build when it temporarily
had an additional source file).
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontModificationAttributes): Use @().
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::createItemProviderRegistrationList): Use createNSArray.
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItemProviders:]): Use @[].
* platform/ios/wak/WAKView.mm:
(-[WAKView subviews]): Dittto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
(WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.
* platform/mac/StringUtilities.h: Removed
webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray): Deleted.
* platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Use @().
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Remove uneeded include.
* Platform/mac/StringUtilities.mm: Ditto.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch): Use makeVector<String>.
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
Ditto.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetworks): Deleted.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing): Use @[].
(WebKit::PasteboardTypes::forURL): Ditto.
(WebKit::PasteboardTypes::forImages): Ditto.
(WebKit::PasteboardTypes::forImagesWithArchive): Ditto.
(WebKit::PasteboardTypes::forSelection): Ditto.
* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]): Use createNSArray.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]):
Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _corsDisablingPatterns]): Use createNSArray.
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]): Use @().
* UIProcess/API/Cocoa/_WKContentRuleListAction.mm:
(-[_WKContentRuleListAction notifications]): Use createNSArray.
* UIProcess/API/Cocoa/_WKCustomHeaderFields.mm:
(-[_WKCustomHeaderFields thirdPartyDomains]): Use createNSArray.
(-[_WKCustomHeaderFields setThirdPartyDomains:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): Use makeVector<String>.
(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
(API::toStringVector): Deleted.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
Use makeVector<String>.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue): Use @[].
(WebKit::WebViewImpl::performDragOperation): Use makeVector<String>.
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use @[].
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent): Use @[].
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::launchProcess): Use createNSArray.
(WebKit::isJavaUpdaterURL): Use @[].
(WebKit::PluginProcessProxy::launchApplicationAtURL): Use @{} and createNSArray.
(WebKit::isSilverlightPreferencesURL): Use @[].
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::HidService): Use @() and fixed an over-release mistake.
This code was doing adoptNS on the result of +[NSNumberWithInt:], which is incorrect.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const): Use @[].
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]): Use @().
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]): Use createNSArray.
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
Fixed a wasteful call to autorelease where we are adding an item to a dictionary. Calling get
is more efficient and still correct.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): Use @[].
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorMatrixView initWithFrame:colorMatrix:]): Removed uneeded RetainPtr
local variable.
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show): Use createNSArray.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString): Use createNSArray.
(WebKit::TextChecker::getGuessesForWord): Use makeVector<String>.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use @().
* UIProcess/mac/WKTextFinderClient.mm:
(arrayFromRects): Deleted.
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsController notifyAccessibilityClients:]): Use @{}
and fix a bug where this was creating a backwards dictionary. So this never
could have been working before, making me wonder how we test it.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Use @[].
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Removed toNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toNSArray): Deleted.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode textRects]): Use createNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Use @{}.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer): Use @[].
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard): Use makeVector<String>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): Use @().
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting): Use @{}.
(WebKit::TiledCoreAnimationDrawingArea::resumePainting): Use @{}.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
Removed an unneeded include.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Ditto.
(-[WKAccessibilityWebPageObject accessibilityActionNames]): Use @[].
(-[WKAccessibilityWebPageObject accessibilityChildren]): Use @[].
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::getActivePagesOriginsForTesting): Use makeVector<String>.
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runOpenPanel): Use createNSArray.
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Use createNSArray.
* WebCoreSupport/WebVisiblePositionInternal.h:
Added #if so that this correctly doesn't compile anything on Mac.
* WebView/WebPDFViewIOS.mm:
(+[WebPDFView supportedMIMETypes]): Use @[].
Source/WebKitLegacy/mac:
* DOM/DOM.mm:
(kit): Deleted overload that takes Vector<IntRect>.
(-[DOMNode textRects]): Use createNSArray.
(-[DOMRange textRects]): Ditto.
* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException): Use @().
* History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]): Use @{}.
* History/WebHistory.mm:
(+[WebHistoryPrivate initialize]): Use @{}.
(-[WebHistory _sendNotification:entries:]): Use @{}.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use makeVector<String>.
(-[WebHistoryItem dictionaryRepresentation:]): Use createNSArray and @().
* History/WebURLsWithTitles.m:
(+[WebURLsWithTitles arrayWithIFURLsWithTitlesPboardType]): Use @[].
(+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]): Use @[].
* Misc/WebCache.mm:
(+[WebCache statistics]): Use @[], @{}, and @().
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]): Ditto.
* Misc/WebKitErrors.m:
(-[NSError _webkit_initWithDomain:code:URL:]): Use @().
(+[NSError _registerWebKitErrors]): Use @().
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): Use @().
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use @{}.
(-[NSString _web_widthWithFont:]): Use @{}.
* Misc/WebNSFileManagerExtras.mm: Removed unneeded include.
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_dragTypesForURL]): Use @[].
(-[NSPasteboard _web_writeURL:andTitle:types:]): Use @[].
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]): Use @[].
* Misc/WebNSURLExtras.mm: Removed unneeded include.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost): Use @{}.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCIdentifierInfo): Use @().
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use @().
* Plugins/Hosted/WebHostedNetscapePluginView.mm: Removed unneeded include.
* Plugins/WebBasePluginPackage.mm: Ditto.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _actionInformationWithURL:]): Use @{}.
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]): Use @[].
* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager databasesWithOrigin:]): Use createNSArray.
* WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::show): Use createNSArray.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Use @().
* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion): Use @().
(WebEditorClient::getGuessesForWord): Use makeVector<String>.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary const): Use @().
(kit): Deleted overload that takes Vector<String>.
(pluginView): Use @{}.
(WebFrameLoaderClient::createPlugin): Use createNSArray, @{}, and @().
(WebFrameLoaderClient::createJavaAppletWidget): Use createNSArray.
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:]): Use makeVector<String>.
(-[WebOpenPanelResultListener chooseFilename:displayString:iconImage:]): Use @[].
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]): Use makeVector<String>.
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick):
Comment out an unused argument.
* WebView/WebFrame.mm:
(-[WebFrame _rectsForRange:]): Use createNSArrray.
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): Use createNSArray and @[].
(-[WebFrame childFrames]): Use @[].
* WebView/WebHTMLView.mm:
(+[WebHTMLView _selectionPasteboardTypes]): Use @[].
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use @[].
(-[WebHTMLView knowsPageRange:]): Use @[].
(-[WebHTMLView accessibilityAttributeValue:]): Use @[].
(-[WebHTMLView copyFont:]): Use @[].
(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Use @[].
(-[WebHTMLView selectionTextRects]): Use createNSArray.
(-[WebHTMLView rectsForTextMatches]): Use createNSArray and @[].
* WebView/WebPDFRepresentation.mm: Removed unneeded include.
(+[WebPDFRepresentation postScriptMIMETypes]): Use @[].
(+[WebPDFRepresentation supportedMIMETypes]): Use @[].
* WebView/WebPDFView.mm:
(-[WebPDFView elementAtPoint:]): Use @{} and @().
(-[WebPDFView viewState]): Use @().
(-[WebPDFView selectionTextRects]): Use @[].
(-[WebPDFView pasteboardTypesForSelection]): Use @[].
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Use @().
(-[WebPDFView _openWithFinder:]): Use @{} and @().
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Use @().
(-[WebPreferences _setUnsignedIntValue:forKey:]): Use @().
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Use @().
(-[WebPreferences setStorageBlockingPolicy:]): Use @{} and @().
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed): Use @().
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]): Use @{}.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use makeVector<String>.
(-[WebView _contentsOfUserInterfaceItem:]): Use @().
(toStringVector): Deleted.
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
Use makeVector<String>.
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use makeVector<String>.
(-[WebView _elementAtWindowPoint:]): Use @{}.
(-[WebView pasteboardTypesForSelection]): Use @[].
(-[WebView pasteboardTypesForElement:]): Use @[].
(-[WebView rectsForTextMatches]): Use @[].
(-[WebView _searchWithGoogleFromMenu:]): Use @[].
(-[WebView _setFontWhitelist:]): Use makeVector<String>.
Source/WTF:
* WTF.xcodeproj/project.pbxproj: Added VectorCocoa.h.
* wtf/PlatformMac.cmake: Ditto.
* wtf/cocoa/NSURLExtras.mm: Removed unneeded include.
* wtf/cocoa/URLCocoa.mm: Ditto.
* wtf/cocoa/VectorCocoa.h: Added. Contains createNSArray and makeVector
function templates for converting NSArray to and from Vector.
* wtf/text/WTFString.h: Added makeNSArrayElement and makeVectorElement
functions, making createNSArray and makeVector compatible with String.
* wtf/text/cocoa/StringCocoa.mm:
(WTF::makeNSArrayElement): Added.
(WTF::makeVectorElement): Added.
Tools:
* DumpRenderTree/AccessibilityController.h: Remove use of NotificationHandler
type; it's just "id".
* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray): Moved this up in the file, removed unneeded
use of JSValueToObject and unused exception argument.
(elementsForRangeCallback): Use convertElementsToObjectArray.
(columnHeadersCallback): Updated for removed exception argument.
(rowHeadersCallback): Ditto.
(uiElementArrayAttributeValueCallback): Ditto.
* DumpRenderTree/AccessibilityUIElement.h: Changed to use RetainPtr.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use @{}.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use @[].
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Use @[].
* DumpRenderTree/ios/TextInputControllerIOS.m:
(-[TextInputController markedRange]): Use @[].
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Tweak a little.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Deleted. Duplicate of a method already
implemented in anothe file.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(makeVectorElement): Added overloads to make both
makeVector<AccessibilityTextMarkerRange> and
makeVector<AccessibilityUIElement> work.
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(convertVectorToObjectArray): Removed unneeded use of JSValueToObject
and unneeded exception argument.
(convertNSArrayToVector): Deleted.
(AccessibilityUIElement::getLinkedUIElements): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::getDocumentLinks): Ditto.
(AccessibilityUIElement::getChildren): Ditto.
(AccessibilityUIElement::getChildrenWithRange): Ditto.
(AccessibilityUIElement::rowHeaders const): Ditto.
(AccessibilityUIElement::columnHeaders const): Ditto.
(AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
(AccessibilityUIElement::role): Updated since m_element is a RetainPtr.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::lineForIndex): Use @().
(AccessibilityUIElement::rangeForLine): Use @().
(AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<AccessibilityTextMarkerRange>.
(AccessibilityUIElement::attributesOfColumnHeaders): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(AccessibilityUIElement::setSelectedChild const): Use @[].
(AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
Use @{}, @YES, and @NO.
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* DumpRenderTree/mac/DumpRenderTree.mm:
(addTestPluginsToPluginSearchPath): Use @[].
(resetWebViewToConsistentStateBeforeTesting): Use @[].
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[DumpRenderTreePasteboard declareType:owner:]): Use @[].
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFiles:]): Use @().
(-[EventSendingController sentTouchEventOfType:]): Use @().
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider cancelNotification:]): Use @[].
* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]): Use @().
(-[ObjCController arrayOfString]): Use @[].
(-[ObjCController testWrapperRoundTripping:]): Use @().
(-[ObjCController testArray]): Use @[].
* DumpRenderTree/mac/TestRunnerMac.mm:
(originsArrayToJS): Removed unneeded use of JSValueToObject.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController markedRange]): Use @[] and @().
(-[TextInputController selectedRange]): Use @[] and @().
(-[TextInputController firstRectForCharactersFrom:length:]):
Use @[] and @().
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
Use @[].
(-[TextInputController interpretKeyEvents:withSender:]): Use @[].
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use [].
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Deleted an
unneeded copy constructor and destructor.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Use @{}.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(toVector): Deleted.
(-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
Use makeVector<String>.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(writeImageDataToPasteboard): Use @[] and @{}.
(writeBundleFileToPasteboard): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:
(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
Use @[].
* TestWebKitAPI/ios/mainIOS.mm:
(main): Use @{}.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize): Use @{} and @().
* TestWebKitAPI/mac/mainMac.mm:
(main): Use {}.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
Use id instead of NotificationHandler.
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
Use id for PlatformTextMarkerRange. Added an overload of makeVectorElement
to make makeVector<RefPtr<AccessibilityTextMarkerRange>> work.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
Use RetainPtr. Added an overload of makeVectorElement to make
makeVector<RefPtr<AccessibilityUIElement>> work.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
Removed unneeded include.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertElementsToObjectArray): Removed unneeded use of
JSValueToObject.
(WTR::AccessibilityUIElement::elementsForRange): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize): Use @{}.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::getLinkedUIElements): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::getDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const): Ditto.
(WTR::AccessibilityUIElement::getChildren): Ditto.
(WTR::AccessibilityUIElement::getChildrenWithRange): Ditto.
(WTR::AccessibilityUIElement::rowHeaders const): Ditto.
(WTR::AccessibilityUIElement::columnHeaders const): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Updated since m_element
is a RetainPtr.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::description): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::stringValue): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::lineForIndex): Use @().
(WTR::AccessibilityUIElement::rangeForLine): Use @().
(WTR::AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<RefPtr<AccessibilityTextMarkerRange>>.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(WTR::AccessibilityUIElement::setSelectedChild const): Use @[].
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Take Vector&&.
(WTR::TestInvocation::didReceiveWebViewCategory): Take String&&.
* WebKitTestRunner/TestInvocation.h: Updated for the above.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Use @{}and @().
(WTR::TestController::getAllStorageAccessEntries): Use makeVector<String>.
(WTR::TestController::loadedThirdPartyDomains): Use makeVector<String>.
(WTR::TestController::getWebViewCategory): Update to pass String&&.
(WTR::TestController::setAllowedMenuActions): Use createNSArray.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator interpolatedEvents:]): Use @().
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded): Use @{} and @().
* WebKitTestRunner/mac/TestControllerMac.mm: Removed unneeded include.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use @[].
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[WebKitTestRunnerPasteboard declareType:owner:]): Use @[].
Canonical link: https://commits.webkit.org/223199@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 02:11:30 +00:00
|
|
|
platform/graphics/cocoa/FloatRectCocoa.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/graphics/cocoa/FontCacheCoreText.cpp
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/graphics/cocoa/FontCascadeCocoa.mm
|
2020-09-11 20:27:38 +00:00
|
|
|
platform/graphics/cocoa/FontCocoa.cpp
|
2017-06-17 20:03:58 +00:00
|
|
|
platform/graphics/cocoa/FontDescriptionCocoa.cpp
|
2017-06-17 07:47:16 +00:00
|
|
|
platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/graphics/cocoa/FontPlatformDataCocoa.mm
|
[Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
https://bugs.webkit.org/show_bug.cgi?id=210138
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToObjectWithoutCopy): Use @().
(valueToNumber): Ditto.
* API/tests/testapi.mm:
(-[TestObject callback:]): Use @[], @(), and @{}.
(-[TextXYZ click]): Ditto.
(testObjectiveCAPIMain): Ditto.
Source/WebCore:
- Added createNSArray and makeVector.
- Use createNSArray and makeVector<String> in many places where we convert
between NSArray and Vector, replacing multiple existing functions that were
doing the same job before; later can use them even more.
- Use @[] many places where we create an autoreleased NSArray.
- Use @{} many places where we create an autoreleased NSDictionary.
- Use @() many places where we create an autoreleased NSNumber.
* PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
* SourcesCocoa.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
(-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
(-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textReplacementChangeDictionary): Use @().
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(makeVectorElement): Aded overload for AccessibilitySearchKey.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
Use makeVector<AccessibilitySearchKey>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(AXAttributeStringSetStyle): Use @().
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
(convertStringsToNSArray): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use @(), @[], and createNSArray.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Ditto.
* bridge/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
Use @().
* editing/cocoa/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::alternativesForContext):
Use makeVector<String>.
* editing/cocoa/HTMLConverter.mm:
(defaultParagraphStyle): Use @[].
(HTMLConverter::computedAttributesForElement): Use @().
(HTMLConverter::_processMetaElementWithName): Use @().
(HTMLConverter::_addTableForElement): Use @().
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Use @[].
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.
* platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
convert Vector<FloatRect> into NSArray<NSValue>.
* platform/graphics/IntRect.h: Similarly for IntRect.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
Use @(), @[], modern for loops, auto, and allocate with capacity.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::filterValueForOperation): Use @().
* platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
(WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
into NSArray<NSValue>.
* platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
(WebCore::makeNSArrayElement): Similarly for IntRect.
(WebCore::enclosingIntRect): Use clampTo to be consistent with what
enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
how sources get unified (and was affecting my local build when it temporarily
had an additional source file).
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontModificationAttributes): Use @().
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::createItemProviderRegistrationList): Use createNSArray.
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItemProviders:]): Use @[].
* platform/ios/wak/WAKView.mm:
(-[WAKView subviews]): Dittto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
(WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.
* platform/mac/StringUtilities.h: Removed
webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray): Deleted.
* platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Use @().
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Remove uneeded include.
* Platform/mac/StringUtilities.mm: Ditto.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch): Use makeVector<String>.
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
Ditto.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetworks): Deleted.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing): Use @[].
(WebKit::PasteboardTypes::forURL): Ditto.
(WebKit::PasteboardTypes::forImages): Ditto.
(WebKit::PasteboardTypes::forImagesWithArchive): Ditto.
(WebKit::PasteboardTypes::forSelection): Ditto.
* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]): Use createNSArray.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]):
Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _corsDisablingPatterns]): Use createNSArray.
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]): Use @().
* UIProcess/API/Cocoa/_WKContentRuleListAction.mm:
(-[_WKContentRuleListAction notifications]): Use createNSArray.
* UIProcess/API/Cocoa/_WKCustomHeaderFields.mm:
(-[_WKCustomHeaderFields thirdPartyDomains]): Use createNSArray.
(-[_WKCustomHeaderFields setThirdPartyDomains:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): Use makeVector<String>.
(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
(API::toStringVector): Deleted.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
Use makeVector<String>.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue): Use @[].
(WebKit::WebViewImpl::performDragOperation): Use makeVector<String>.
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use @[].
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent): Use @[].
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::launchProcess): Use createNSArray.
(WebKit::isJavaUpdaterURL): Use @[].
(WebKit::PluginProcessProxy::launchApplicationAtURL): Use @{} and createNSArray.
(WebKit::isSilverlightPreferencesURL): Use @[].
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::HidService): Use @() and fixed an over-release mistake.
This code was doing adoptNS on the result of +[NSNumberWithInt:], which is incorrect.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const): Use @[].
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]): Use @().
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]): Use createNSArray.
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
Fixed a wasteful call to autorelease where we are adding an item to a dictionary. Calling get
is more efficient and still correct.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): Use @[].
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorMatrixView initWithFrame:colorMatrix:]): Removed uneeded RetainPtr
local variable.
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show): Use createNSArray.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString): Use createNSArray.
(WebKit::TextChecker::getGuessesForWord): Use makeVector<String>.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use @().
* UIProcess/mac/WKTextFinderClient.mm:
(arrayFromRects): Deleted.
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsController notifyAccessibilityClients:]): Use @{}
and fix a bug where this was creating a backwards dictionary. So this never
could have been working before, making me wonder how we test it.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Use @[].
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Removed toNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toNSArray): Deleted.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode textRects]): Use createNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Use @{}.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer): Use @[].
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard): Use makeVector<String>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): Use @().
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting): Use @{}.
(WebKit::TiledCoreAnimationDrawingArea::resumePainting): Use @{}.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
Removed an unneeded include.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Ditto.
(-[WKAccessibilityWebPageObject accessibilityActionNames]): Use @[].
(-[WKAccessibilityWebPageObject accessibilityChildren]): Use @[].
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::getActivePagesOriginsForTesting): Use makeVector<String>.
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runOpenPanel): Use createNSArray.
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Use createNSArray.
* WebCoreSupport/WebVisiblePositionInternal.h:
Added #if so that this correctly doesn't compile anything on Mac.
* WebView/WebPDFViewIOS.mm:
(+[WebPDFView supportedMIMETypes]): Use @[].
Source/WebKitLegacy/mac:
* DOM/DOM.mm:
(kit): Deleted overload that takes Vector<IntRect>.
(-[DOMNode textRects]): Use createNSArray.
(-[DOMRange textRects]): Ditto.
* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException): Use @().
* History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]): Use @{}.
* History/WebHistory.mm:
(+[WebHistoryPrivate initialize]): Use @{}.
(-[WebHistory _sendNotification:entries:]): Use @{}.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use makeVector<String>.
(-[WebHistoryItem dictionaryRepresentation:]): Use createNSArray and @().
* History/WebURLsWithTitles.m:
(+[WebURLsWithTitles arrayWithIFURLsWithTitlesPboardType]): Use @[].
(+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]): Use @[].
* Misc/WebCache.mm:
(+[WebCache statistics]): Use @[], @{}, and @().
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]): Ditto.
* Misc/WebKitErrors.m:
(-[NSError _webkit_initWithDomain:code:URL:]): Use @().
(+[NSError _registerWebKitErrors]): Use @().
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): Use @().
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use @{}.
(-[NSString _web_widthWithFont:]): Use @{}.
* Misc/WebNSFileManagerExtras.mm: Removed unneeded include.
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_dragTypesForURL]): Use @[].
(-[NSPasteboard _web_writeURL:andTitle:types:]): Use @[].
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]): Use @[].
* Misc/WebNSURLExtras.mm: Removed unneeded include.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost): Use @{}.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCIdentifierInfo): Use @().
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use @().
* Plugins/Hosted/WebHostedNetscapePluginView.mm: Removed unneeded include.
* Plugins/WebBasePluginPackage.mm: Ditto.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _actionInformationWithURL:]): Use @{}.
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]): Use @[].
* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager databasesWithOrigin:]): Use createNSArray.
* WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::show): Use createNSArray.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Use @().
* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion): Use @().
(WebEditorClient::getGuessesForWord): Use makeVector<String>.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary const): Use @().
(kit): Deleted overload that takes Vector<String>.
(pluginView): Use @{}.
(WebFrameLoaderClient::createPlugin): Use createNSArray, @{}, and @().
(WebFrameLoaderClient::createJavaAppletWidget): Use createNSArray.
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:]): Use makeVector<String>.
(-[WebOpenPanelResultListener chooseFilename:displayString:iconImage:]): Use @[].
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]): Use makeVector<String>.
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick):
Comment out an unused argument.
* WebView/WebFrame.mm:
(-[WebFrame _rectsForRange:]): Use createNSArrray.
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): Use createNSArray and @[].
(-[WebFrame childFrames]): Use @[].
* WebView/WebHTMLView.mm:
(+[WebHTMLView _selectionPasteboardTypes]): Use @[].
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use @[].
(-[WebHTMLView knowsPageRange:]): Use @[].
(-[WebHTMLView accessibilityAttributeValue:]): Use @[].
(-[WebHTMLView copyFont:]): Use @[].
(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Use @[].
(-[WebHTMLView selectionTextRects]): Use createNSArray.
(-[WebHTMLView rectsForTextMatches]): Use createNSArray and @[].
* WebView/WebPDFRepresentation.mm: Removed unneeded include.
(+[WebPDFRepresentation postScriptMIMETypes]): Use @[].
(+[WebPDFRepresentation supportedMIMETypes]): Use @[].
* WebView/WebPDFView.mm:
(-[WebPDFView elementAtPoint:]): Use @{} and @().
(-[WebPDFView viewState]): Use @().
(-[WebPDFView selectionTextRects]): Use @[].
(-[WebPDFView pasteboardTypesForSelection]): Use @[].
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Use @().
(-[WebPDFView _openWithFinder:]): Use @{} and @().
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Use @().
(-[WebPreferences _setUnsignedIntValue:forKey:]): Use @().
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Use @().
(-[WebPreferences setStorageBlockingPolicy:]): Use @{} and @().
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed): Use @().
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]): Use @{}.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use makeVector<String>.
(-[WebView _contentsOfUserInterfaceItem:]): Use @().
(toStringVector): Deleted.
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
Use makeVector<String>.
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use makeVector<String>.
(-[WebView _elementAtWindowPoint:]): Use @{}.
(-[WebView pasteboardTypesForSelection]): Use @[].
(-[WebView pasteboardTypesForElement:]): Use @[].
(-[WebView rectsForTextMatches]): Use @[].
(-[WebView _searchWithGoogleFromMenu:]): Use @[].
(-[WebView _setFontWhitelist:]): Use makeVector<String>.
Source/WTF:
* WTF.xcodeproj/project.pbxproj: Added VectorCocoa.h.
* wtf/PlatformMac.cmake: Ditto.
* wtf/cocoa/NSURLExtras.mm: Removed unneeded include.
* wtf/cocoa/URLCocoa.mm: Ditto.
* wtf/cocoa/VectorCocoa.h: Added. Contains createNSArray and makeVector
function templates for converting NSArray to and from Vector.
* wtf/text/WTFString.h: Added makeNSArrayElement and makeVectorElement
functions, making createNSArray and makeVector compatible with String.
* wtf/text/cocoa/StringCocoa.mm:
(WTF::makeNSArrayElement): Added.
(WTF::makeVectorElement): Added.
Tools:
* DumpRenderTree/AccessibilityController.h: Remove use of NotificationHandler
type; it's just "id".
* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray): Moved this up in the file, removed unneeded
use of JSValueToObject and unused exception argument.
(elementsForRangeCallback): Use convertElementsToObjectArray.
(columnHeadersCallback): Updated for removed exception argument.
(rowHeadersCallback): Ditto.
(uiElementArrayAttributeValueCallback): Ditto.
* DumpRenderTree/AccessibilityUIElement.h: Changed to use RetainPtr.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use @{}.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use @[].
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Use @[].
* DumpRenderTree/ios/TextInputControllerIOS.m:
(-[TextInputController markedRange]): Use @[].
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Tweak a little.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Deleted. Duplicate of a method already
implemented in anothe file.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(makeVectorElement): Added overloads to make both
makeVector<AccessibilityTextMarkerRange> and
makeVector<AccessibilityUIElement> work.
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(convertVectorToObjectArray): Removed unneeded use of JSValueToObject
and unneeded exception argument.
(convertNSArrayToVector): Deleted.
(AccessibilityUIElement::getLinkedUIElements): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::getDocumentLinks): Ditto.
(AccessibilityUIElement::getChildren): Ditto.
(AccessibilityUIElement::getChildrenWithRange): Ditto.
(AccessibilityUIElement::rowHeaders const): Ditto.
(AccessibilityUIElement::columnHeaders const): Ditto.
(AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
(AccessibilityUIElement::role): Updated since m_element is a RetainPtr.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::lineForIndex): Use @().
(AccessibilityUIElement::rangeForLine): Use @().
(AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<AccessibilityTextMarkerRange>.
(AccessibilityUIElement::attributesOfColumnHeaders): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(AccessibilityUIElement::setSelectedChild const): Use @[].
(AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
Use @{}, @YES, and @NO.
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* DumpRenderTree/mac/DumpRenderTree.mm:
(addTestPluginsToPluginSearchPath): Use @[].
(resetWebViewToConsistentStateBeforeTesting): Use @[].
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[DumpRenderTreePasteboard declareType:owner:]): Use @[].
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFiles:]): Use @().
(-[EventSendingController sentTouchEventOfType:]): Use @().
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider cancelNotification:]): Use @[].
* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]): Use @().
(-[ObjCController arrayOfString]): Use @[].
(-[ObjCController testWrapperRoundTripping:]): Use @().
(-[ObjCController testArray]): Use @[].
* DumpRenderTree/mac/TestRunnerMac.mm:
(originsArrayToJS): Removed unneeded use of JSValueToObject.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController markedRange]): Use @[] and @().
(-[TextInputController selectedRange]): Use @[] and @().
(-[TextInputController firstRectForCharactersFrom:length:]):
Use @[] and @().
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
Use @[].
(-[TextInputController interpretKeyEvents:withSender:]): Use @[].
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use [].
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Deleted an
unneeded copy constructor and destructor.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Use @{}.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(toVector): Deleted.
(-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
Use makeVector<String>.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(writeImageDataToPasteboard): Use @[] and @{}.
(writeBundleFileToPasteboard): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:
(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
Use @[].
* TestWebKitAPI/ios/mainIOS.mm:
(main): Use @{}.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize): Use @{} and @().
* TestWebKitAPI/mac/mainMac.mm:
(main): Use {}.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
Use id instead of NotificationHandler.
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
Use id for PlatformTextMarkerRange. Added an overload of makeVectorElement
to make makeVector<RefPtr<AccessibilityTextMarkerRange>> work.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
Use RetainPtr. Added an overload of makeVectorElement to make
makeVector<RefPtr<AccessibilityUIElement>> work.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
Removed unneeded include.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertElementsToObjectArray): Removed unneeded use of
JSValueToObject.
(WTR::AccessibilityUIElement::elementsForRange): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize): Use @{}.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::getLinkedUIElements): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::getDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const): Ditto.
(WTR::AccessibilityUIElement::getChildren): Ditto.
(WTR::AccessibilityUIElement::getChildrenWithRange): Ditto.
(WTR::AccessibilityUIElement::rowHeaders const): Ditto.
(WTR::AccessibilityUIElement::columnHeaders const): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Updated since m_element
is a RetainPtr.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::description): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::stringValue): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::lineForIndex): Use @().
(WTR::AccessibilityUIElement::rangeForLine): Use @().
(WTR::AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<RefPtr<AccessibilityTextMarkerRange>>.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(WTR::AccessibilityUIElement::setSelectedChild const): Use @[].
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Take Vector&&.
(WTR::TestInvocation::didReceiveWebViewCategory): Take String&&.
* WebKitTestRunner/TestInvocation.h: Updated for the above.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Use @{}and @().
(WTR::TestController::getAllStorageAccessEntries): Use makeVector<String>.
(WTR::TestController::loadedThirdPartyDomains): Use makeVector<String>.
(WTR::TestController::getWebViewCategory): Update to pass String&&.
(WTR::TestController::setAllowedMenuActions): Use createNSArray.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator interpolatedEvents:]): Use @().
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded): Use @{} and @().
* WebKitTestRunner/mac/TestControllerMac.mm: Removed unneeded include.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use @[].
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[WebKitTestRunnerPasteboard declareType:owner:]): Use @[].
Canonical link: https://commits.webkit.org/223199@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 02:11:30 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextCocoa.mm
|
2020-12-09 18:32:29 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp
|
[Cocoa] Simplify NSArray, NSDictionary, and NSNumber idioms throughout WebKit
https://bugs.webkit.org/show_bug.cgi?id=210138
Reviewed by Alex Christensen.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToObjectWithoutCopy): Use @().
(valueToNumber): Ditto.
* API/tests/testapi.mm:
(-[TestObject callback:]): Use @[], @(), and @{}.
(-[TextXYZ click]): Ditto.
(testObjectiveCAPIMain): Ditto.
Source/WebCore:
- Added createNSArray and makeVector.
- Use createNSArray and makeVector<String> in many places where we convert
between NSArray and Vector, replacing multiple existing functions that were
doing the same job before; later can use them even more.
- Use @[] many places where we create an autoreleased NSArray.
- Use @{} many places where we create an autoreleased NSDictionary.
- Use @() many places where we create an autoreleased NSNumber.
* PlatformMac.cmake: Moved Float/IntRectMac.mm to Float/IntRectCocoa.mm.
* SourcesCocoa.txt: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): Use @[].
(-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]): Use @[].
(-[WebAccessibilityObjectWrapper elementsForRange:]): Use @[].
(-[WebAccessibilityObjectWrapper textMarkersForRange:]): Use @[].
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textReplacementChangeDictionary): Use @().
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(makeVectorElement): Aded overload for AccessibilitySearchKey.
(accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
Use makeVector<AccessibilitySearchKey>.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(accessibilitySearchTextCriteriaForParameterizedAttribute): Use makeVector<String>.
(AXAttributeStringSetStyle): Use @().
(AXAttributeStringSetBlockquoteLevel): Use @().
(AXAttributeStringSetHeadingLevel): Use @().
(-[WebAccessibilityObjectWrapper accessibilityActionNames]): Use @[].
(convertStringsToNSArray): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use @(), @[], and createNSArray.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Ditto.
* bridge/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
Use @().
* editing/cocoa/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::alternativesForContext):
Use makeVector<String>.
* editing/cocoa/HTMLConverter.mm:
(defaultParagraphStyle): Use @[].
(HTMLConverter::computedAttributesForElement): Use @().
(HTMLConverter::_processMetaElementWithName): Use @().
(HTMLConverter::_addTableForElement): Use @().
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot const): Use @[].
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType): Use makeVector<String>.
* platform/graphics/FloatRect.h: Added makeNSArrayElement overload so we can
convert Vector<FloatRect> into NSArray<NSValue>.
* platform/graphics/IntRect.h: Similarly for IntRect.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Use createNSArray.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mediaDescriptionForKind): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use @().
(WebCore::MediaPlayerPrivateAVFoundationObjC::checkPlayability): Use @[].
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use @{} and @().
* platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
(WebCore::PlatformCAAnimationCocoa::valueFunction const):
(WebCore::PlatformCAAnimationCocoa::setFromValue):
(WebCore::PlatformCAAnimationCocoa::copyFromValueFrom):
(WebCore::PlatformCAAnimationCocoa::setToValue):
(WebCore::PlatformCAAnimationCocoa::copyToValueFrom):
(WebCore::PlatformCAAnimationCocoa::setValues):
(WebCore::PlatformCAAnimationCocoa::copyValuesFrom):
(WebCore::PlatformCAAnimationCocoa::setKeyTimes):
(WebCore::PlatformCAAnimationCocoa::copyKeyTimesFrom):
(WebCore::PlatformCAAnimationCocoa::setTimingFunctions):
(WebCore::PlatformCAAnimationCocoa::copyTimingFunctionsFrom):
Use @(), @[], modern for loops, auto, and allocate with capacity.
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::filterValueForOperation): Use @().
* platform/graphics/cocoa/FloatRectCocoa.mm: Moved from mac/FloatRectMac.mm.
(WebCore::makeNSArrayElement): Added so we can convert Vector<FloatRect>
into NSArray<NSValue>.
* platform/graphics/cocoa/IntRectCocoa.mm: Moved from mac/IntRectMac.mm.
(WebCore::makeNSArrayElement): Similarly for IntRect.
(WebCore::enclosingIntRect): Use clampTo to be consistent with what
enclosingIntRect(FloatRect) does (while fixing check-webkit-style complaint).
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]): Add WebCore namespace prefix; needed depending on
how sources get unified (and was affecting my local build when it temporarily
had an additional source file).
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Ditto.
(-[WebGLLayer bindFramebufferToNextAvailableSurface]): Ditto.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::systemFontModificationAttributes): Use @().
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::createItemProviderRegistrationList): Use createNSArray.
(WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers): Use createNSArray.
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItemProviders:]): Use @[].
* platform/ios/wak/WAKView.mm:
(-[WAKView subviews]): Dittto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::getTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::getPathnamesForType const): Use makeVector<String>.
(WebCore::PlatformPasteboard::addTypes): Use makeVector<String>.
(WebCore::PlatformPasteboard::setTypes): Use makeVector<String>.
* platform/mac/StringUtilities.h: Removed
webCoreStringVectorFromNSStringArray, replaced by makeVector<String>
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray): Deleted.
* platform/mac/WebCoreNSURLExtras.mm: Removed unneeded include.
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(WebCore::MediaRecorderPrivateWriter::setVideoInput): Use @().
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setupCaptureSession): Use @().
* platform/network/cocoa/CookieCocoa.mm:
(WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Use @().
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Use @{}.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use @YES/@NO.
Source/WebKit:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm: Remove uneeded include.
* Platform/mac/StringUtilities.mm: Ditto.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch): Use makeVector<String>.
(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
Ditto.
* Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toSupportedNetworks): Deleted.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Use createNSArray.
* Shared/mac/PasteboardTypes.mm:
(WebKit::PasteboardTypes::forEditing): Use @[].
(WebKit::PasteboardTypes::forURL): Ditto.
(WebKit::PasteboardTypes::forImages): Ditto.
(WebKit::PasteboardTypes::forImagesWithArchive): Ditto.
(WebKit::PasteboardTypes::forSelection): Ditto.
* UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(-[WKContentRuleListStore getAvailableContentRuleListIdentifiers:]): Use createNSArray.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _getActivePagesOriginsInWebProcessForTesting:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:userContentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:]):
(-[WKUserScript _initWithSource:injectionTime:forMainFrameOnly:legacyWhitelist:legacyBlacklist:associatedURL:contentWorld:deferRunningUntilNotification:]):
Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _corsDisablingPatterns]): Use createNSArray.
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]): Use makeVector<String>.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]): Use @().
* UIProcess/API/Cocoa/_WKContentRuleListAction.mm:
(-[_WKContentRuleListAction notifications]): Use createNSArray.
* UIProcess/API/Cocoa/_WKCustomHeaderFields.mm:
(-[_WKCustomHeaderFields thirdPartyDomains]): Use createNSArray.
(-[_WKCustomHeaderFields setThirdPartyDomains:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]): Use makeVector<String>.
(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]): Use createNSArray.
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]): Use makeVector<String>.
* UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
(API::toStringVector): Deleted.
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
Use makeVector<String>.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::accessibilityAttributeValue): Use @[].
(WebKit::WebViewImpl::performDragOperation): Use makeVector<String>.
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use @[].
(WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent): Use @[].
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::launchProcess): Use createNSArray.
(WebKit::isJavaUpdaterURL): Use @[].
(WebKit::PluginProcessProxy::launchApplicationAtURL): Use @{} and createNSArray.
(WebKit::isSilverlightPreferencesURL): Use @[].
* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::HidService): Use @() and fixed an over-release mistake.
This code was doing adoptNS on the result of +[NSNumberWithInt:], which is incorrect.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const): Use @[].
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]): Use @().
(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]): Use createNSArray.
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
Fixed a wasteful call to autorelease where we are adding an item to a dictionary. Calling get
is more efficient and still correct.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]): Use @[].
* UIProcess/ios/forms/WKFormColorPicker.mm:
(-[WKColorMatrixView initWithFrame:colorMatrix:]): Removed uneeded RetainPtr
local variable.
* UIProcess/mac/CorrectionPanel.mm:
(WebKit::CorrectionPanel::show): Use createNSArray.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::updateSpellingUIWithGrammarString): Use createNSArray.
(WebKit::TextChecker::getGuessesForWord): Use makeVector<String>.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use @().
* UIProcess/mac/WKTextFinderClient.mm:
(arrayFromRects): Deleted.
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): Use createNSArray.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(-[WKDataListSuggestionsController notifyAccessibilityClients:]): Use @{}
and fix a bug where this was creating a backwards dictionary. So this never
could have been working before, making me wonder how we test it.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Use @[].
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Removed toNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::toNSArray): Deleted.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode textRects]): Use createNSArray.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange textRects]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Use @{}.
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer): Use @[].
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard): Use makeVector<String>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): Use @().
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting): Use @{}.
(WebKit::TiledCoreAnimationDrawingArea::resumePainting): Use @{}.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
Removed an unneeded include.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Ditto.
(-[WKAccessibilityWebPageObject accessibilityActionNames]): Use @[].
(-[WKAccessibilityWebPageObject accessibilityChildren]): Use @[].
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::getActivePagesOriginsForTesting): Use makeVector<String>.
Source/WebKitLegacy/ios:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::runOpenPanel): Use createNSArray.
* WebCoreSupport/WebVisiblePosition.mm:
(-[WebVisiblePosition enclosingRangeWithDictationPhraseAlternatives:]):
Use createNSArray.
* WebCoreSupport/WebVisiblePositionInternal.h:
Added #if so that this correctly doesn't compile anything on Mac.
* WebView/WebPDFViewIOS.mm:
(+[WebPDFView supportedMIMETypes]): Use @[].
Source/WebKitLegacy/mac:
* DOM/DOM.mm:
(kit): Deleted overload that takes Vector<IntRect>.
(-[DOMNode textRects]): Use createNSArray.
(-[DOMRange textRects]): Ditto.
* DOM/ExceptionHandlers.mm:
(raiseDOMErrorException): Use @().
* History/WebBackForwardList.mm:
(-[WebBackForwardList dictionaryRepresentation]): Use @{}.
* History/WebHistory.mm:
(+[WebHistoryPrivate initialize]): Use @{}.
(-[WebHistory _sendNotification:entries:]): Use @{}.
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Use makeVector<String>.
(-[WebHistoryItem dictionaryRepresentation:]): Use createNSArray and @().
* History/WebURLsWithTitles.m:
(+[WebURLsWithTitles arrayWithIFURLsWithTitlesPboardType]): Use @[].
(+[WebURLsWithTitles writeURLs:andTitles:toPasteboard:]): Use @[].
* Misc/WebCache.mm:
(+[WebCache statistics]): Use @[], @{}, and @().
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]): Ditto.
* Misc/WebKitErrors.m:
(-[NSError _webkit_initWithDomain:code:URL:]): Use @().
(+[NSError _registerWebKitErrors]): Use @().
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]): Use @().
* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use @{}.
(-[NSString _web_widthWithFont:]): Use @{}.
* Misc/WebNSFileManagerExtras.mm: Removed unneeded include.
* Misc/WebNSPasteboardExtras.mm:
(+[NSPasteboard _web_dragTypesForURL]): Use @[].
(-[NSPasteboard _web_writeURL:andTitle:types:]): Use @[].
(+[NSPasteboard _web_setFindPasteboardString:withOwner:]): Use @[].
* Misc/WebNSURLExtras.mm: Removed unneeded include.
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost): Use @{}.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCIdentifierInfo): Use @().
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Use @().
* Plugins/Hosted/WebHostedNetscapePluginView.mm: Removed unneeded include.
* Plugins/WebBasePluginPackage.mm: Ditto.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck _actionInformationWithURL:]): Use @{}.
* Plugins/WebPluginDatabase.mm:
(+[WebPluginDatabase _defaultPlugInPaths]): Use @[].
* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager databasesWithOrigin:]): Use createNSArray.
* WebCoreSupport/CorrectionPanel.mm:
(CorrectionPanel::show): Use createNSArray.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Use @().
* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion): Use @().
(WebEditorClient::getGuessesForWord): Use makeVector<String>.
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::actionDictionary const): Use @().
(kit): Deleted overload that takes Vector<String>.
(pluginView): Use @{}.
(WebFrameLoaderClient::createPlugin): Use createNSArray, @{}, and @().
(WebFrameLoaderClient::createJavaAppletWidget): Use createNSArray.
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:]): Use makeVector<String>.
(-[WebOpenPanelResultListener chooseFilename:displayString:iconImage:]): Use @[].
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]): Use makeVector<String>.
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::handleSelectionServiceClick):
Comment out an unused argument.
* WebView/WebFrame.mm:
(-[WebFrame _rectsForRange:]): Use createNSArrray.
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]): Use createNSArray and @[].
(-[WebFrame childFrames]): Use @[].
* WebView/WebHTMLView.mm:
(+[WebHTMLView _selectionPasteboardTypes]): Use @[].
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use @[].
(-[WebHTMLView knowsPageRange:]): Use @[].
(-[WebHTMLView accessibilityAttributeValue:]): Use @[].
(-[WebHTMLView copyFont:]): Use @[].
(-[WebHTMLView _interpretKeyEvent:savingCommands:]): Use @[].
(-[WebHTMLView selectionTextRects]): Use createNSArray.
(-[WebHTMLView rectsForTextMatches]): Use createNSArray and @[].
* WebView/WebPDFRepresentation.mm: Removed unneeded include.
(+[WebPDFRepresentation postScriptMIMETypes]): Use @[].
(+[WebPDFRepresentation supportedMIMETypes]): Use @[].
* WebView/WebPDFView.mm:
(-[WebPDFView elementAtPoint:]): Use @{} and @().
(-[WebPDFView viewState]): Use @().
(-[WebPDFView selectionTextRects]): Use @[].
(-[WebPDFView pasteboardTypesForSelection]): Use @[].
(-[WebPDFView _menuItemsFromPDFKitForEvent:]): Use @().
(-[WebPDFView _openWithFinder:]): Use @{} and @().
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Use @().
(-[WebPreferences _setUnsignedIntValue:forKey:]): Use @().
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Use @().
(-[WebPreferences setStorageBlockingPolicy:]): Use @{} and @().
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed): Use @().
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]): Use @{}.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Use makeVector<String>.
(-[WebView _contentsOfUserInterfaceItem:]): Use @().
(toStringVector): Deleted.
(+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
Use makeVector<String>.
(+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
Use makeVector<String>.
(-[WebView _elementAtWindowPoint:]): Use @{}.
(-[WebView pasteboardTypesForSelection]): Use @[].
(-[WebView pasteboardTypesForElement:]): Use @[].
(-[WebView rectsForTextMatches]): Use @[].
(-[WebView _searchWithGoogleFromMenu:]): Use @[].
(-[WebView _setFontWhitelist:]): Use makeVector<String>.
Source/WTF:
* WTF.xcodeproj/project.pbxproj: Added VectorCocoa.h.
* wtf/PlatformMac.cmake: Ditto.
* wtf/cocoa/NSURLExtras.mm: Removed unneeded include.
* wtf/cocoa/URLCocoa.mm: Ditto.
* wtf/cocoa/VectorCocoa.h: Added. Contains createNSArray and makeVector
function templates for converting NSArray to and from Vector.
* wtf/text/WTFString.h: Added makeNSArrayElement and makeVectorElement
functions, making createNSArray and makeVector compatible with String.
* wtf/text/cocoa/StringCocoa.mm:
(WTF::makeNSArrayElement): Added.
(WTF::makeVectorElement): Added.
Tools:
* DumpRenderTree/AccessibilityController.h: Remove use of NotificationHandler
type; it's just "id".
* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray): Moved this up in the file, removed unneeded
use of JSValueToObject and unused exception argument.
(elementsForRangeCallback): Use convertElementsToObjectArray.
(columnHeadersCallback): Updated for removed exception argument.
(rowHeadersCallback): Ditto.
(uiElementArrayAttributeValueCallback): Ditto.
* DumpRenderTree/AccessibilityUIElement.h: Changed to use RetainPtr.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use @{}.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(AccessibilityUIElement::~AccessibilityUIElement): Deleted.
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use @[].
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Use @[].
* DumpRenderTree/ios/TextInputControllerIOS.m:
(-[TextInputController markedRange]): Use @[].
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(searchPredicateParameterizedAttributeForSearchCriteria): Tweak a little.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Deleted. Duplicate of a method already
implemented in anothe file.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(makeVectorElement): Added overloads to make both
makeVector<AccessibilityTextMarkerRange> and
makeVector<AccessibilityUIElement> work.
(AccessibilityUIElement::AccessibilityUIElement): Removed some unneeded
code now that we use RetainPtr.
(convertVectorToObjectArray): Removed unneeded use of JSValueToObject
and unneeded exception argument.
(convertNSArrayToVector): Deleted.
(AccessibilityUIElement::getLinkedUIElements): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::getDocumentLinks): Ditto.
(AccessibilityUIElement::getChildren): Ditto.
(AccessibilityUIElement::getChildrenWithRange): Ditto.
(AccessibilityUIElement::rowHeaders const): Ditto.
(AccessibilityUIElement::columnHeaders const): Ditto.
(AccessibilityUIElement::uiElementArrayAttributeValue const): Ditto.
(AccessibilityUIElement::role): Updated since m_element is a RetainPtr.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::lineForIndex): Use @().
(AccessibilityUIElement::rangeForLine): Use @().
(AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<AccessibilityTextMarkerRange>.
(AccessibilityUIElement::attributesOfColumnHeaders): Use
makeVector<AccessibilityUIElement>.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(AccessibilityUIElement::setSelectedChild const): Use @[].
(AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
Use @{}, @YES, and @NO.
(AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* DumpRenderTree/mac/DumpRenderTree.mm:
(addTestPluginsToPluginSearchPath): Use @[].
(resetWebViewToConsistentStateBeforeTesting): Use @[].
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[DumpRenderTreePasteboard declareType:owner:]): Use @[].
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFiles:]): Use @().
(-[EventSendingController sentTouchEventOfType:]): Use @().
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider cancelNotification:]): Use @[].
* DumpRenderTree/mac/ObjCController.m:
(-[ObjCController objectOfClass:]): Use @().
(-[ObjCController arrayOfString]): Use @[].
(-[ObjCController testWrapperRoundTripping:]): Use @().
(-[ObjCController testArray]): Use @[].
* DumpRenderTree/mac/TestRunnerMac.mm:
(originsArrayToJS): Removed unneeded use of JSValueToObject.
* DumpRenderTree/mac/TextInputControllerMac.m:
(-[TextInputController markedRange]): Use @[] and @().
(-[TextInputController selectedRange]): Use @[] and @().
(-[TextInputController firstRectForCharactersFrom:length:]):
Use @[] and @().
(-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
Use @[].
(-[TextInputController interpretKeyEvents:withSender:]): Use @[].
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use [].
* DumpRenderTree/win/AccessibilityUIElementWin.cpp: Deleted an
unneeded copy constructor and destructor.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Use @{}.
* TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:
(toVector): Deleted.
(-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):
Use makeVector<String>.
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(writeImageDataToPasteboard): Use @[] and @{}.
(writeBundleFileToPasteboard): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(runWebsiteDataStoreCustomPaths): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteURL.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm:
(TestWebKitAPI::TEST): Use @[].
* TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:
(-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
Use @[].
* TestWebKitAPI/ios/mainIOS.mm:
(main): Use @{}.
* TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
(TestWebKitAPI::InjectedBundleController::platformInitialize): Use @{} and @().
* TestWebKitAPI/mac/mainMac.mm:
(main): Use {}.
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
Use id instead of NotificationHandler.
* WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h:
Use id for PlatformTextMarkerRange. Added an overload of makeVectorElement
to make makeVector<RefPtr<AccessibilityTextMarkerRange>> work.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
Use RetainPtr. Added an overload of makeVectorElement to make
makeVector<RefPtr<AccessibilityUIElement>> work.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
Removed unneeded include.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertElementsToObjectArray): Removed unneeded use of
JSValueToObject.
(WTR::AccessibilityUIElement::elementsForRange): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers):
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize): Use @{}.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Simplified
since we use RetainPtr.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Ditto.
(WTR::convertNSArrayToVector): Deleted.
(WTR::AccessibilityUIElement::getLinkedUIElements): Use
makeVector<RefPtr<AccessibilityUIElement>>.
(WTR::AccessibilityUIElement::getDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::getUIElementsWithAttribute const): Ditto.
(WTR::AccessibilityUIElement::getChildren): Ditto.
(WTR::AccessibilityUIElement::getChildrenWithRange): Ditto.
(WTR::AccessibilityUIElement::rowHeaders const): Ditto.
(WTR::AccessibilityUIElement::columnHeaders const): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Updated since m_element
is a RetainPtr.
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::description): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::stringValue): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::lineForIndex): Use @().
(WTR::AccessibilityUIElement::rangeForLine): Use @().
(WTR::AccessibilityUIElement::searchTextWithCriteria): Use
makeVector<RefPtr<AccessibilityTextMarkerRange>>.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::cellForColumnAndRow): Use @[] and @().
(WTR::AccessibilityUIElement::setSelectedChild const): Use @[].
(WTR::AccessibilityUIElement::setSelectedChildAtIndex const): Use @[].
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Use @[].
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveAllStorageAccessEntries): Take Vector&&.
(WTR::TestInvocation::didReceiveWebViewCategory): Take String&&.
* WebKitTestRunner/TestInvocation.h: Updated for the above.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaPlatformInitialize): Use @{}and @().
(WTR::TestController::getAllStorageAccessEntries): Use makeVector<String>.
(WTR::TestController::loadedThirdPartyDomains): Use makeVector<String>.
(WTR::TestController::getWebViewCategory): Update to pass String&&.
(WTR::TestController::setAllowedMenuActions): Use createNSArray.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator interpolatedEvents:]): Use @().
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::changeWindowScaleIfNeeded): Use @{} and @().
* WebKitTestRunner/mac/TestControllerMac.mm: Removed unneeded include.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::copyText): Use @[].
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[WebKitTestRunnerPasteboard declareType:owner:]): Use @[].
Canonical link: https://commits.webkit.org/223199@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-10 02:11:30 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
|
2020-12-09 18:32:29 +00:00
|
|
|
platform/graphics/cocoa/IntRectCocoa.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/graphics/cocoa/IOSurface.mm
|
|
|
|
platform/graphics/cocoa/IOSurfacePoolCocoa.mm
|
|
|
|
platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm
|
|
|
|
platform/graphics/cocoa/WebCoreCALayerExtras.mm
|
2017-06-17 20:03:58 +00:00
|
|
|
platform/graphics/cocoa/WebCoreDecompressionSession.mm
|
2017-07-13 23:04:13 +00:00
|
|
|
platform/graphics/cocoa/WebGLLayer.mm
|
2017-03-10 03:43:10 +00:00
|
|
|
platform/graphics/cocoa/WebGPULayer.mm
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/cocoa/WebMAudioUtilitiesCocoa.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
|
2020-09-12 10:37:19 +00:00
|
|
|
platform/graphics/coretext/FontCascadeCoreText.cpp
|
|
|
|
platform/graphics/coretext/FontCoreText.cpp
|
|
|
|
platform/graphics/coretext/FontPlatformDataCoreText.cpp
|
|
|
|
platform/graphics/coretext/GlyphPageCoreText.cpp
|
2020-09-11 20:27:38 +00:00
|
|
|
|
2020-11-11 10:44:25 +00:00
|
|
|
platform/graphics/cv/GraphicsContextGLCVANGLE.cpp
|
2019-07-10 20:30:26 +00:00
|
|
|
platform/graphics/cv/ImageRotationSessionVT.mm
|
2016-03-01 11:58:59 +00:00
|
|
|
platform/graphics/cv/PixelBufferConformerCV.cpp
|
|
|
|
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/mac/ColorMac.mm
|
|
|
|
platform/graphics/mac/ComplexTextControllerCoreText.mm
|
|
|
|
platform/graphics/mac/FloatPointMac.mm
|
|
|
|
platform/graphics/mac/FloatSizeMac.mm
|
|
|
|
platform/graphics/mac/FontCustomPlatformData.cpp
|
2021-01-26 13:43:59 +00:00
|
|
|
platform/graphics/mac/GraphicsChecksMac.cpp
|
2015-03-26 22:53:46 +00:00
|
|
|
platform/graphics/mac/IconMac.mm
|
|
|
|
platform/graphics/mac/ImageMac.mm
|
|
|
|
platform/graphics/mac/IntPointMac.mm
|
|
|
|
platform/graphics/mac/IntSizeMac.mm
|
|
|
|
platform/graphics/mac/PDFDocumentImageMac.mm
|
|
|
|
platform/graphics/mac/SimpleFontDataCoreText.cpp
|
2017-07-18 05:57:00 +00:00
|
|
|
platform/graphics/mac/WebLayer.mm
|
2015-03-26 22:53:46 +00:00
|
|
|
|
2015-11-04 08:50:31 +00:00
|
|
|
platform/graphics/opentype/OpenTypeCG.cpp
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/graphics/opentype/OpenTypeMathData.cpp
|
|
|
|
|
|
|
|
platform/mac/CursorMac.mm
|
|
|
|
platform/mac/KeyEventMac.mm
|
2020-05-09 23:10:41 +00:00
|
|
|
platform/mac/LocalCurrentGraphicsContextMac.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/LoggingMac.mm
|
2021-01-27 21:07:46 +00:00
|
|
|
platform/mac/MediaRemoteSoftLink.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/NSScrollerImpDetails.mm
|
|
|
|
platform/mac/PasteboardMac.mm
|
2017-02-21 22:14:50 +00:00
|
|
|
platform/mac/PasteboardWriter.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/PlatformEventFactoryMac.mm
|
|
|
|
platform/mac/PlatformPasteboardMac.mm
|
|
|
|
platform/mac/PlatformScreenMac.mm
|
|
|
|
platform/mac/PlatformSpeechSynthesizerMac.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
platform/mac/PowerObserverMac.cpp
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/PublicSuffixMac.mm
|
2016-08-17 02:42:51 +00:00
|
|
|
platform/mac/SSLKeyGeneratorMac.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/ScrollAnimatorMac.mm
|
2021-02-15 21:48:10 +00:00
|
|
|
platform/mac/ScrollController.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/ScrollViewMac.mm
|
|
|
|
platform/mac/ScrollbarThemeMac.mm
|
2020-02-13 21:40:08 +00:00
|
|
|
platform/mac/SerializedPlatformDataCueMac.mm
|
2017-03-02 23:56:03 +00:00
|
|
|
platform/mac/StringUtilities.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/SuddenTermination.mm
|
|
|
|
platform/mac/ThemeMac.mm
|
|
|
|
platform/mac/ThreadCheck.mm
|
|
|
|
platform/mac/UserActivityMac.mm
|
2016-11-09 17:36:21 +00:00
|
|
|
platform/mac/ValidationBubbleMac.mm
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/mac/WebCoreFullScreenPlaceholderView.mm
|
|
|
|
platform/mac/WebCoreFullScreenWarningView.mm
|
|
|
|
platform/mac/WebCoreFullScreenWindow.mm
|
|
|
|
platform/mac/WebCoreNSURLExtras.mm
|
|
|
|
platform/mac/WebCoreObjCExtras.mm
|
|
|
|
platform/mac/WebNSAttributedStringExtras.mm
|
|
|
|
platform/mac/WidgetMac.mm
|
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp
|
|
|
|
|
2015-11-09 21:20:08 +00:00
|
|
|
platform/mediastream/mac/MockRealtimeVideoSourceMac.mm
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp
|
|
|
|
platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm
|
2015-11-09 21:20:08 +00:00
|
|
|
|
2018-11-13 07:07:21 +00:00
|
|
|
platform/network/cf/CertificateInfoCFNet.cpp
|
Make NetworkRTCResolver port agnostic
https://bugs.webkit.org/show_bug.cgi?id=178855
Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-07
Reviewed by Youenn Fablet.
Source/WebCore:
Add new API in the DNSResolveQueue allowing to revolve hostnames and get the result. Add platform
specific code for soup platform and refactor the other platforms. Added new API to the DNS API header
and move the general code to the DNS.cpp file, that way we can reuse that code in all the platforms
and leave the ResolveQueue class of the platforms in a file.
No new tests because this is a refactor.
* PlatformAppleWin.cmake: Move the DNSCFNet class to DNSResolveQueueCFNet.
* PlatformMac.cmake: Ditto.
* Sources.txt: Add the DNS.cpp for compilation.
* SourcesCocoa.txt: Move the DNSCFNet class to DNSResolveQueueCFNet.
* WebCore.xcodeproj/project.pbxproj: Move the DNSCFNet class to DNSResolveQueueCFNet, add the DNS.cpp
for compilation. Add the new DNSResolveQueueCFNet class.
* platform/Curl.cmake: Move the DNSCFNet class to DNSResolveQueueCurl.
* platform/network/DNS.cpp: Add this file with the default implementation of the DNS functions for
all the platforms.
(WebCore::prefetchDNS): Copied from every platform implementation.
(WebCore::resolveDNS): Add the function, resolves a hostname, receives the identifier of the operation
and the completion handler.
(WebCore::stopResolveDNS): Add the function, stops a resolution operation, receives the identifier
of the operation.
* platform/network/DNS.h: Add the new APIs resolveDNS and stopResolveDNS with the classes used for the
implementation.
(WebCore::IPAddress::IPAddress): Add this class used to send the resolved address information, it does
not depend on libwebrtc rtc classes.
(WebCore::IPAddress::get): Get a reference to the struct sockaddr_in in the IPAddress class.
(WebCore::DNSCompletionHandler): Add this CompletionHandler type to be used when resolving the DNS
address.
* platform/network/DNSResolveQueue.cpp: Add the DNSResolveQueue platform instantiation in the singleton.
(WebCore::DNSResolveQueue::singleton): Use DNSResolveQueue platform classes when creating the singleton..
(WebCore::DNSResolveQueue::resolve): Add this method to get the address of a hostname, it sends the
identifier and the completion handler to use when returning the result.
(WebCore::DNSResolveQueue::stopResolve): Add this method to stop the resolve operation when required.
* platform/network/DNSResolveQueue.h: Add the new methods and make the class abstract, so that every
platform can implement the functions.
* platform/network/cf/DNSResolveQueueCFNet.cpp: Renamed from Source/WebCore/platform/network/cf/DNSCFNet.cpp.
Add the methods to the new class DNSResolveQueueCFNet, move the prefetchDNS to the DNS.cpp general
implementation.
* platform/network/cf/DNSResolveQueueCFNet.h: Add the new class inheriting from the DNSResolveQueue. Add the
new methods, we have to implement these methods and move the NetworkRTCResolver for COCOA code here.
(WebCore::DNSResolveQueueCF::resolve): Dummy method, not implemented.
(WebCore::DNSResolveQueueCF::stopResolve): Ditto.
* platform/network/curl/DNSResolveQueueCurl.cpp: Renamed from Source/WebCore/platform/network/curl/DNSCurl.cpp.
* platform/network/curl/DNSResolveQueueCurl.h: Add the new class inheriting from the DNSResolveQueue.
(WebCore::DNSResolveQueueCurl::resolve): Ditto.
(WebCore::DNSResolveQueueCurl::stopResolve): Ditto.
* platform/network/soup/DNSResolveQueueSoup.h: New class inheriting from the DNSResolveQueue class, adding
a HasMap with the active operations, it allows stopping them.
* platform/network/soup/DNSResolveQueueSoup.cpp: Renamed from Source/WebCore/platform/network/curl/DNSSoup.cpp.
(WebCore::resolvedWithObserverCallback): Called when the result address from the soup platform is ready,
sends the address to the completion handler.
(WebCore::DNSResolveQueueSoup::resolve): Launch the resolve operation with the soup library.
(WebCore::DNSResolveQueueSoup::stopResolve): Stop the resolve operation on process with a GCancellable.
Source/WebKit:
Create a specific Cocoa class to isolate the generic code in the base class, make the base implementation port
agnostic and dependent on DNS API in the platform directory which encapsulates the platform specific details.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp: Create an alias class name defined per platform to instantiate the resolver.
(WebKit::NetworkRTCProvider::createResolver): Used the alias class name and receive a new IPAddress class that is not
dependent on rtc libwebrtc library.
* NetworkProcess/webrtc/NetworkRTCResolver.cpp: Remove the platform specific code. Use the DNS API to implement the
platform specific code in the default start and stop methods. Add the identifier of the resolve operation to the class.
(WebKit::NetworkRTCResolver::NetworkRTCResolver): Add the identifier in the initialization.
(WebKit::NetworkRTCResolver::~NetworkRTCResolver): Remove the platform specific code.
(WebKit::NetworkRTCResolver::completed): Ditto.
(WebKit::NetworkRTCResolver::start): Add a new implementation using the DNS API.
(WebKit::NetworkRTCResolver::stop): Ditto
* NetworkProcess/webrtc/NetworkRTCResolver.h: Remove the platform specific code and use the DNSResolveQueue for a general
solution to implement the platform specific code. Avoid using the IPAddress class that depends on libwertc classes to make
it more general regarding DNS name resolution.
(WebKit::NetworkRTCResolver::start): Make this class virtual.
(WebKit::NetworkRTCResolver::stop): Ditto.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.cpp.
Now this class overrides the start and stop methods that use DNS, cocoa implementation should use the DNS methods in the future and
remove this class, making sure all the platform specific class is in the platform directory.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.h: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
* PlatformGTK.cmake: Add NetworkRTCResolver compilation for GTK.
* WebKit.xcodeproj/project.pbxproj: Add the NetworkRTCResolverCocoa class to the compilation.
Tools:
Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
other platforms when the APIs are supported.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/DNS.cpp:
Canonical link: https://commits.webkit.org/199068@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-03-07 15:21:24 +00:00
|
|
|
platform/network/cf/DNSResolveQueueCFNet.cpp
|
2014-08-05 22:28:19 +00:00
|
|
|
platform/network/cf/FormDataStreamCFNet.cpp
|
|
|
|
platform/network/cf/NetworkStorageSessionCFNet.cpp
|
|
|
|
platform/network/cf/ProxyServerCFNet.cpp
|
|
|
|
platform/network/cf/ResourceRequestCFNet.cpp
|
2016-08-15 21:23:32 +00:00
|
|
|
platform/network/cf/SocketStreamHandleImplCFNet.cpp
|
2014-08-05 22:28:19 +00:00
|
|
|
|
2017-03-13 20:17:17 +00:00
|
|
|
platform/network/cocoa/CookieCocoa.mm
|
2017-07-25 11:43:22 +00:00
|
|
|
platform/network/cocoa/CookieStorageObserver.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/network/cocoa/CredentialCocoa.mm
|
[Resource Timing] Gather timing information with reliable responseEnd time
https://bugs.webkit.org/show_bug.cgi?id=168351
Reviewed by Alex Christensen.
LayoutTests/imported/w3c:
* web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-location-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-location-worker-expected.txt:
New behavior for too many redirects caused by <rdar://problem/30610988>.
* web-platform-tests/resource-timing/rt-nextHopProtocol-expected.txt: Added.
* web-platform-tests/resource-timing/rt-nextHopProtocol.html: Added.
* web-platform-tests/resource-timing/rt-nextHopProtocol.js: Added.
* web-platform-tests/resource-timing/rt-nextHopProtocol.worker-expected.txt: Added.
* web-platform-tests/resource-timing/rt-nextHopProtocol.worker.html: Added.
* web-platform-tests/resource-timing/rt-nextHopProtocol.worker.js: Added.
New tests specific to just checking the nextHopProtocol property with
a non-cached resource to avoid flakeyness.
Source/WebCore:
This patch replaces the unused `double finishTime` in ResourceLoader's
didFinishLoad with a complete WebCore::NetworkLoadMetrics object. This
allows the NetworkProcess to give complete timing information, and more
final metrics about the load, to WebCore. Currently this is only used
by ResourceTiming, but it will soon be used by Web Inspector as well.
We may also end up extending this to the didFail path as well, since it
is possible that we have some metrics for load failures.
At the same time we want to start moving away from the legacy path that
populated a subset of this information in ResourceResponse's NetworkLoadMetrics.
It doesn't make sense to store this information on the ResourceResponse
for a few reasons: We don't want to store the metrics in our Network Cache and
not all of the load timing metrics have been populated yet (responseEnd).
In an effort to move off of this data we've renamed the accessor to
"deprecatedNetworkLoadMetrics". There are a few remaining clients
(ResourceHandle, PerformanceTiming, InspectorNetworkAgent) which can be
migrated separately from this patch.
Having both the legacy and new code paths adds a little bit of complexity.
One advantage of the new path is that the complete load timing data
(fetchStart -> dns -> connect -> request -> response -> responseEnd) can
be packaged together. The legacy path could not include a responseEnd, so
WebCore faked that value with its own timestamp. Having the fake responseEnd
caused issues as timestamps / clocks are different between processes. In order
for PerformanceResponseTiming to know whether or not the NetworkLoadMetrics
has the complete network timing metrics it checks isComplete(). If true
it knows it can use the responseEnd time from NetworkLoadMetrics, otherwise
it must fallback to the legacy value from LoadTiming. Once all of the
deprecatedNetworkLoadMetrics clients go away, we should always have the
complete data and this can be eliminated.
Tests: imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.html
imported/w3c/web-platform-tests/resource-timing/rt-nextHopProtocol.worker.html
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
Rename NetworkLoadTiming -> NetworkLoadMetrics.
* page/PerformanceResourceTiming.cpp:
(WebCore::entryStartTime):
(WebCore::entryEndTime):
(WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
(WebCore::PerformanceResourceTiming::nextHopProtocol):
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::connectEnd):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::requestStart):
(WebCore::PerformanceResourceTiming::responseStart):
(WebCore::PerformanceResourceTiming::responseEnd):
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp):
* page/PerformanceResourceTiming.h:
Mostly just updating names and types. This does however need to get the
correct endTime based on whether the NetworkLoadMetrics are complete
(meaning includes responseEnd) or not (legacy, use LoadTiming value).
* page/PerformanceResourceTiming.idl:
Add nextHopProtocol.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::connectEnd):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
* page/PerformanceTiming.h:
Navigation Timing values still uses the NetworkLoadTiming values stored on
the DocumentLoader. This should be moved off of the deprecated path separately.
* platform/network/NetworkLoadMetrics.h: Renamed from Source/WebCore/platform/network/NetworkLoadTiming.h.
(WebCore::NetworkLoadMetrics::NetworkLoadMetrics):
(WebCore::NetworkLoadMetrics::isolatedCopy):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::operator==):
(WebCore::NetworkLoadMetrics::operator!=):
(WebCore::NetworkLoadMetrics::isComplete):
(WebCore::NetworkLoadMetrics::markComplete):
(WebCore::NetworkLoadMetrics::encode):
(WebCore::NetworkLoadMetrics::decode):
Re-introduce a reset() method (for NetworkLoadSoup to reset between redirects).
Add protocolName and "complete" boolean.
* platform/network/cocoa/NetworkLoadMetrics.mm: Renamed from Source/WebCore/platform/network/cocoa/NetworkLoadTiming.mm.
(WebCore::timingValue):
(WebCore::copyTimingData):
(WebCore::setCollectsTimingData):
Use this opportunity to convert NetworkLoadTiming timestamps to WTF::Seconds.
Since we already have to modify all the clients this moves us to use the more
strongly typed units that are less ambiguous then "double". The rest of the
Performance API has already moved to these units.
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForTiming):
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):
* inspector/InspectorNetworkAgent.h:
Inspector was the only client of the finishTime, and since the value was
erratically coming from clients in different ways it was almost certainly
inaccurate. Simplify this in preparation for using NetworkLoadMetrics.
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::didFinishLoading):
* Modules/fetch/FetchLoader.h:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didFinishLoading):
* fileapi/FileReaderLoader.h:
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseNPTTime):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didFinishLoading):
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::maybeLoadEmpty):
* loader/DocumentLoader.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::notifyFinished):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/DocumentThreadableLoader.h:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::didFinishLoading):
* loader/NetscapePlugInStreamLoader.h:
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
* loader/ResourceLoadNotifier.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::deliverResponseAndData):
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::didFinishLoading):
(WebCore::ResourceLoader::didFinishLoadingOnePart):
* loader/ResourceLoader.h:
* loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::fromLoad):
(WebCore::ResourceTiming::fromSynchronousLoad):
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::isolatedCopy):
* loader/ResourceTiming.h:
(WebCore::ResourceTiming::networkLoadMetrics):
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::networkLoadTiming): Deleted.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::willSendRequestInternal):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::reportResourceTiming):
* loader/SubresourceLoader.h:
* loader/ThreadableLoaderClient.h:
(WebCore::ThreadableLoaderClient::didFinishLoading):
* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
* loader/WorkerThreadableLoader.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoading):
* loader/appcache/ApplicationCacheGroup.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::setLoadFinishTime):
* loader/ios/QuickLook.mm:
(-[WebPreviewLoader connectionDidFinishLoading:]):
* page/EventSource.cpp:
(WebCore::EventSource::didFinishLoading):
* page/EventSource.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(ResourceHandleStreamingClient::didFinishLoading):
* platform/network/BlobResourceHandle.cpp:
(WebCore::doNotifyFinish):
* platform/network/PingHandle.h:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didFinishLoading):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::crossThreadData):
(WebCore::ResourceResponseBase::fromCrossThreadData):
(WebCore::ResourceResponseBase::compare):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::deprecatedNetworkLoadMetrics):
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):
(WebCore::ResourceResponseBase::networkLoadTiming): Deleted.
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didFinishLoading):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::WebCoreSynchronousLoader::didFinishLoading):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::calculateWebTimingInformations):
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::handleDataURL):
(WebCore::milisecondsSinceRequest): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getConnectionTimingData):
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::restartedCallback):
(WebCore::nextMultipartResponsePartCallback):
(WebCore::sendRequestCallback):
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
(WebCore::ResourceHandle::sendPendingRequest):
(WebCore::readCallback):
(WebCore::milisecondsSinceRequest): Deleted.
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::didFinishLoading):
* workers/WorkerScriptLoader.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didFinishLoading):
* xml/XMLHttpRequest.h:
Eliminate the unused finishTime double.
Source/WebKit2:
Change from an unused `double finishTime` to a complete WebCore::NetworkLoadMetrics
object in the didFinishLoad ResourceLoader path. We may also extend this in the
didFail path later on. This allows the NetworkProcess to give complete timing
information, and more final metrics about the load, to WebCore.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTaskClient::didCompleteWithError):
Give the NetworkDataTaskClient a basic didCompleteWithError for a completion
without metrics. For loads that complete with an error, or haven't populated
any metrics, this will pass empty metrics onward.
* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didFinishLoading):
* NetworkProcess/Downloads/BlobDownloadClient.h:
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/PingLoad.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::didFail):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::didCompleteWithError):
(WebKit::NetworkLoad::didFinishLoading):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didReceiveResource):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
Change didFinishLoad paths to take a NetworkLoadMetrics object instead of finishTime.
Change didCompleteWithError pathes to include a NetworkLoadMetrics object instead of finishTime.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::didCompleteWithError):
Own a NetworkLoadTiming that will be populated with the load.
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Populate NetworkLoadMetrics in the didFinishCollectingMetrics NSURLSessionTaskDelegate method.
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::timeoutFired):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):
(WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
(WebKit::NetworkDataTaskSoup::tlsErrorsChanged):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::didFinishRead):
(WebKit::NetworkDataTaskSoup::didFinishRequestNextPart):
(WebKit::NetworkDataTaskSoup::didFailDownload):
(WebKit::NetworkDataTaskSoup::didFail):
(WebKit::NetworkDataTaskSoup::networkEvent):
(WebKit::NetworkDataTaskSoup::didStartRequest):
(WebKit::NetworkDataTaskSoup::didRestart):
* NetworkProcess/soup/NetworkDataTaskSoup.h:
Instead of populating the NetworkLoadMetrics on the ResourceResponse, populate
a member variable during the entire load and dispatch didFinishCollectingMetrics
right before didCompleteLoadWithError.
Source/WTF:
* wtf/persistence/Coders.h:
(WTF::Persistence::Coder<Seconds>::encode):
(WTF::Persistence::Coder<Seconds>::decode):
LayoutTests:
* TestExpectations:
Now that nextHopProtocol is available on Mac mark the test as flakey
because the value can be set or not depending on whether or not the
resource was loaded from a cache.
* platform/ios-simulator/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
Mark nextHopProtocol tests as expected to fail on ports that do not
yet support those values. Mark redirect tests as failing on ports
that encounter the CFNetwork issue causing unexpected callbacks.
* performance-api/resource-timing-apis-expected.txt:
* performance-api/resources/resource-timing-api.js:
Progressions.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/resource-timing/test_resource_timing-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/resource-timing/test_resource_timing-expected.txt: Added.
Expected passing values on mac, except el capitan where this new resource timing data is unavailable.
Canonical link: https://commits.webkit.org/185854@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-02-25 05:48:51 +00:00
|
|
|
platform/network/cocoa/NetworkLoadMetrics.mm
|
2017-03-13 20:17:17 +00:00
|
|
|
platform/network/cocoa/NetworkStorageSessionCocoa.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
platform/network/cocoa/ProtectionSpaceCocoa.mm
|
|
|
|
platform/network/cocoa/ResourceRequestCocoa.mm
|
2015-12-22 23:52:00 +00:00
|
|
|
platform/network/cocoa/ResourceResponseCocoa.mm
|
2016-02-15 20:49:23 +00:00
|
|
|
platform/network/cocoa/WebCoreNSURLSession.mm
|
2015-06-09 09:46:19 +00:00
|
|
|
|
2014-08-05 00:30:15 +00:00
|
|
|
platform/network/mac/AuthenticationMac.mm
|
|
|
|
platform/network/mac/BlobDataFileReferenceMac.mm
|
|
|
|
platform/network/mac/CookieStorageMac.mm
|
|
|
|
platform/network/mac/CredentialStorageMac.mm
|
|
|
|
platform/network/mac/FormDataStreamMac.mm
|
|
|
|
platform/network/mac/NetworkStateNotifierMac.cpp
|
|
|
|
platform/network/mac/ResourceErrorMac.mm
|
|
|
|
platform/network/mac/ResourceHandleMac.mm
|
|
|
|
platform/network/mac/SynchronousLoaderClient.mm
|
|
|
|
platform/network/mac/UTIUtilities.mm
|
|
|
|
platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
|
|
|
|
platform/network/mac/WebCoreURLResponse.mm
|
|
|
|
|
2020-02-07 04:12:39 +00:00
|
|
|
platform/text/cocoa/LocaleCocoa.mm
|
|
|
|
|
2014-08-08 18:13:54 +00:00
|
|
|
platform/text/cf/HyphenationCF.cpp
|
|
|
|
|
|
|
|
platform/text/mac/TextBoundaries.mm
|
2018-08-21 16:47:43 +00:00
|
|
|
platform/text/mac/TextCheckingMac.mm
|
2017-08-29 00:55:01 +00:00
|
|
|
platform/text/mac/TextEncodingRegistryMac.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2017-06-28 19:46:10 +00:00
|
|
|
rendering/RenderThemeCocoa.mm
|
2015-09-14 21:22:46 +00:00
|
|
|
rendering/RenderThemeMac.mm
|
|
|
|
rendering/TextAutoSizing.cpp
|
2017-11-29 21:31:07 +00:00
|
|
|
|
|
|
|
xml/SoftLinkLibxslt.cpp
|
2014-08-13 22:53:12 +00:00
|
|
|
)
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/airplay/WebMediaSessionManager.h
|
|
|
|
Modules/airplay/WebMediaSessionManagerClient.h
|
|
|
|
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayCouponCodeUpdate.h
|
|
|
|
Modules/applepay/ApplePayDateComponents.h
|
|
|
|
Modules/applepay/ApplePayDateComponentsRange.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/applepay/ApplePayDetailsUpdateBase.h
|
|
|
|
Modules/applepay/ApplePayDetailsUpdateData.h
|
|
|
|
Modules/applepay/ApplePayError.h
|
|
|
|
Modules/applepay/ApplePayErrorCode.h
|
|
|
|
Modules/applepay/ApplePayErrorContactField.h
|
|
|
|
Modules/applepay/ApplePayLineItem.h
|
|
|
|
Modules/applepay/ApplePayPaymentMethodUpdate.h
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayPaymentTiming.h
|
|
|
|
Modules/applepay/ApplePayRecurringPaymentDateUnit.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/applepay/ApplePaySetupConfiguration.h
|
|
|
|
Modules/applepay/ApplePaySetupFeatureWebCore.h
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayShippingContactEditingMode.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/applepay/ApplePayShippingContactUpdate.h
|
|
|
|
Modules/applepay/ApplePayShippingMethod.h
|
|
|
|
Modules/applepay/ApplePayShippingMethodUpdate.h
|
|
|
|
Modules/applepay/PaymentInstallmentConfigurationWebCore.h
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/PaymentSessionError.h
|
|
|
|
Modules/applepay/PaymentSummaryItems.h
|
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/encryptedmedia/legacy/LegacyCDM.h
|
2021-04-26 21:37:26 +00:00
|
|
|
Modules/encryptedmedia/legacy/LegacyCDMPrivate.h
|
2021-04-06 03:19:14 +00:00
|
|
|
|
|
|
|
Modules/mediasession/MediaPositionState.h
|
2021-04-26 21:37:26 +00:00
|
|
|
Modules/mediasession/MediaSession.h
|
|
|
|
Modules/mediasession/MediaSessionAction.h
|
|
|
|
Modules/mediasession/MediaSessionActionDetails.h
|
|
|
|
Modules/mediasession/MediaSessionActionHandler.h
|
|
|
|
Modules/mediasession/MediaSessionCoordinator.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/mediasession/MediaSessionCoordinatorPrivate.h
|
|
|
|
Modules/mediasession/MediaSessionCoordinatorState.h
|
|
|
|
Modules/mediasession/MediaSessionPlaybackState.h
|
|
|
|
Modules/mediasession/MediaSessionReadyState.h
|
2021-04-26 21:37:26 +00:00
|
|
|
Modules/mediasession/NavigatorMediaSession.h
|
2021-04-06 03:19:14 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
accessibility/mac/WebAccessibilityObjectWrapperBase.h
|
|
|
|
accessibility/mac/WebAccessibilityObjectWrapperMac.h
|
2018-02-14 04:25:09 +00:00
|
|
|
|
2019-05-27 09:52:19 +00:00
|
|
|
bridge/objc/WebScriptObject.h
|
|
|
|
bridge/objc/WebScriptObjectPrivate.h
|
|
|
|
|
2020-02-04 23:36:21 +00:00
|
|
|
crypto/CryptoAlgorithmIdentifier.h
|
|
|
|
crypto/CryptoKey.h
|
|
|
|
crypto/CryptoKeyType.h
|
|
|
|
crypto/CryptoKeyUsage.h
|
|
|
|
crypto/CryptoKeyPair.h
|
|
|
|
crypto/CommonCryptoUtilities.h
|
|
|
|
|
|
|
|
crypto/keys/CryptoKeyHMAC.h
|
|
|
|
crypto/keys/CryptoAesKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoEcKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoHmacKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoKeyAES.h
|
|
|
|
crypto/keys/CryptoKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoRsaHashedKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoRsaKeyAlgorithm.h
|
|
|
|
crypto/keys/CryptoKeyEC.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
dom/EventLoop.h
|
|
|
|
dom/WindowEventLoop.h
|
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
editing/cocoa/AlternativeTextContextController.h
|
2020-03-09 01:03:34 +00:00
|
|
|
editing/cocoa/AlternativeTextUIController.h
|
2021-04-06 03:19:14 +00:00
|
|
|
editing/cocoa/AttributedString.h
|
2019-07-10 20:30:26 +00:00
|
|
|
editing/cocoa/AutofillElements.h
|
2019-04-18 23:20:26 +00:00
|
|
|
editing/cocoa/DataDetection.h
|
2021-04-06 03:19:14 +00:00
|
|
|
editing/cocoa/DataDetectorType.h
|
2019-04-18 23:20:26 +00:00
|
|
|
editing/cocoa/HTMLConverter.h
|
2015-03-20 18:18:41 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
editing/mac/DictionaryLookup.h
|
2015-03-20 18:18:41 +00:00
|
|
|
editing/mac/TextAlternativeWithRange.h
|
2019-04-18 23:20:26 +00:00
|
|
|
editing/mac/TextUndoInsertionMarkupMac.h
|
2021-04-06 03:19:14 +00:00
|
|
|
editing/mac/UniversalAccessZoom.h
|
2015-03-20 18:18:41 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
loader/archive/cf/LegacyWebArchive.h
|
2015-03-17 00:29:55 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
loader/mac/LoaderNSURLExtras.h
|
2015-03-20 18:18:41 +00:00
|
|
|
|
2020-02-04 23:36:21 +00:00
|
|
|
Modules/webauthn/AuthenticatorAssertionResponse.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/webauthn/AuthenticatorAttachment.h
|
2020-02-04 23:36:21 +00:00
|
|
|
Modules/webauthn/AuthenticatorAttestationResponse.h
|
2021-04-06 03:19:14 +00:00
|
|
|
Modules/webauthn/AuthenticatorResponse.h
|
2020-02-04 23:36:21 +00:00
|
|
|
|
|
|
|
Modules/webauthn/fido/Pin.h
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
page/mac/TextIndicatorWindow.h
|
|
|
|
page/mac/WebCoreFrameView.h
|
2018-02-13 21:31:41 +00:00
|
|
|
|
2019-10-01 06:29:13 +00:00
|
|
|
page/scrolling/ScrollingStateOverflowScrollProxyNode.h
|
2019-10-01 20:35:50 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreeFixedNode.h
|
2019-10-01 20:35:50 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h
|
2019-04-18 23:20:26 +00:00
|
|
|
page/scrolling/cocoa/ScrollingTreePositionedNode.h
|
|
|
|
page/scrolling/cocoa/ScrollingTreeStickyNode.h
|
2015-03-17 00:29:55 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
|
|
|
|
page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h
|
|
|
|
page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h
|
2018-02-14 04:25:09 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/FrameRateMonitor.h
|
|
|
|
platform/ImageExtractionResult.h
|
|
|
|
platform/MainThreadSharedTimer.h
|
2019-10-31 22:45:05 +00:00
|
|
|
platform/PictureInPictureSupport.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/PlatformContentFilter.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/ScrollController.h
|
|
|
|
platform/ScrollSnapAnimatorState.h
|
|
|
|
platform/SharedTimer.h
|
|
|
|
platform/SystemSoundManager.h
|
2019-10-31 22:45:05 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/audio/cocoa/AudioDestinationCocoa.h
|
|
|
|
platform/audio/cocoa/AudioOutputUnitAdaptor.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/audio/cocoa/AudioSampleBufferList.h
|
|
|
|
platform/audio/cocoa/AudioSampleDataSource.h
|
|
|
|
platform/audio/cocoa/CAAudioStreamDescription.h
|
|
|
|
platform/audio/cocoa/CARingBuffer.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/audio/cocoa/MediaSessionManagerCocoa.h
|
|
|
|
platform/audio/cocoa/WebAudioBufferList.h
|
2018-02-14 04:25:09 +00:00
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/audio/ios/MediaSessionManagerIOS.h
|
2015-03-17 00:29:55 +00:00
|
|
|
|
2015-03-20 18:18:41 +00:00
|
|
|
platform/cf/RunLoopObserver.h
|
2015-03-17 00:29:55 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/cocoa/AGXCompilerService.h
|
|
|
|
platform/cocoa/CoreVideoSoftLink.h
|
2020-05-09 23:10:41 +00:00
|
|
|
platform/cocoa/LocalCurrentGraphicsContext.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/cocoa/NetworkExtensionContentFilter.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/cocoa/PlatformView.h
|
|
|
|
platform/cocoa/PlaybackSessionModel.h
|
|
|
|
platform/cocoa/PlaybackSessionModelMediaElement.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/cocoa/PowerSourceNotifier.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/cocoa/SearchPopupMenuCocoa.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/cocoa/SystemBattery.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/cocoa/SystemVersion.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/cocoa/VersionChecks.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/cocoa/VideoFullscreenChangeObserver.h
|
|
|
|
platform/cocoa/VideoFullscreenModel.h
|
|
|
|
platform/cocoa/VideoFullscreenModelVideoElement.h
|
|
|
|
|
|
|
|
platform/gamepad/cocoa/GameControllerGamepadProvider.h
|
|
|
|
|
|
|
|
platform/gamepad/mac/HIDGamepad.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/gamepad/mac/HIDGamepadElement.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/gamepad/mac/HIDGamepadProvider.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/gamepad/mac/MultiGamepadProvider.h
|
2019-04-18 23:20:26 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/ImageDecoder.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/ImageDecoderIdentifier.h
|
|
|
|
platform/graphics/ImageUtilities.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/graphics/MIMETypeCache.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/Model.h
|
|
|
|
|
|
|
|
platform/graphics/angle/GraphicsContextGLANGLEEGLUtilities.h
|
2020-02-04 23:36:21 +00:00
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
|
[iPad] YouTube does not automatically AirPlay when a route is selected from Control Center
https://bugs.webkit.org/show_bug.cgi?id=206539
Source/WebCore:
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
No new tests; change affects an interaction with two platform features (local AirPlay
route picking and actual remote playback over AirPlay routes) that is not testable in
an automated fashion.
The underlying source of the bug is the difference in how the platform communitcates that an
AirPlay route was picked between iOS and macOS. On iOS, route changes are global and are
generally pushed up from AVPlayer notifications. On macOS, route changes are local to the
app and are pushed down from the UIProcess. But when MSE playback was enabled on iPadOS,
there was now a limbo where media playback was no longer using an AVPlayer, but at the same
time, route changes could be initiated globally. The end result is that MSE-based media
elements are never notified that they "should play to playback target", and no remote
playback events are ever fired.
To re-create the same macOS behavior when MSE-backed media elements are used on iPadOS,
re-use the existing route change detection logic in MediaSessionManageriOS to query whether
the newly established route supports AirPlay Video, and if so, send a message to the "now
playing" media element that it should begin AirPlaying, which will fail, but will trigger
the YouTube player to switch to a HLS-backed media element.
This requires renaming MediaPlaybackTargetMac -> MediaPlaybackTargetCocoa.
* SourcesCocoa.txt:
* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.h.
(WebCore::MediaPlaybackTargetCocoa::outputContext const):
* platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm: Renamed from Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm.
(WebCore::MediaPlaybackTargetCocoa::create):
(WebCore::MediaPlaybackTargetCocoa::MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::~MediaPlaybackTargetCocoa):
(WebCore::MediaPlaybackTargetCocoa::targetContext const):
(WebCore::MediaPlaybackTargetCocoa::hasActiveRoute const):
(WebCore::MediaPlaybackTargetCocoa::deviceName const):
(WebCore::toMediaPlaybackTargetCocoa):
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
Source/WebKit:
<rdar://problem/54173689>
Patch by Jer Noble <jer.noble@apple.com> on 2020-01-21
Reviewed by Eric Carlson.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected const):
Canonical link: https://commits.webkit.org/219613@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-21 21:44:00 +00:00
|
|
|
platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/avfoundation/SampleBufferDisplayLayer.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/avfoundation/WebMediaSessionManagerMac.h
|
|
|
|
|
2019-10-01 20:35:50 +00:00
|
|
|
platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h
|
|
|
|
platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h
|
|
|
|
platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h
|
2019-10-01 20:35:50 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/ca/GraphicsLayerCA.h
|
|
|
|
platform/graphics/ca/LayerPool.h
|
|
|
|
platform/graphics/ca/PlatformCAAnimation.h
|
|
|
|
platform/graphics/ca/PlatformCAFilters.h
|
|
|
|
platform/graphics/ca/PlatformCALayer.h
|
|
|
|
platform/graphics/ca/PlatformCALayerClient.h
|
|
|
|
platform/graphics/ca/TileController.h
|
|
|
|
|
|
|
|
platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h
|
|
|
|
platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/ca/cocoa/WebVideoContainerLayer.h
|
2019-04-18 23:20:26 +00:00
|
|
|
|
Simplify adding new color spaces to WebCore
https://bugs.webkit.org/show_bug.cgi?id=220146
Reviewed by Dean Jackson.
Reduce the number of places one needs to touch when adding new color types to:
- ColorTypes.h
- ColorConversion.h/cpp
- ColorSpace.h/cpp (only needed if support in Color is required).
- ColorSerialization.h (only needed if support in Color is required).
- ColorSpaceCG.h/cpp (only needed if support in Color is required).
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
Add ColorSpace.cpp, ColorSpaceCG.h and ColorSpaceCG.cpp.
* platform/graphics/Color.cpp:
* platform/graphics/Color.h:
(WebCore::Color::Color):
(WebCore::Color::setColor):
Replace specific overloads of the contructor and setColor with template functions
that do the same things. These are safe to make as if a non-supported color type
(one that doesn't have a colorSpace member) is passed it will fail to compile due
to use beneath ExtendedColor::create().
Also moves WTF::TextStream operator<< overload for ColorSpace out and into
ColorSpace.cpp where it makes more sense.
* platform/graphics/ColorConversion.cpp:
* platform/graphics/ColorConversion.h:
Re-order and explicitly comment conversion functions to be more clear.
As the comment indicates, all color types must implement at least the following
conversions:
XYZA<float> toXYZA(const ColorType<float>&);
ColorType<float> toColorType(const XYZA<float>&);
This allows generic fallback code, inline at the bottom of the header, to
support conversion to and from any set of colors. Additional conversion functions
are useful for the cases where the optimal or base conversion is not through XYZ
such as from SRGBA to LinearSRGBA.
To allow this to work a few additional conversion functions were added which just
combine existing conversions together and one was added for SRGBA to CMYKA which
was missing, though currently unused.
* platform/graphics/ColorSpace.cpp: Added.
(WebCore::operator<<):
* platform/graphics/ColorSpace.h:
Moved from Color.h
* platform/graphics/ColorTypes.h:
(WebCore::callWithColorType):
This is a generalization of ExtendedColor::callOnUnderlyingType() that also
has the benefit of now being in the same file as the color type definitions,
reducing the number of files people need to touch.
* platform/graphics/ColorUtilities.h:
(WebCore::colorByModifingEachNonAlphaComponent):
Update to not assume that colors use the names red/green/blue for non-alpha
components. This makes it work generically for all four component color types.
* platform/graphics/ExtendedColor.h:
(WebCore::ExtendedColor::callOnUnderlyingType const):
Use generalized form, callWithColorType to avoid requiring modiftying this
when new color types are added.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::leakCGColor):
When going to generalize this (we could have simply called
`return CGColorCreate(cachedCGColorSpace(colorSpace), cgFloatComponents))`
I noticed this was not doing the right thing for CG ports that don't support
all the color spaces WebCore requires (such as Windows). For instance,
displayP3ColorSpaceRef() just returns sRGBColorSpaceRef() on windows, meaning
we would be taking some DisplayP3 components and having CG interpret them as
sRGB. To avoid this, we now check if the color space returned is the fallback
color space, sRGB, and do our own conversion to sRGB using ColorConversion
before creating the color.
This also resolves a long standing bug / FIXME around LinearRGB where we were
using sRGBColorSpaceRef() for them. In practice, we don't actually ever create
LinearRGB CGColorRefs right now, but if we ever do in the future, makes sense
to use the right color space.
* platform/graphics/cg/ColorSpaceCG.cpp: Added.
(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
* platform/graphics/cg/ColorSpaceCG.h: Added.
(WebCore::cachedCGColorSpace):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef): Deleted.
(WebCore::linearRGBColorSpaceRef): Deleted.
(WebCore::extendedSRGBColorSpaceRef): Deleted.
(WebCore::displayP3ColorSpaceRef): Deleted.
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace): Deleted.
Moved color space specific CG code to its own files to make it more clear
where to find them.
Canonical link: https://commits.webkit.org/232686@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-26 17:42:33 +00:00
|
|
|
platform/graphics/cg/ColorSpaceCG.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/cg/GraphicsContextCG.h
|
|
|
|
platform/graphics/cg/IOSurfacePool.h
|
2020-02-19 01:12:47 +00:00
|
|
|
platform/graphics/cg/ImageBufferCGBackend.h
|
|
|
|
platform/graphics/cg/ImageBufferCGBitmapBackend.h
|
|
|
|
platform/graphics/cg/ImageBufferIOSurfaceBackend.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/cg/ImageBufferUtilitiesCG.h
|
|
|
|
platform/graphics/cg/PDFDocumentImage.h
|
|
|
|
platform/graphics/cg/UTIRegistry.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/cocoa/ColorCocoa.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/cocoa/FontCacheCoreText.h
|
|
|
|
platform/graphics/cocoa/FontFamilySpecificationCoreText.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h
|
2015-03-17 00:29:55 +00:00
|
|
|
platform/graphics/cocoa/IOSurface.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/cocoa/MediaPlaybackTargetContext.h
|
|
|
|
platform/graphics/cocoa/SourceBufferParser.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/cocoa/SourceBufferParserWebM.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/cocoa/VP9UtilitiesCocoa.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h
|
|
|
|
platform/graphics/cocoa/WebCoreCALayerExtras.h
|
2021-08-16 09:08:12 +00:00
|
|
|
platform/graphics/cocoa/WebMAudioUtilitiesCocoa.h
|
2019-04-18 23:20:26 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/cv/GraphicsContextGLCV.h
|
|
|
|
platform/graphics/cv/ImageRotationSessionVT.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/cv/PixelBufferConformerCV.h
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/mac/ColorMac.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/mac/FontCustomPlatformData.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/graphics/mac/GraphicsChecksMac.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/graphics/mac/ScopedHighPerformanceGPURequest.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/graphics/mac/SwitchingGPUClient.h
|
|
|
|
platform/graphics/mac/WebLayer.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/ios/LocalizedDeviceModel.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/ios/PlaybackSessionInterfaceAVKit.h
|
|
|
|
platform/ios/WebAVPlayerController.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/ios/wak/FloatingPointEnvironment.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/ios/wak/WebCoreThreadRun.h
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/mac/DynamicLinkerInterposing.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mac/HIDDevice.h
|
|
|
|
platform/mac/HIDElement.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/mac/LegacyNSPasteboardTypes.h
|
|
|
|
platform/mac/LocalDefaultSystemAppearance.h
|
|
|
|
platform/mac/NSScrollerImpDetails.h
|
|
|
|
platform/mac/PasteboardWriter.h
|
|
|
|
platform/mac/PlatformEventFactoryMac.h
|
|
|
|
platform/mac/PlaybackSessionInterfaceMac.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mac/PluginBlocklist.h
|
|
|
|
platform/mac/PowerObserverMac.h
|
|
|
|
platform/mac/SerializedPlatformDataCueMac.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/mac/ScrollbarThemeMac.h
|
|
|
|
platform/mac/StringUtilities.h
|
|
|
|
platform/mac/VideoFullscreenInterfaceMac.h
|
|
|
|
platform/mac/WebCoreFullScreenPlaceholderView.h
|
|
|
|
platform/mac/WebCoreFullScreenWindow.h
|
|
|
|
platform/mac/WebCoreNSFontManagerExtras.h
|
|
|
|
platform/mac/WebCoreNSURLExtras.h
|
|
|
|
platform/mac/WebCoreObjCExtras.h
|
|
|
|
platform/mac/WebCoreView.h
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mac/WebGLBlocklist.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/mac/WebNSAttributedStringExtras.h
|
|
|
|
platform/mac/WebPlaybackControlsManager.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/mediarecorder/MediaRecorderPrivateOptions.h
|
|
|
|
|
2021-04-06 03:19:14 +00:00
|
|
|
platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h
|
|
|
|
|
|
|
|
platform/mediastream/AudioMediaStreamTrackRenderer.h
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/mediastream/RealtimeIncomingVideoSource.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/mediastream/RealtimeMediaSourceIdentifier.h
|
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h
|
|
|
|
platform/mediastream/mac/RealtimeVideoUtilities.h
|
|
|
|
platform/mediastream/mac/WebAudioSourceProviderCocoa.h
|
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h
|
|
|
|
|
|
|
|
platform/network/cf/AuthenticationCF.h
|
|
|
|
platform/network/cf/AuthenticationChallenge.h
|
2015-03-17 00:29:55 +00:00
|
|
|
platform/network/cf/CertificateInfo.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/network/cf/DownloadBundle.h
|
|
|
|
platform/network/cf/LoaderRunLoopCF.h
|
|
|
|
platform/network/cf/ProtectionSpaceCFNet.h
|
|
|
|
platform/network/cf/ResourceError.h
|
|
|
|
platform/network/cf/ResourceRequest.h
|
|
|
|
platform/network/cf/ResourceRequestCFNet.h
|
2014-08-13 22:53:12 +00:00
|
|
|
platform/network/cf/ResourceResponse.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/network/cf/SocketStreamHandleImpl.h
|
2015-03-17 00:29:55 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/network/cocoa/CookieStorageObserver.h
|
|
|
|
platform/network/cocoa/CredentialCocoa.h
|
2020-02-04 23:36:21 +00:00
|
|
|
platform/network/cocoa/HTTPCookieAcceptPolicyCocoa.h
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/network/cocoa/ProtectionSpaceCocoa.h
|
|
|
|
platform/network/cocoa/WebCoreNSURLSession.h
|
2018-02-14 04:25:09 +00:00
|
|
|
|
2019-04-18 23:20:26 +00:00
|
|
|
platform/network/mac/AuthenticationMac.h
|
|
|
|
platform/network/mac/FormDataStreamMac.h
|
|
|
|
platform/network/mac/UTIUtilities.h
|
|
|
|
platform/network/mac/WebCoreURLResponse.h
|
2019-10-31 22:45:05 +00:00
|
|
|
|
|
|
|
testing/MockWebAuthenticationConfiguration.h
|
2021-04-06 03:19:14 +00:00
|
|
|
|
|
|
|
testing/cocoa/WebViewVisualIdentificationOverlay.h
|
2015-03-20 18:18:41 +00:00
|
|
|
)
|
|
|
|
|
2015-09-25 22:04:32 +00:00
|
|
|
list(APPEND WebCore_IDL_FILES
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/ApplePayCancelEvent.idl
|
|
|
|
Modules/applepay/ApplePayContactField.idl
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayCouponCodeChangedEvent.idl
|
|
|
|
Modules/applepay/ApplePayCouponCodeDetails.idl
|
|
|
|
Modules/applepay/ApplePayCouponCodeUpdate.idl
|
|
|
|
Modules/applepay/ApplePayDateComponents.idl
|
|
|
|
Modules/applepay/ApplePayDateComponentsRange.idl
|
2021-02-19 17:38:37 +00:00
|
|
|
Modules/applepay/ApplePayDetailsUpdateBase.idl
|
|
|
|
Modules/applepay/ApplePayDetailsUpdateData.idl
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/ApplePayError.idl
|
|
|
|
Modules/applepay/ApplePayErrorCode.idl
|
|
|
|
Modules/applepay/ApplePayErrorContactField.idl
|
2020-07-03 03:40:51 +00:00
|
|
|
Modules/applepay/ApplePayInstallmentItem.idl
|
|
|
|
Modules/applepay/ApplePayInstallmentItemType.idl
|
|
|
|
Modules/applepay/ApplePayInstallmentConfiguration.idl
|
|
|
|
Modules/applepay/ApplePayInstallmentRetailChannel.idl
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/ApplePayLineItem.idl
|
|
|
|
Modules/applepay/ApplePayMerchantCapability.idl
|
|
|
|
Modules/applepay/ApplePayPayment.idl
|
|
|
|
Modules/applepay/ApplePayPaymentAuthorizationResult.idl
|
|
|
|
Modules/applepay/ApplePayPaymentAuthorizedEvent.idl
|
|
|
|
Modules/applepay/ApplePayPaymentContact.idl
|
|
|
|
Modules/applepay/ApplePayPaymentMethod.idl
|
|
|
|
Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl
|
|
|
|
Modules/applepay/ApplePayPaymentMethodType.idl
|
|
|
|
Modules/applepay/ApplePayPaymentMethodUpdate.idl
|
|
|
|
Modules/applepay/ApplePayPaymentPass.idl
|
|
|
|
Modules/applepay/ApplePayPaymentRequest.idl
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayPaymentTiming.idl
|
|
|
|
Modules/applepay/ApplePayRecurringPaymentDateUnit.idl
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/ApplePayRequestBase.idl
|
|
|
|
Modules/applepay/ApplePaySession.idl
|
|
|
|
Modules/applepay/ApplePaySessionError.idl
|
2020-07-03 03:40:51 +00:00
|
|
|
Modules/applepay/ApplePaySetup.idl
|
|
|
|
Modules/applepay/ApplePaySetupConfiguration.idl
|
|
|
|
Modules/applepay/ApplePaySetupFeature.idl
|
|
|
|
Modules/applepay/ApplePaySetupFeatureState.idl
|
|
|
|
Modules/applepay/ApplePaySetupFeatureType.idl
|
2021-06-08 22:15:18 +00:00
|
|
|
Modules/applepay/ApplePayShippingContactEditingMode.idl
|
2019-10-31 22:45:05 +00:00
|
|
|
Modules/applepay/ApplePayShippingContactSelectedEvent.idl
|
|
|
|
Modules/applepay/ApplePayShippingContactUpdate.idl
|
|
|
|
Modules/applepay/ApplePayShippingMethod.idl
|
|
|
|
Modules/applepay/ApplePayShippingMethodSelectedEvent.idl
|
|
|
|
Modules/applepay/ApplePayShippingMethodUpdate.idl
|
|
|
|
Modules/applepay/ApplePayValidateMerchantEvent.idl
|
|
|
|
|
|
|
|
Modules/applepay/paymentrequest/ApplePayModifier.idl
|
|
|
|
Modules/applepay/paymentrequest/ApplePayRequest.idl
|
|
|
|
|
2015-09-25 22:04:32 +00:00
|
|
|
Modules/plugins/QuickTimePluginReplacement.idl
|
|
|
|
)
|
|
|
|
|
2015-03-20 18:18:41 +00:00
|
|
|
set(FEATURE_DEFINES_OBJECTIVE_C "LANGUAGE_OBJECTIVE_C=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
|
|
|
|
set(ADDITIONAL_BINDINGS_DEPENDENCIES
|
|
|
|
${WINDOW_CONSTRUCTORS_FILE}
|
|
|
|
${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
|
|
|
|
${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
|
|
|
|
)
|
2021-04-06 03:19:14 +00:00
|
|
|
set(CSS_VALUE_PLATFORM_DEFINES "WTF_PLATFORM_MAC=1 HAVE_OS_DARK_MODE_SUPPORT=1 WTF_PLATFORM_COCOA=1")
|
|
|
|
|
|
|
|
set(MODERN_MEDIA_CONTROLS_STYLE_SHEETS
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/activity-indicator.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/airplay-button.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/background-tint.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/button.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/buttons-container.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/controls-bar.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/inline-media-controls.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/macos-inline-media-controls.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/media-controls.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/media-document.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/placard.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/slider.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/status-label.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/text-tracks.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/time-label.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/watchos-activity-indicator.css"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/watchos-media-controls.css"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.css
|
|
|
|
DEPENDS ${MODERN_MEDIA_CONTROLS_STYLE_SHEETS}
|
|
|
|
COMMAND cat ${MODERN_MEDIA_CONTROLS_STYLE_SHEETS} > ${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.css
|
|
|
|
VERBATIM)
|
|
|
|
|
|
|
|
set(MODERN_MEDIA_CONTROLS_SCRIPTS
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/main.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/gesture-recognizers/tap.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/gesture-recognizers/pinch.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/scheduler.js"
|
2021-06-27 01:07:51 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/layout-traits.js"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/layout-node.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/layout-item.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/icon-service.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/background-tint.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/time-control.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/time-label.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/slider.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/play-pause-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/skip-back-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/skip-forward-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/mute-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/airplay-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/pip-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/tracks-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/fullscreen-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/seek-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/rewind-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/forward-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/overflow-button.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/buttons-container.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/status-label.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/controls-bar.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/auto-hide-controller.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/media-controls.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/background-click-delegate-notifier.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/inline-media-controls.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/ios-inline-media-controls.js"
|
2021-06-27 01:07:51 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/ios-layout-traits.js"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/macos-inline-media-controls.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js"
|
2021-06-27 01:07:51 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/macos-layout-traits.js"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/placard.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/airplay-placard.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/invalid-placard.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/pip-placard.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/watchos-activity-indicator.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/watchos-media-controls.js"
|
2021-06-27 01:07:51 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/controls/watchos-layout-traits.js"
|
2021-04-06 03:19:14 +00:00
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/media-controller-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/airplay-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/audio-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/controls-visibility-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/fullscreen-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/mute-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/overflow-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/pip-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/placard-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/playback-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/scrubbing-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/seek-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/seek-backward-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/seek-forward-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/skip-back-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/skip-forward-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/start-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/status-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/time-control-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/tracks-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/volume-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/media-document-controller.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/watchos-media-controls-support.js"
|
|
|
|
"${WEBCORE_DIR}/Modules/modern-media-controls/media/media-controller.js"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.js
|
|
|
|
DEPENDS ${MODERN_MEDIA_CONTROLS_SCRIPTS}
|
|
|
|
COMMAND cat ${MODERN_MEDIA_CONTROLS_SCRIPTS} > ${WebCore_DERIVED_SOURCES_DIR}/ModernMediaControls.js
|
|
|
|
VERBATIM)
|
2019-07-10 20:30:26 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibraryFunctionMap.cpp
|
|
|
|
MAIN_DEPENDENCY Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt
|
|
|
|
DEPENDS Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py
|
|
|
|
COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py ${WEBCORE_DIR}/Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibraryFunctionMap.cpp
|
|
|
|
VERBATIM)
|
2019-10-31 22:45:05 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibrary.h
|
|
|
|
DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${WEBCORE_DIR}/Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt
|
|
|
|
COMMAND gzip -cn ${WEBCORE_DIR}/Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt > ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibrary.gz
|
|
|
|
COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WHLSLStandardLibrary ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibrary.gz ${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibrary.h
|
|
|
|
VERBATIM)
|
|
|
|
list(APPEND WebCore_SOURCES
|
|
|
|
${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibrary.h
|
|
|
|
${WebCore_DERIVED_SOURCES_DIR}/WHLSLStandardLibraryFunctionMap.cpp
|
|
|
|
)
|
2015-09-14 21:22:46 +00:00
|
|
|
|
2016-04-06 05:31:07 +00:00
|
|
|
list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE WebCore)
|
2016-04-01 16:45:58 +00:00
|
|
|
list(APPEND WebCoreTestSupport_SOURCES
|
|
|
|
testing/Internals.mm
|
2021-04-26 21:37:26 +00:00
|
|
|
testing/MockApplePaySetupFeature.cpp
|
2016-04-01 16:45:58 +00:00
|
|
|
testing/MockContentFilter.cpp
|
|
|
|
testing/MockContentFilterSettings.cpp
|
2021-04-26 21:37:26 +00:00
|
|
|
testing/MockMediaSessionCoordinator.cpp
|
2019-10-31 22:45:05 +00:00
|
|
|
testing/MockPaymentCoordinator.cpp
|
2017-03-22 22:25:09 +00:00
|
|
|
testing/MockPreviewLoaderClient.cpp
|
2019-10-31 22:45:05 +00:00
|
|
|
testing/ServiceWorkerInternals.mm
|
2017-01-07 03:49:04 +00:00
|
|
|
|
|
|
|
testing/cocoa/WebArchiveDumpSupport.mm
|
2016-04-06 05:31:07 +00:00
|
|
|
)
|
2019-10-31 22:45:05 +00:00
|
|
|
list(APPEND WebCoreTestSupport_IDL_FILES
|
|
|
|
testing/MockPaymentAddress.idl
|
|
|
|
testing/MockPaymentContactFields.idl
|
|
|
|
testing/MockPaymentCoordinator.idl
|
|
|
|
testing/MockPaymentError.idl
|
|
|
|
testing/MockWebAuthenticationConfiguration.idl
|
|
|
|
)
|
2016-04-09 00:36:06 +00:00
|
|
|
|
2021-04-26 21:37:26 +00:00
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION} -force_load ${CMAKE_BINARY_DIR}/lib/libPAL.a")
|
|
|
|
|
|
|
|
if (NOT EXISTS ${CMAKE_BINARY_DIR}/WebCore/WebKitAvailability.h)
|
|
|
|
file(COPY platform/cocoa/WebKitAvailability.h DESTINATION ${CMAKE_BINARY_DIR}/WebCore)
|
|
|
|
endif ()
|