2020-02-11 21:37:58 +00:00
|
|
|
// Copyright (C) 2018-2020 Apple Inc. All rights reserved.
|
2018-08-18 01:31:15 +00:00
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions
|
|
|
|
// are met:
|
|
|
|
// 1. Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
// 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
|
|
// documentation and/or other materials provided with the distribution.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
|
|
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
|
|
|
|
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
// THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* en.lproj/Localizable.strings:
Add a string for the user-visible name of the GPU process.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit:
Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.
In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.
For now, it is just a shell of a process; functionality will be added
in future patches!
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* Configurations/GPUService.xcconfig: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
* Shared/AuxiliaryProcess.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Platform/ExtraPrivateSymbolsForTAPI.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* Configurations/WebKit.xcconfig:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.
* GPUProcess/GPUConnectionToWebProcess.cpp: Added.
* GPUProcess/GPUConnectionToWebProcess.h: Added.
* GPUProcess/GPUConnectionToWebProcess.messages.in: Added.
On the GPU process side, the incoming connection from the Web Content process.
* GPUProcess/GPUProcess.cpp: Added.
* GPUProcess/GPUProcess.h: Added.
* GPUProcess/GPUProcess.messages.in: Added.
* GPUProcess/GPUProcessCreationParameters.cpp: Added.
* GPUProcess/GPUProcessCreationParameters.h: Added.
* GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
* GPUProcess/ios/GPUProcessIOS.mm: Added.
* GPUProcess/mac/GPUProcessMac.mm: Added.
Add the shell of the GPU process. Mostly stolen from the Networking process.
* UIProcess/GPU/GPUProcessProxy.cpp: Added.
(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):
* UIProcess/GPU/GPUProcessProxy.h: Added.
* UIProcess/GPU/GPUProcessProxy.messages.in: Added.
On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.
This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getGPUProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getGPUProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.
* WebProcess/GPU/GPUProcessConnection.cpp: Added.
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):
* WebProcess/GPU/GPUProcessConnection.h: Added.
(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):
* WebProcess/GPU/GPUProcessConnection.messages.in: Added.
* WebProcess/GPU/GPUProcessConnectionInfo.h: Added.
(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.
* WebProcess/WebProcess.cpp:
(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.
Source/WebKitLegacy/mac:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Canonical link: https://commits.webkit.org/218060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 09:58:21 +00:00
|
|
|
GPUProcess/GPUProcess.cpp
|
|
|
|
GPUProcess/GPUConnectionToWebProcess.cpp
|
|
|
|
GPUProcess/GPUProcessCreationParameters.cpp
|
[Concurrent display lists] Add an initial implementation of concurrent display list rendering
https://bugs.webkit.org/show_bug.cgi?id=218426
<rdar://problem/71167220>
Reviewed by Ryosuke Niwa.
This patch adds a first-cut implementation of concurrent display list rendering, which allows the GPU and web
processes to read and write display list data at the same time. To achieve this, we remove the placeholder
shared memory display list encoding mechanism previously added in <webkit.org/b/218406>, and replace it with a
new model in which a writer (i.e. the web process) and a reader (i.e. the GPU process) share a set of reusable
shared memory buffers which contain display list item data. As the writer appends data to shared memory, it
increments a counter in each shared memory buffer that represents the number of bytes that the reader has yet to
read; as the reader reads display list items from shared memory, it decrements this counter.
This patch also implements a simple strategy for reusing these shared item buffers. The web process maintains a
queue of reusable buffers; when display list items are appended and the current writable buffer is out of
capacity, the display list item buffer calls out to WebKit2 via a client method to request more shared memory.
Here, the web process traverses the queue of reusable item buffers in search of a buffer with sufficient
capacity; if found, we hand this back to WebCore as an opaque `ItemBufferHandle`; otherwise, we allocate a new
reusable shared memory buffer. Item buffers that have been used become reusable only after they are (1) no
longer being read from -- i.e., the counter value is 0, and (2) they are not actively being written to.
Buffers that have been used are lazily reintroduced into the reuse queue when a display list requests a handle
to writable item buffer data.
See below for more details.
* GPUProcess/graphics/DisplayListReaderHandle.cpp: Copied from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListReaderHandle::advance):
(WebKit::DisplayListReaderHandle::displayListForReading const):
* GPUProcess/graphics/DisplayListReaderHandle.h: Copied from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListReaderHandle::create):
(WebKit::DisplayListReaderHandle::DisplayListReaderHandle):
Add a new helper class to represent a shared display list item buffer that the GPU process can use to consume
display list items. Advancing the cursor in `DisplayListReaderHandle` decrements the "remaining bytes" counter;
the class also has a helper method for creating a new `DisplayList` with a given offset into the shared buffer,
as well the number of bytes to read.
* GPUProcess/graphics/RemoteImageBuffer.h:
Handle the `MetaCommandSwitchTo` and `FlushContext` items by (respectively) informing the rendering backend
about the next buffer to read from, and sending a "flush committed" IPC message back to the web process.
(WebKit::RemoteImageBuffer::RemoteImageBuffer):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::applyDisplayListsFromHandle):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
This is the main loop in the GPU process that is responsible for applying incoming display list item data. This
IPC endpoint receives information about where to start (i.e. an item buffer ID and an offset into shared memory
in that buffer) and begins reading ranges of display list item data inside that buffer. After it is done
processing all of its unread bytes, it then checks the unread byte count once again, and continues the loop if
the web process has advanced this count.
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):
Add logic to handle the case where we reached the end of an item buffer, but the next buffer identifier is still
unknown to us (since it is still "in transit" via the `DidCreateSharedDisplayListHandle` IPC message). In this
case, we remember the next buffer identifier in `m_nextItemBufferToRead`, and exit the processing loop inside
`wakeUpAndApplyDisplayList`. Upon receiving the shared memory handle in `didCreateSharedDisplayListHandle`, we
then automatically resume display list processing, starting from the beginning of this new buffer.
(WebKit::RemoteRenderingBackend::applyDisplayList): Deleted.
(WebKit::RemoteRenderingBackend::submitDisplayList): Deleted.
(WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): Deleted.
(WebKit::RemoteRenderingBackend::didCreateSharedItemData): Deleted.
We don't need any of these methods anymore, now that there is only one codepath for processing display list
items. See `RemoteRenderingBackend::wakeUpAndApplyDisplayList` above. Also, rename `didCreateSharedItemData`
to `didCreateSharedDisplayListHandle` (also above).
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* Shared/SharedDisplayListHandle.h:
(WebKit::SharedDisplayListHandle::sharedMemory):
(WebKit::SharedDisplayListHandle::sharedMemory const):
(WebKit::SharedDisplayListHandle::identifier const):
(WebKit::SharedDisplayListHandle::data const):
(WebKit::SharedDisplayListHandle::unreadBytes):
(WebKit::SharedDisplayListHandle::Lock::Lock):
(WebKit::SharedDisplayListHandle::Lock::~Lock):
(WebKit::SharedDisplayListHandle::SharedDisplayListHandle):
(WebKit::SharedDisplayListHandle::header):
(WebKit::SharedDisplayListHandle::header const):
(WebKit::SharedDisplayListHandle::encode const): Deleted.
(WebKit::SharedDisplayListHandle::decode): Deleted.
Repurpose `SharedDisplayListHandle` to serve as a base class for both `DisplayListReaderHandle` and
`DisplayListWriterHandle`. This base class is aware of the memory layout of the display list item buffer in
shared memory (in particular, the fact that the first 8 bytes are the atomic lock and the next 8 bytes contain
the unread byte counter).
Internally, this uses a protected RAII class, `SharedDisplayListHandle::Lock`, to grab the lock before either
reading or writing the unread bytes count.
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/DisplayListWriterHandle.cpp: Added.
(WebKit::DisplayListWriterHandle::advance):
(WebKit::DisplayListWriterHandle::availableCapacity const):
(WebKit::DisplayListWriterHandle::createHandle const):
(WebKit::DisplayListWriterHandle::resetWritableOffsetIfPossible):
This helper method moves the writable offset (see below) back to the start of the buffer if it is not being read
from by the GPU process.
* WebProcess/GPU/graphics/DisplayListWriterHandle.h: Renamed from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListWriterHandle::create):
(WebKit::DisplayListWriterHandle::writableOffset const):
Similar to `DisplayListReaderHandle`, except that this contains logic specific to the web process for writing
display list items into shared memory. Advancing the cursor in `DisplayListWriterHandle` increments the counter.
It also increments the `writableOffset` of the handle, which represents the minimum offset into the shared
buffer that may contain newly appended display list items.
(WebKit::DisplayListWriterHandle::DisplayListWriterHandle):
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::submitDisplayList):
(WebKit::RemoteRenderingBackendProxy::updateReusableHandles):
This private helper iterates the set of buffers that are not currently being written to, and adds each one to
the reusable buffer queue only if its writable offset is at the start.
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):
Implements logic that hands shared item buffer data handles to WebCore for writing display list items. This will
try to reuse an item buffer in the reuse queue, if possible, and fall back to allocating a new chunk of shared
memory if no reusable buffer is found (or the existing buffers have insufficient capacity). The fact that we
iterate through each reusable buffer in order, combined with the above logic in `updateReusableHandles`, ensures
that once we begin writing to a item buffer, we will continue using that item buffer until it exhausts available
capacity.
This property is important because it allows the GPU process to simply start reading item data from a given
offset and buffer ID (specified in the `WakeUpAndApplyDisplayList` IPC message), and seamlessly continue
reading data even after it exhausts all available item data in the current buffer by continuing from the start
of the item buffer that contains the next display list items (which we learn in the GPU process by encountering
a `MetaCommandSwitchTo` item at the end of the previous buffer).
In "steady state" (wherein both processes are concurrently writing and reading items as quickly as possible),
this means that as the web process is busy filling up each item buffer with item data, the GPU process is also
busy applying all the item data in one buffer and automatically moving on to the next buffer with no additional
IPC messages required.
(WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
Canonical link: https://commits.webkit.org/231461@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-11 15:06:54 +00:00
|
|
|
GPUProcess/graphics/DisplayListReaderHandle.cpp
|
2020-10-16 22:20:58 +00:00
|
|
|
GPUProcess/graphics/RemoteRenderingBackend.cpp
|
2020-12-09 18:32:29 +00:00
|
|
|
GPUProcess/graphics/RemoteGraphicsContextGL.cpp
|
2020-10-17 06:46:25 +00:00
|
|
|
GPUProcess/graphics/RemoteResourceCache.cpp
|
2021-04-02 04:42:15 +00:00
|
|
|
GPUProcess/graphics/ScopedRenderingResourcesRequest.cpp
|
|
|
|
GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp
|
2021-02-11 07:24:24 +00:00
|
|
|
GPUProcess/media/RemoteAudioHardwareListenerProxy.cpp
|
2020-03-05 19:43:12 +00:00
|
|
|
GPUProcess/media/RemoteAudioSessionProxy.cpp
|
|
|
|
GPUProcess/media/RemoteAudioSessionProxyManager.cpp
|
2020-01-13 22:27:39 +00:00
|
|
|
GPUProcess/media/RemoteAudioTrackProxy.cpp
|
2020-03-04 19:42:28 +00:00
|
|
|
GPUProcess/media/RemoteCDMFactoryProxy.cpp
|
|
|
|
GPUProcess/media/RemoteCDMInstanceProxy.cpp
|
|
|
|
GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp
|
|
|
|
GPUProcess/media/RemoteCDMProxy.cpp
|
2020-03-09 00:34:40 +00:00
|
|
|
GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp
|
|
|
|
GPUProcess/media/RemoteLegacyCDMProxy.cpp
|
|
|
|
GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp
|
2020-12-04 22:57:47 +00:00
|
|
|
GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.cpp
|
2020-01-06 23:49:21 +00:00
|
|
|
GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
|
|
|
|
GPUProcess/media/RemoteMediaPlayerProxy.cpp
|
|
|
|
GPUProcess/media/RemoteMediaResource.cpp
|
|
|
|
GPUProcess/media/RemoteMediaResourceLoader.cpp
|
|
|
|
GPUProcess/media/RemoteMediaResourceManager.cpp
|
2020-11-17 17:25:27 +00:00
|
|
|
GPUProcess/media/RemoteMediaSourceProxy.cpp
|
2021-02-11 21:49:12 +00:00
|
|
|
GPUProcess/media/RemoteRemoteCommandListenerProxy.cpp
|
2020-11-17 17:25:27 +00:00
|
|
|
GPUProcess/media/RemoteSourceBufferProxy.cpp
|
2020-02-11 21:37:58 +00:00
|
|
|
GPUProcess/media/RemoteTextTrackProxy.cpp
|
2020-01-14 08:16:00 +00:00
|
|
|
GPUProcess/media/RemoteVideoTrackProxy.cpp
|
2020-02-27 01:51:57 +00:00
|
|
|
GPUProcess/webrtc/RemoteMediaRecorder.cpp
|
|
|
|
GPUProcess/webrtc/RemoteMediaRecorderManager.cpp
|
|
|
|
GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp
|
|
|
|
GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp
|
Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* en.lproj/Localizable.strings:
Add a string for the user-visible name of the GPU process.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit:
Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.
In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.
For now, it is just a shell of a process; functionality will be added
in future patches!
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* Configurations/GPUService.xcconfig: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
* Shared/AuxiliaryProcess.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Platform/ExtraPrivateSymbolsForTAPI.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* Configurations/WebKit.xcconfig:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.
* GPUProcess/GPUConnectionToWebProcess.cpp: Added.
* GPUProcess/GPUConnectionToWebProcess.h: Added.
* GPUProcess/GPUConnectionToWebProcess.messages.in: Added.
On the GPU process side, the incoming connection from the Web Content process.
* GPUProcess/GPUProcess.cpp: Added.
* GPUProcess/GPUProcess.h: Added.
* GPUProcess/GPUProcess.messages.in: Added.
* GPUProcess/GPUProcessCreationParameters.cpp: Added.
* GPUProcess/GPUProcessCreationParameters.h: Added.
* GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
* GPUProcess/ios/GPUProcessIOS.mm: Added.
* GPUProcess/mac/GPUProcessMac.mm: Added.
Add the shell of the GPU process. Mostly stolen from the Networking process.
* UIProcess/GPU/GPUProcessProxy.cpp: Added.
(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):
* UIProcess/GPU/GPUProcessProxy.h: Added.
* UIProcess/GPU/GPUProcessProxy.messages.in: Added.
On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.
This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getGPUProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getGPUProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.
* WebProcess/GPU/GPUProcessConnection.cpp: Added.
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):
* WebProcess/GPU/GPUProcessConnection.h: Added.
(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):
* WebProcess/GPU/GPUProcessConnection.messages.in: Added.
* WebProcess/GPU/GPUProcessConnectionInfo.h: Added.
(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.
* WebProcess/WebProcess.cpp:
(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.
Source/WebKitLegacy/mac:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Canonical link: https://commits.webkit.org/218060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 09:58:21 +00:00
|
|
|
|
2020-11-12 02:04:28 +00:00
|
|
|
NetworkProcess/PrivateClickMeasurementManager.cpp
|
2021-03-31 02:52:37 +00:00
|
|
|
NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkActivityTracker.cpp
|
2021-07-16 00:36:39 +00:00
|
|
|
NetworkProcess/NetworkBroadcastChannelRegistry.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkCORSPreflightChecker.cpp
|
|
|
|
NetworkProcess/NetworkConnectionToWebProcess.cpp
|
|
|
|
NetworkProcess/NetworkContentRuleListManager.cpp
|
|
|
|
NetworkProcess/NetworkDataTask.cpp
|
|
|
|
NetworkProcess/NetworkDataTaskBlob.cpp
|
|
|
|
NetworkProcess/NetworkLoad.cpp
|
|
|
|
NetworkProcess/NetworkLoadChecker.cpp
|
2021-01-27 12:39:27 +00:00
|
|
|
NetworkProcess/NetworkLoadScheduler.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkProcess.cpp
|
|
|
|
NetworkProcess/NetworkProcessCreationParameters.cpp
|
|
|
|
NetworkProcess/NetworkProcessPlatformStrategies.cpp
|
|
|
|
NetworkProcess/NetworkResourceLoadParameters.cpp
|
2019-03-13 17:57:57 +00:00
|
|
|
NetworkProcess/NetworkResourceLoadMap.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkResourceLoader.cpp
|
2019-10-24 18:50:26 +00:00
|
|
|
NetworkProcess/NetworkSchemeRegistry.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkSession.cpp
|
2018-11-29 02:18:37 +00:00
|
|
|
NetworkProcess/NetworkSessionCreationParameters.cpp
|
2019-06-13 01:04:16 +00:00
|
|
|
NetworkProcess/NetworkSocketChannel.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/NetworkSocketStream.cpp
|
|
|
|
NetworkProcess/PingLoad.cpp
|
|
|
|
NetworkProcess/PreconnectTask.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2019-03-05 03:00:29 +00:00
|
|
|
NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
|
2019-01-08 22:02:16 +00:00
|
|
|
NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
|
2019-03-05 03:00:29 +00:00
|
|
|
NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
|
2019-01-08 22:02:16 +00:00
|
|
|
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/Cookies/WebCookieManager.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/Downloads/Download.cpp
|
|
|
|
NetworkProcess/Downloads/DownloadManager.cpp
|
2019-02-05 21:27:21 +00:00
|
|
|
NetworkProcess/Downloads/DownloadMap.cpp
|
2019-03-18 22:38:55 +00:00
|
|
|
NetworkProcess/Downloads/DownloadMonitor.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/Downloads/PendingDownload.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
|
2018-09-17 07:11:55 +00:00
|
|
|
NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp
|
2019-12-11 21:47:39 +00:00
|
|
|
NetworkProcess/IndexedDB/WebIDBServer.cpp
|
2018-09-17 07:11:55 +00:00
|
|
|
|
2019-03-05 21:49:28 +00:00
|
|
|
NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp @no-unify
|
2019-12-04 13:47:49 +00:00
|
|
|
NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp
|
2018-09-25 21:57:42 +00:00
|
|
|
NetworkProcess/ServiceWorker/WebSWOriginStore.cpp @no-unify
|
|
|
|
NetworkProcess/ServiceWorker/WebSWServerConnection.cpp @no-unify
|
|
|
|
NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp @no-unify
|
|
|
|
|
2019-05-21 00:07:39 +00:00
|
|
|
NetworkProcess/WebStorage/LocalStorageDatabase.cpp
|
|
|
|
NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp
|
2019-08-08 16:46:57 +00:00
|
|
|
NetworkProcess/WebStorage/LocalStorageNamespace.cpp
|
|
|
|
NetworkProcess/WebStorage/SessionStorageNamespace.cpp
|
|
|
|
NetworkProcess/WebStorage/StorageArea.cpp
|
2019-05-21 00:07:39 +00:00
|
|
|
NetworkProcess/WebStorage/StorageManager.cpp
|
Some improvements on web storage
https://bugs.webkit.org/show_bug.cgi?id=200373
Reviewed by Geoffrey Garen.
Source/WebCore:
Remove storage type EphemeralLocalStorage, which is used for localStorage in ephemeral session, and use
LocalStorage instead.
Add SessionID to StorageNamespace to make StorageNamespace session-specific.
No new test, updating existing tests for new behavior.
* loader/EmptyClients.cpp:
(WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
* page/Chrome.cpp:
(WebCore::Chrome::createWindow const): ephemeral localStorage of different windows will connect to the same
StorageArea in network process, so no need to copy from parent window to child window.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::prewarmLocalStorageIfNecessary): localStorage will be prewarmed in network process in the
initialization of StorageAreaMap.
* page/Page.cpp:
(WebCore::m_applicationManifest):
(WebCore::Page::~Page):
(WebCore::Page::setSessionID):
(WebCore::Page::ephemeralLocalStorage): Deleted.
(WebCore::Page::setEphemeralLocalStorage): Deleted.
(WebCore::Page::setStorageNamespaceProvider): Deleted.
* page/Page.h:
(WebCore::Page::storageNamespaceProvider):
* storage/Storage.cpp:
(WebCore::Storage::prewarm): Deleted.
* storage/Storage.h:
* storage/StorageArea.h:
(WebCore::StorageArea::closeDatabaseIfIdle):
(WebCore::StorageArea::prewarm): Deleted.
* storage/StorageNamespace.h:
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::~StorageNamespaceProvider):
(WebCore::StorageNamespaceProvider::localStorageArea):
(WebCore::StorageNamespaceProvider::localStorageNamespace):
(WebCore::StorageNamespaceProvider::transientLocalStorageNamespace):
(WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): change SessionID of storageNamespace
and update every StorageArea in this namespace.
(WebCore::StorageNamespaceProvider::addPage): Deleted.
(WebCore::StorageNamespaceProvider::removePage): Deleted.
* storage/StorageNamespaceProvider.h:
* storage/StorageType.h:
(WebCore::isLocalStorage):
Source/WebKit:
Fix some issues in web storage architecture. For example, sessionStorageNameSpace for web page is prepared and
destroyed in the network process when the page comes and goes, even though the page may not use sessionStorage
at all. The messages about page state sent from web process to network process can be waste.
Here are some general ideas of this patch:
1. Network process owns the web storage, and web process keeps a small local copy (based on session and
origins that are visited). There is a virtual connection from the local copy in the web process to the original
copy in the network process. The connection is created by web process when some page asks for web storage.
2. If connection is lost because network process is gone, storage in memory will be lost. The local copy in web
processs will be discarded.
3. (SessionID, StorageNamespaceID, SecurityOrigin) is used to identify a storage area. If session is changed in
web process (like enabling private browsing in layout test now), a re-connection with different sessionID would
suffice to load another copy of storage.
4. localStorage in ephemeral session has the same behavior as localStorage instead of sessionStorage, which
means different pages in the same ephemeral session share the same localStorage.
Also, this patch introduces StorageManagerSet to network process. It handles web storage stuff, including
receiving storage messages from web process, on one background thread. Previously each session has its own
StorageManager and each StorageManager has its own WorkQueue.
* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* NetworkProcess/NetworkConnectionToWebProcess.cpp: remove message handlers that are no longer needed. Network
process no longer needs to know page states from web process.
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::webPageWasAdded): Deleted.
(WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): Deleted.
(WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp: NetworkProcess uses StorageManagerSet instead of StorageManager from
different sessions to deal with web storage.
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess): StorageManagerSet starts handling
StorageManagerSet messages from the new connection.
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::clearLegacyPrivateBrowsingLocalStorage): added for clearing in-memory ephemeral
localStorage.
(WebKit::NetworkProcess::getLocalStorageOriginDetails):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::webPageWasAdded): Deleted.
(WebKit::NetworkProcess::webPageWasRemoved): Deleted.
(WebKit::NetworkProcess::webProcessWasDisconnected): Deleted.
(WebKit::NetworkProcess::webProcessSessionChanged): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSession.cpp: StorageManager is moved out of NetworkSession. It is now managed by
StorageManagerSet.
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::storageManager): Deleted.
* NetworkProcess/NetworkSessionCreationParameters.cpp: creation parameters of StorageManager is moved out of
NetworkSessionCreationParameters.
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::updateDatabase): remove an assertion that is no longer true as we can force an
update with syncLocalStorage now.
* NetworkProcess/WebStorage/LocalStorageDatabase.h: make updateDatabase public for syncLocalStorage.
* NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: LocalStorageDatabaseTracker is created on the
background thread now, so it does not hold WorkQueue to do the file operation.
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
* NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h:
* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::LocalStorageNamespace::cloneTo): Deleted.
* NetworkProcess/WebStorage/LocalStorageNamespace.h:
* NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
(WebKit::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::SessionStorageNamespace::addAllowedConnection): Deleted.
(WebKit::SessionStorageNamespace::removeAllowedConnection): Deleted.
* NetworkProcess/WebStorage/SessionStorageNamespace.h:
(WebKit::SessionStorageNamespace::allowedConnections const): Deleted.
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::generateStorageAreaIdentifier): each StorageArea has an identifier. StorageAreaMap in web process uses
this identifier to indicate which StorageArea it is connecting to.
(WebKit::StorageArea::StorageArea):
(WebKit::StorageArea::~StorageArea): StorageArea may still have listeners because StorageArea should be
destroyed by requests from UI process, and listeners are connections to web processses.
(WebKit::StorageArea::addListener): load localStorageDatabase in advance if there is some connection to this
LocalStorage area.
(WebKit::StorageArea::removeListener):
(WebKit::StorageArea::hasListener const):
(WebKit::StorageArea::clear):
(WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageArea::dispatchEvents const):
(WebKit::StorageArea::syncToDatabase):
(WebKit::StorageArea::setItems): Deleted. Stop syncing from web process to network process after network process
is relaunched.
* NetworkProcess/WebStorage/StorageArea.h:
(WebKit::StorageArea::identifier):
(WebKit::StorageArea::setWorkQueue):
* NetworkProcess/WebStorage/StorageManager.cpp: StorageManager should be accessed by only background thread now.
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::~StorageManager):
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace): this is not used now but keep it for future
improvement to remove in-memory sessionStorage in network process if we know some web page is gone forever.
(WebKit::StorageManager::cloneSessionStorageNamespace): previously each page had its own ephemeral
localStorageNamespace and now all pages in the same session share one localStorage, so we don't need to clone
localStorageNamespace.
(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::createLocalStorageArea):
(WebKit::StorageManager::createTransientLocalStorageArea):
(WebKit::StorageManager::createSessionStorageArea):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateSessionStorageNamespace):
(WebKit::StorageManager::clearStorageNamespaces):
(WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): Deleted.
(WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): Deleted.
(WebKit::StorageManager::processDidCloseConnection): Deleted.
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): Deleted.
(WebKit::StorageManager::createLocalStorageMap): Deleted.
(WebKit::StorageManager::createTransientLocalStorageMap): Deleted.
(WebKit::StorageManager::createSessionStorageMap): Deleted.
(WebKit::StorageManager::destroyStorageMap): Deleted.
(WebKit::StorageManager::prewarm): Deleted.
(WebKit::StorageManager::getValues): Deleted.
(WebKit::StorageManager::setItem): Deleted.
(WebKit::StorageManager::setItems): Deleted.
(WebKit::StorageManager::removeItem): Deleted.
(WebKit::StorageManager::clear): Deleted.
(WebKit::StorageManager::waitUntilTasksFinished): Deleted.
(WebKit::StorageManager::suspend): Deleted.
(WebKit::StorageManager::resume): Deleted.
(WebKit::StorageManager::findStorageArea const): Deleted.
* NetworkProcess/WebStorage/StorageManager.h:
(WebKit::StorageManager::workQueue const): Deleted.
(): Deleted.
* NetworkProcess/WebStorage/StorageManager.messages.in: Removed. Moved to StorageManagerSet.messages.in.
* NetworkProcess/WebStorage/StorageManagerSet.cpp: Added.
(WebKit::StorageManagerSet::create):
(WebKit::StorageManagerSet::StorageManagerSet):
(WebKit::StorageManagerSet::~StorageManagerSet):
(WebKit::StorageManagerSet::add):
(WebKit::StorageManagerSet::remove):
(WebKit::StorageManagerSet::contains):
(WebKit::StorageManagerSet::addConnection):
(WebKit::StorageManagerSet::removeConnection):
(WebKit::StorageManagerSet::waitUntilTasksFinished):
(WebKit::StorageManagerSet::waitUntilSyncingLocalStorageFinished):
(WebKit::StorageManagerSet::suspend):
(WebKit::StorageManagerSet::resume):
(WebKit::StorageManagerSet::getSessionStorageOrigins):
(WebKit::StorageManagerSet::deleteSessionStorage):
(WebKit::StorageManagerSet::deleteSessionStorageForOrigins):
(WebKit::StorageManagerSet::getLocalStorageOrigins):
(WebKit::StorageManagerSet::deleteLocalStorageModifiedSince):
(WebKit::StorageManagerSet::deleteLocalStorageForOrigins):
(WebKit::StorageManagerSet::getLocalStorageOriginDetails):
(WebKit::StorageManagerSet::connectToLocalStorageArea):
(WebKit::StorageManagerSet::connectToTransientLocalStorageArea):
(WebKit::StorageManagerSet::connectToSessionStorageArea):
(WebKit::StorageManagerSet::disconnectFromStorageArea):
(WebKit::StorageManagerSet::getValues):
(WebKit::StorageManagerSet::setItem):
(WebKit::StorageManagerSet::removeItem):
(WebKit::StorageManagerSet::clear):
(WebKit::StorageManagerSet::cloneSessionStorageNamespace):
* NetworkProcess/WebStorage/StorageManagerSet.h: Added.
* NetworkProcess/WebStorage/StorageManagerSet.messages.in: Added.
* Shared/WebsiteDataStoreParameters.cpp: creation parameters of StorageManager are moved to
WebsiteDataStoreParameters.
(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::privateSessionParameters):
* Shared/WebsiteDataStoreParameters.h:
* Sources.txt:
* UIProcess/API/C/WKContext.cpp: add SPI for tests.
(WKContextSyncLocalStorage):
(WKContextClearLegacyPrivateBrowsingLocalStorage):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreRemoveLocalStorage):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::syncLocalStorage):
(WebKit::WebProcessPool::clearLegacyPrivateBrowsingLocalStorage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp: session change of web storage is done via
WebStorageNamespaceProvider instead of WebProcess now.
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/WebProcess.cpp: web process no longer sends messsages about page state to network process.
(WebKit::WebProcess::createWebPage):
(WebKit::WebProcess::removeWebPage):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::storageAreaMap const):
(WebKit::WebProcess::enablePrivateBrowsingForTesting): Deleted. This was used for changing session via
WebProcess.
* WebProcess/WebProcess.h:
* WebProcess/WebStorage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::length):
(WebKit::StorageAreaImpl::key):
(WebKit::StorageAreaImpl::item):
(WebKit::StorageAreaImpl::setItem):
(WebKit::StorageAreaImpl::removeItem):
(WebKit::StorageAreaImpl::clear):
(WebKit::StorageAreaImpl::contains):
(WebKit::StorageAreaImpl::storageType const):
(WebKit::StorageAreaImpl::incrementAccessCount):
(WebKit::StorageAreaImpl::decrementAccessCount):
(WebKit::StorageAreaImpl::prewarm): Deleted.
(WebKit::StorageAreaImpl::securityOrigin const): Deleted.
* WebProcess/WebStorage/StorageAreaImpl.h: make StorageAreaImpl hold a weak reference to StorageAreaMap and
StorageNamespaceImpl hold a strong reference. In this way lifeime of localStorage StorageAreraMap stays align
with StorageNameSpaceProvider and Page.
* WebProcess/WebStorage/StorageAreaMap.cpp: identifier of StorageAreaMap is the same as identifier of
StorageArea it connects to. If the identifier is 0, it means the StorageAreaMap is disconnected.
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
(WebKit::StorageAreaMap::resetValues):
(WebKit::StorageAreaMap::loadValuesIfNeeded):
(WebKit::StorageAreaMap::applyChange):
(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
(WebKit::StorageAreaMap::connect):
(WebKit::StorageAreaMap::disconnect):
(WebKit::generateStorageMapID): Deleted.
(WebKit::StorageAreaMap::prewarm): Deleted.
(WebKit::StorageAreaMap::didGetValues): Deleted. This is useless as GetValues is a synchronous operation.
* WebProcess/WebStorage/StorageAreaMap.h:
(): Deleted.
* WebProcess/WebStorage/StorageAreaMap.messages.in: there are two synchronous messages, one for connection and
one for getting values. We may merge them into one in future improvement.
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::setSessionIDForTesting):
(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace): Deleted.
* WebProcess/WebStorage/StorageNamespaceImpl.h:
* WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
* WebProcess/WebStorage/WebStorageNamespaceProvider.h:
Source/WebKitLegacy:
Do some clean-up and add support for session change of web storage in layout tests.
* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::sessionChanged):
* Storage/StorageAreaImpl.h:
(): Deleted.
* Storage/StorageAreaSync.h: make sure StorageAreaSync is destructed on the main thread, as it can be
dereferenced in StorageAreaImpl::sessionChanged and its last reference for final sync could be released on the
background thread.
* Storage/StorageNamespaceImpl.cpp: replace EphemeralLocalStorage with LocalStorage, and store SessionID in
StorageNamespace.
(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):
(WebKit::StorageNamespaceImpl::setSessionIDForTesting):
(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace): Deleted.
* Storage/StorageNamespaceImpl.h:
* Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createSessionStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):
(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace): Deleted.
* Storage/WebStorageNamespaceProvider.h:
Source/WebKitLegacy/mac:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): notify storageNamespaceProvider about session change.
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST): update expectation for behavior change.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: new SPI to synchronously flush localStorage to
database file.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::syncLocalStorage):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp: clear local storage between test runs to make each test isolated.
(WTR::TestController::resetStateToConsistentValues):
(WTR::StorageVoidCallbackContext::StorageVoidCallbackContext):
(WTR::StorageVoidCallback):
(WTR::TestController::clearIndexedDatabases):
(WTR::TestController::clearLocalStorage):
(WTR::TestController::syncLocalStorage):
(WTR::RemoveAllIndexedDatabasesCallbackContext::RemoveAllIndexedDatabasesCallbackContext): Deleted. Replaced
with StorageVoidCallbackContext for general usage.
(WTR::RemoveAllIndexedDatabasesCallback): Deleted. Replaced with StorageVoidCallback.
(WTR::TestController::ClearIndexedDatabases): Deleted. Use lowercase for consistent style.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): add handler for new message
SyncLocalStorage.
LayoutTests:
Modify tests for a behavior change: sessionStorage will be lost when network process crashes.
For tests which use sessionStorage to store items, crash network process, then read from sessionStorage and
expect items to be in sessionStorage, replace sessionStorage with localStorage. Also, to make sure localStorage
is stored persistently before network process gets terminated, adopt a newly introduced SPI to
synchronously flush localStorage content to disk before terminating network process.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
* storage/indexeddb/IDBObject-leak.html:
* storage/indexeddb/modern/opendatabase-after-storage-crash-expected.txt:
* storage/indexeddb/modern/opendatabase-after-storage-crash.html:
Canonical link: https://commits.webkit.org/214513@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-15 18:41:53 +00:00
|
|
|
NetworkProcess/WebStorage/StorageManagerSet.cpp
|
2019-08-08 16:46:57 +00:00
|
|
|
NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp
|
2019-05-21 00:07:39 +00:00
|
|
|
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/cache/CacheStorageEngine.cpp
|
|
|
|
NetworkProcess/cache/CacheStorageEngineCache.cpp
|
|
|
|
NetworkProcess/cache/CacheStorageEngineCaches.cpp
|
|
|
|
NetworkProcess/cache/CacheStorageEngineConnection.cpp
|
2019-11-13 10:22:04 +00:00
|
|
|
NetworkProcess/cache/AsyncRevalidation.cpp
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/cache/NetworkCache.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheBlobStorage.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheCoders.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheData.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheEntry.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheFileSystem.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheKey.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheStorage.cpp
|
|
|
|
NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp
|
2019-05-08 12:40:10 +00:00
|
|
|
NetworkProcess/cache/PrefetchCache.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-21 00:50:06 +00:00
|
|
|
NetworkProcess/webrtc/NetworkMDNSRegister.cpp
|
2021-03-22 18:29:36 +00:00
|
|
|
NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: We should unify these files once GTK's PluginProcess2 is removed.
|
Deduplicate logging channel algorithms
https://bugs.webkit.org/show_bug.cgi?id=228809
Reviewed by Fujii Hironori.
Source/WebCore:
No new tests because there is no behavior change.
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXLogger.cpp:
* inspector/agents/page/PageConsoleAgent.cpp:
* page/Page.cpp:
* platform/LogInitialization.cpp: Copied from Source/WebCore/platform/LogInitialization.h.
(WebCore::logChannels):
(WebCore::getLogChannel):
* platform/LogInitialization.h:
* platform/Logging.cpp:
(WebCore::isLogChannelEnabled): Deleted.
(WebCore::setLogChannelToAccumulate): Deleted.
(WebCore::clearAllLogChannelsToAccumulate): Deleted.
(WebCore::initializeLogChannelsIfNecessary): Deleted.
(WebCore::getLogChannel): Deleted.
* platform/Logging.h:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setLogChannelToAccumulate):
(WebCoreTestSupport::clearAllLogChannelsToAccumulate):
(WebCoreTestSupport::initializeLogChannelsIfNecessary):
Source/WebKit:
* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* Platform/LogInitialization.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
(WebKit::logChannels):
(WebKit::getLogChannel):
* Platform/LogInitialization.h:
* Platform/Logging.cpp:
(WebKit::initializeLogChannelsIfNecessary): Deleted.
(WebKit::getLogChannel): Deleted.
* Platform/Logging.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Sources.txt:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Source/WebKitLegacy:
* WebKitLegacy.xcodeproj/project.pbxproj:
Source/WebKitLegacy/mac:
* Misc/WebKitLogInitialization.h: Copied from Source/WebKit/Platform/LogInitialization.h.
* Misc/WebKitLogInitialization.mm: Copied from Source/WebKitLegacy/mac/Misc/WebKitLogging.m.
(WebKit::logChannels):
(ReportDiscardedDelegateException):
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(ReportDiscardedDelegateException): Deleted.
* WebCoreSupport/WebDragClient.mm:
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Source/WTF:
The current infrastructure (before this patch) had the following duplicated for each framework:
- A .cpp file declared the list of logging channels for that framework
- The .cpp file also had algorithms to search, modify, and initialize these logging channels
Each framework's .cpp file had duplicate algorithms. (The initialization algorithm was even
duplicated 3 times!)
Because the algorithms directly name their specific list of logging channels, a naive deduplication
would have had to add new parameters to these algorithms to pass in the appropriate framework's
list. That's fine, but this is exactly the sort of thing classes were designed for - classes are
an association of algorithms and data. The algorithms are shared but the data isn't, which really
just means we should have 3 instances of a shared class - one for the 3 sets of data.
So, this patch creates the LogChannels class which contains the deduplicated algorithms, and each
framework has a NeverDestroyed singleton instance of that class. There is a single virtual method
in the class, so the appropriate "default write" variable can be queried for each framework.
The instances cannot be declared in the Logging.h files in the frameworks, because certain WebKit2
files want to initialize all 3 instances of LogChannels, but you can't #include multiple Logging.h
files at the same time because their LOG_CHANNEL_PREFIX #defines will collide with each other.
Luckily, LogInitialization.h files exist exactly to solve this purpose, so that's where the
LogChannels instances are declared in. After this change, the Logging.h files are just for the
declarations of the logging channels themselves, and the LogInitialization.h files are for the
LogChannels instances which contain the searching/modifying/initializing algorithms on the list of
logging channels. If you just want to LOG(...) something, #include the relevant Logging.h file, and
if you want to search/modify/initialize across the entire list of channels, then #include the
relevant LogInitialization.h file.
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/LogChannels.cpp: Copied from Source/WebCore/platform/Logging.cpp.
(WTF::LogChannels::isLogChannelEnabled):
(WTF::LogChannels::setLogChannelToAccumulate):
(WTF::LogChannels::clearAllLogChannelsToAccumulate):
(WTF::LogChannels::initializeLogChannelsIfNecessary):
(WTF::LogChannels::getLogChannel):
* wtf/LogChannels.h: Copied from Source/WebCore/platform/LogInitialization.h.
Canonical link: https://commits.webkit.org/240343@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 18:50:12 +00:00
|
|
|
Platform/LogInitialization.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Platform/Logging.cpp @no-unify
|
|
|
|
Platform/Module.cpp @no-unify
|
2019-10-30 04:14:39 +00:00
|
|
|
Platform/SharedMemory.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
|
|
|
|
// TODO: We should unify these files once GTK's PluginProcess2 is removed.
|
|
|
|
Platform/IPC/ArgumentCoders.cpp @no-unify
|
|
|
|
Platform/IPC/Attachment.cpp @no-unify
|
|
|
|
Platform/IPC/Connection.cpp @no-unify
|
|
|
|
Platform/IPC/Decoder.cpp @no-unify
|
|
|
|
Platform/IPC/Encoder.cpp @no-unify
|
2020-10-22 05:24:58 +00:00
|
|
|
Platform/IPC/JSIPCBinding.cpp @no-unify
|
2021-02-16 18:47:56 +00:00
|
|
|
Platform/IPC/MessageReceiveQueueMap.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Platform/IPC/MessageReceiverMap.cpp @no-unify
|
|
|
|
Platform/IPC/MessageSender.cpp @no-unify
|
REGRESSION (r257667): 1.9x more CPU time in IPC::SharedBufferDataReference decoding during Netflix playback
https://bugs.webkit.org/show_bug.cgi?id=215232
<rdar://problem/66637920>
Reviewed by Geoff Garen.
Prior to r257667, an IPC message defined a IPC::SharedBufferDataReference argument to allow
its sender to easily encode SharedBuffer data as a DataReference. SharedBufferDataReference
cost the same to encode as a DataReference -- both copied data into the Encoder -- but did
so by iterating over the SharedBuffer's data segments rather than combining them into a
contiguous allocation. The message argument was received as a decoded IPC::DataReference,
which stores a pointer into the IPC::Decoder's buffer rather than making a copy.
In r257667, IPC::SharedBufferDataReference switched its encoder to use IPC::ArgumentCoder's
SharedBuffer specialization, which works by allocating a SharedMemory buffer, copying
SharedBuffer data into it, creating a SharedMemory::IPCHandle from it, and encoding the
handle. It makes only one copy like the old encoder did, but pays the added cost of
combining SharedBuffer data segments prior to copying by needlessly calling
SharedBuffer::data() (this should be fixed independently).
Since this serialization could no longer be decoded by DataReference's decoder,
SharedBufferDataReference implemented a decoder, also in terms of ArgumentCoder's SharedBuffer
specialization. It works by mapping a SharedMemory buffer from a decoded
SharedMemory::IPCHandle and copying that buffer into a new SharedBuffer. This copy is a cost
that the old decoder did not incur, but in some cases the message receiver would have made
such a copy anyway and can instead just ref the decoded SharedBuffer. In other cases though,
the receiver either made no copies or couldn't use the decoded SharedBuffer to avoid making
its own copy so creating the SharedBuffer was pure added cost.
There are additional costs from allocating, mapping, and deleting shared memory and Mach
send rights, but they are offset by savings due to smaller Encoder and Decoder buffers. The
additional SharedBuffer combining and copying is not offset elsewhere, and on net makes
sending and receiving IPC::SharedBufferDataReferences use up to 2x more CPU time when
playing a video on netflix.com in Safari.
Resolve this slowdown by reverting the argument encoding changes made to
IPC::SharedBufferDataReference in r257667. For compatibility with code added after r257667,
the current IPC::SharedBufferDataReference was copied to IPC::SharedBufferCopy and retains
the behavior of copying into a SharedBuffer when decoded. IPC::SharedBufferDataReference now
has the pre-r257667 behavior of decoding to an IPC::DataReference. Messages added after
r257667 whose receivers were designed to handle a SharedBuffer were changed to use
IPC::SharedBufferCopy, and all other receivers of messages with IPC::SharedBufferDataReference
arguments were changed to handle an IPC::DataReference.
* GPUProcess/media/RemoteCDMInstanceProxy.cpp:
* GPUProcess/media/RemoteCDMInstanceProxy.h:
* GPUProcess/media/RemoteCDMInstanceProxy.messages.in:
* GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp:
* GPUProcess/media/RemoteCDMInstanceSessionProxy.h:
* GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in:
* GPUProcess/media/RemoteCDMProxy.cpp:
* GPUProcess/media/RemoteCDMProxy.h:
* GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp:
* GPUProcess/media/RemoteLegacyCDMSessionProxy.h:
* GPUProcess/media/RemoteLegacyCDMSessionProxy.messages.in:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::platformRegisterAttachment):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerAttachmentIdentifierFromData):
(WebKit::WebPageProxy::platformRegisterAttachment):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* UIProcess/gtk/WebPasteboardProxyGtk.cpp:
* WebProcess/GPU/media/RemoteCDMInstance.cpp:
* WebProcess/GPU/media/RemoteCDMInstanceSession.cpp:
* WebProcess/GPU/media/RemoteCDMInstanceSession.h:
* WebProcess/GPU/media/RemoteCDMInstanceSession.messages.in:
* WebProcess/GPU/media/RemoteLegacyCDMSession.cpp:
* WebProcess/GPU/media/RemoteLegacyCDMSession.h:
* WebProcess/GPU/media/RemoteLegacyCDMSession.messages.in:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Replaced
IPC::SharedBufferDataReference with IPC::SharedBufferCopy.
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Removed the DidReceiveSharedBuffer
message and reverted the DidReceiveData message back to taking an
IPC::SharedBufferDataReference.
* Platform/IPC/Encoder.h: Made Encoder::reserve(size_t) public so
SharedBufferCopy::encode(Encoder&) can call it.
* Platform/IPC/HandleMessage.h: Restored the CodingType specialization that decodes
SharedBufferDataReference arguments as DataReferences.
* Platform/IPC/SharedBufferCopy.cpp:
* Platform/IPC/SharedBufferCopy.h: Copied from SharedBufferDataReference.h. Implemented the
interface and decoding behavior that SharedBufferDataReference had between r257667 and this
change.
* Platform/IPC/SharedBufferDataReference.cpp:
* Platform/IPC/SharedBufferDataReference.h: Reverted to the pre-r257667 interface and
decoding behvior.
* Scripts/webkit/messages.py: Removed an unneeded special case.
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj: Added SharedBuffer{Copy,DataReference}.cpp.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::finishedLoadingIcon):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h: Used `const IPC::DataReference&` in message receiver
signatures for SharedBufferDataReference arguments.
* UIProcess/WebURLSchemeTask.cpp:
* WebProcess/GPU/media/RemoteAudioBusData.h:
* WebProcess/GPU/media/RemoteCDM.cpp:
* WebProcess/Network/WebLoaderStrategy.cpp: Removed unused includes.
Canonical link: https://commits.webkit.org/228484@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-21 11:29:20 +00:00
|
|
|
Platform/IPC/SharedBufferCopy.cpp @no-unify
|
|
|
|
Platform/IPC/SharedBufferDataReference.cpp @no-unify
|
WebGL GPU process IPC should use shared memory for asynchronous messages
https://bugs.webkit.org/show_bug.cgi?id=219641
<rdar://problem/72340651>
Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-20
Reviewed by Geoff Garen.
Source/WebKit:
Implement a concept of a message buffer. This is a similar concept as
"command buffer" or "display list" in some graphics APIs. Messages
can be added to the buffer by a client and then played back by a
server.
Current implementation adds a specific pseudo-infinite,
semi-duplex message buffer type IPC::StreamConnectionBuffer. This
is a buffer that can be attached to stream connection, an object
that can deliver IPC messages either through the message buffer
or through normal IPC::Connection. The stream connection is
implemented as IPC::StreamClientConnection and IPC::StreamServerConnection.
The connection has server and client distinction, similar to
IPC::Connection. Unlike IPC::Connection, a stream connection is asymmetric
in features: the client can send messages and receive replies, where
as the server can receive messages and send replies.
Messages received through IPC::StreamServerConnection can be
processed by StreamConnectionWorkQueue.
Currently asynchronous messages are added to the stream. Synchronous messages
and their replies are dispatched through normal IPC.
WebGL is implemented by having one StreamConnectionWorkQueue for all WebGL
in the browser. Currently each web process WebGL context in has one
StreamClientConnection attached to one 2mb StreamConnectionBuffer.
Later on, there will be only one WebGL stream connection and connection
buffer shared between all contexts in particular thread in Web process.
The implementation is "optimized" for the later on case. Due to single-
process nature of each page, it does not make much sense to have buffer
per context. However, it is anticipated that many of the successive calls
are to same context. The SHM message format implements an optimization
where the destination id is maintained as part of the stream connection
state.
In GPU process side, all WebGL is processed in one task queue,
"RemoteGraphicsContextGL task queue". It will process up to 1000 commands
per connection per iteration.
Implemented as follows:
Sender shares the shared memory area with the destination when creating
the destination.
If the message fits to the stream shared memory area, write it there.
Otherwise send it via normal IPC as out of line message.
Messages to the destination arrive as before, in order. For each out of line
message, an entry is pushed to the stream. Receiver will stop processing the
stream and processing will continue once the out-of-line
message has been processed.
Sender can write messages to the stream simultaneous to the receiver reading
the messages. This is implemented as a ring buffer with atomic sender and receiver
pointers.
Stream connection processing is implemented as a shared semaphore. This semaphore
is notified if the receiver is waiting on it.
Performance impact (iMac Pro):
- MotionMark triangles: 300 points -> 4000 points
(~7000 points no-GPUP)
- WebGL samples Aquarium: 1000 fish ~60fps -> 5000 fish ~60fps
(~5000 fish with no-GPUP)
No new tests, tested by existing tests.
* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::createGraphicsContextGL):
* GPUProcess/GPUConnectionToWebProcess.h:
* GPUProcess/GPUConnectionToWebProcess.messages.in:
* GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::remoteGraphicsContextGLStreamWorkQueue):
(WebKit::RemoteGraphicsContextGL::create):
(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::initialize):
(WebKit::RemoteGraphicsContextGL::connectWebProcessConnection):
(WebKit::RemoteGraphicsContextGL::disconnectWebProcessConnection):
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::workQueueUninitialize):
Initialize the OpenGL context in the work queue, since OpenGL
has various limitations wrt thread mobility.
(WebKit::RemoteGraphicsContextGL::forceContextLost):
(WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification):
* GPUProcess/graphics/RemoteGraphicsContextGL.h:
(WebKit::RemoteGraphicsContextGL::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGL::send const):
* GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:
(WebKit::RemoteGraphicsContextGL::create):
(WebKit::RemoteGraphicsContextGLCocoa::RemoteGraphicsContextGLCocoa):
(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* Platform/IPC/ArgumentCoder.h:
* Platform/IPC/ArgumentCoders.cpp:
* Platform/IPC/ArgumentCoders.h:
Make it possible to use multiple different Encoder classes to encode
the IPC data.
* Platform/IPC/Connection.cpp:
(IPC::Connection::processIncomingMessage):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
* Platform/IPC/Connection.h:
Add possibility for the stream decoding logic to send the didReceiveInvalidMessage
notification to the connection client.
* Platform/IPC/Decoder.cpp:
(IPC::Decoder::Decoder):
(IPC::m_bufferDeallocator):
(IPC::m_destinationID):
* Platform/IPC/Decoder.h:
Add a constructor for Decoder for constructing a decoder in place in
the stream buffer.
* Platform/IPC/HandleMessage.h:
(IPC::handleMessageSynchronous):
Adds a stream-specific handleMessageSynchronous.
The old ones are unneccessarily complex, as they need redundant calls through redundant
generated send functions.
The old ones need the reply encoder passed in, which is redundant and problematic
for the upcoming case where the stream messaging will mainly reply through the stream itself,
constructing the IPC::StreamConnectionEncoder instead of normal IPC::Encoder.
* Platform/IPC/StreamClientConnection.cpp: Copied from Source/WebKit/Platform/IPC/cocoa/MachPort.h.
(IPC::StreamClientConnection::StreamClientConnection):
(IPC::StreamClientConnection::setWakeUpSemaphore):
Add function to set the connection receive side wakeup semaphore.
Currently the semaphore is the semaphore that StreamConnectionWorkQueue
waits on. All streams processed by the same work queue will receive the same
semaphore and will notify it when they have written new data.
(IPC::StreamClientConnection::wakeUpReceiver):
* Platform/IPC/StreamClientConnection.h: Added.
(IPC::StreamClientConnection::send):
(IPC::StreamClientConnection::sendSync):
(IPC::StreamClientConnection::trySendDestinationIDIfNeeded):
(IPC::StreamClientConnection::sendProcessOutOfStreamMessage):
(IPC::StreamClientConnection::tryAcquire):
(IPC::StreamClientConnection::release):
(IPC::StreamClientConnection::alignedSpan):
(IPC::StreamClientConnection::size):
(IPC::StreamClientConnection::clampedLimit const):
Add the implementation for sending data through the shared memory.
* Platform/IPC/StreamConnectionBuffer.cpp: Added.
(IPC::createMemory):
(IPC::StreamConnectionBuffer::StreamConnectionBuffer):
(IPC::StreamConnectionBuffer::operator=):
(IPC::StreamConnectionBuffer::encode const):
(IPC::StreamConnectionBuffer::decode):
* Platform/IPC/StreamConnectionBuffer.h: Added.
(IPC::StreamConnectionBuffer::wrapOffset const):
(IPC::StreamConnectionBuffer::alignOffset const):
(IPC::StreamConnectionBuffer::senderOffset):
(IPC::StreamConnectionBuffer::receiverOffset):
(IPC::StreamConnectionBuffer::data const):
(IPC::StreamConnectionBuffer::dataSize const):
(IPC::StreamConnectionBuffer::senderWaitSemaphore):
(IPC::StreamConnectionBuffer::header const):
(IPC::StreamConnectionBuffer::headerSize):
Add the common implementation for the shared memory ring buffer.
This is the common implementation used by both the sender side
as well as the receiver side.
Due to the selection of how the size is marked up, the
common implementation does not contain all the non-trivial code.
The "algorithm" uses a "hole indicator" to differentiate between
cases of "buffer is empty" and "buffer is full". The other
alternative could be better and maybe explored later.
* Platform/IPC/StreamConnectionEncoder.h: Added.
* Platform/IPC/StreamConnectionWorkQueue.cpp: Added.
(IPC::StreamConnectionWorkQueue::StreamConnectionWorkQueue):
(IPC::StreamConnectionWorkQueue::dispatch):
(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::stop):
(IPC::StreamConnectionWorkQueue::wakeUp):
(IPC::StreamConnectionWorkQueue::wakeUpSemaphore):
(IPC::StreamConnectionWorkQueue::wakeUpProcessingThread):
(IPC::StreamConnectionWorkQueue::processStreams):
Work queue contains multiple StreamServerConnection instances.
For each iteration of the work queue thread, it will process
1000 items from each connection. If none of the connections contain
work, the queue will sleep on the work queue semaphore.
The senders will send through StreamClientConnection which
will wake up the work queue by signaling the semaphore.
* Platform/IPC/StreamConnectionWorkQueue.h: Copied from Source/WebKit/Platform/IPC/cocoa/MachPort.h.
* Platform/IPC/StreamServerConnection.cpp: Added.
(IPC::StreamServerConnectionBase::StreamServerConnectionBase):
(IPC::StreamServerConnectionBase::startReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::stopReceivingMessagesImpl):
(IPC::StreamServerConnectionBase::enqueueMessage):
(IPC::StreamServerConnectionBase::tryAquire):
(IPC::StreamServerConnectionBase::release):
(IPC::StreamServerConnectionBase::alignedSpan):
(IPC::StreamServerConnectionBase::size):
(IPC::StreamServerConnectionBase::clampedLimit const):
* Platform/IPC/StreamServerConnection.h: Added.
(IPC::StreamServerConnectionBase::connection):
(IPC::StreamServerConnectionBase::wrapOffset const):
(IPC::StreamServerConnectionBase::alignOffset const):
(IPC::StreamServerConnectionBase::sharedSenderOffset):
(IPC::StreamServerConnectionBase::sharedReceiverOffset):
(IPC::StreamServerConnectionBase::data const):
(IPC::StreamServerConnectionBase::dataSize const):
(IPC::StreamServerConnectionBase::sendSyncReply):
(IPC::StreamServerConnection<Receiver>::startReceivingMessages):
(IPC::StreamServerConnection<Receiver>::stopReceivingMessages):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessages):
(IPC::StreamServerConnection<Receiver>::processSetStreamDestinationID):
(IPC::StreamServerConnection<Receiver>::dispatchStreamMessage):
(IPC::StreamServerConnection<Receiver>::dispatchOutOfStreamMessage):
StreamServerConnection will process the message buffer and dispatch
messages based on the buffer contents. The class is a template so
that the message data decode switch (generated by the normal IPC
generator) is perhaps inlined to the message unpack loop.
* Platform/IPC/cocoa/MachPort.h:
* Scripts/webkit/messages.py:
* Scripts/webkit/messages_unittest.py:
Implements a 'Stream' attribute for the message receiver. When marked as
'Stream', the receiver message handler is didReceiveStreamMessage and it
will be called for all messages, stream or normal IPC, sync or async.
* Scripts/webkit/model.py:
Adds IPC control message ProcessOutOfStreamMessage that is acted on if
it is part of the stream messages. It means that the stream processing
should stop until one normal IPC message, sync or non-synch, should be
processed.
Adds IPC control message SetStreamDestinationID that is acted on if it
is part of the stream messages. It will set the destination ID for all
the subsequent stream messages, until another SetStreamDestinationID
message is seen.
* Scripts/webkit/tests/Makefile:
* Scripts/webkit/tests/MessageNames.cpp:
(IPC::description):
(IPC::receiverName):
(IPC::isValidMessageName):
* Scripts/webkit/tests/MessageNames.h:
* Scripts/webkit/tests/TestWithStream.messages.in: Copied from Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in.
* Scripts/webkit/tests/TestWithStreamBuffer.messages.in: Copied from Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in.
* Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp: Added.
(WebKit::TestWithStreamBuffer::didReceiveMessage):
* Scripts/webkit/tests/TestWithStreamBufferMessages.h: Added.
(Messages::TestWithStreamBuffer::messageReceiverName):
(Messages::TestWithStreamBuffer::SendStreamBuffer::name):
(Messages::TestWithStreamBuffer::SendStreamBuffer::SendStreamBuffer):
(Messages::TestWithStreamBuffer::SendStreamBuffer::arguments const):
* Scripts/webkit/tests/TestWithStreamBufferMessagesReplies.h: Added.
* Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp: Added.
(WebKit::TestWithStream::didReceiveStreamMessage):
* Scripts/webkit/tests/TestWithStreamMessages.h: Added.
(Messages::TestWithStream::messageReceiverName):
(Messages::TestWithStream::SendString::name):
(Messages::TestWithStream::SendString::SendString):
(Messages::TestWithStream::SendString::arguments const):
(Messages::TestWithStream::SendStringSynchronized::name):
(Messages::TestWithStream::SendStringSynchronized::SendStringSynchronized):
(Messages::TestWithStream::SendStringSynchronized::arguments const):
* Scripts/webkit/tests/TestWithStreamMessagesReplies.h: Added.
* Sources.txt:
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/ProvisionalPageProxy.cpp:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::wasCreated):
Send the work queue wakeup semaphore as a result of the context creation.
* Platform/IPC/ScopedActiveMessageReceiveQueue.h: Added.
(IPC::ScopedActiveMessageReceiveQueue::ScopedActiveMessageReceiveQueue):
(IPC::ScopedActiveMessageReceiveQueue::operator=):
(IPC::ScopedActiveMessageReceiveQueue::~ScopedActiveMessageReceiveQueue):
(IPC::ScopedActiveMessageReceiveQueue::reset):
(IPC::ScopedActiveMessageReceiveQueue::get const):
(IPC::ScopedActiveMessageReceiveQueue::stopListeningForIPCAndRelease):
Add a holder to replace previous RemoteRenderingBackendWrapper.
Now other classes can be held similarly.
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in:
* WebProcess/Network/webrtc/LibWebRTCNetwork.h:
Tools:
Mark RemoteGraphicsContextGL message receiver as "Stream",
a new variant of receiver.
* Scripts/generate-gpup-webgl:
LayoutTests:
Mark few tests as not timing out now that the implementation is not so slow.
* gpu-process/TestExpectations:
Canonical link: https://commits.webkit.org/234390@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-20 20:33:25 +00:00
|
|
|
Platform/IPC/StreamClientConnection.cpp @no-unify
|
|
|
|
Platform/IPC/StreamConnectionBuffer.cpp @no-unify
|
|
|
|
Platform/IPC/StreamConnectionWorkQueue.cpp @no-unify
|
|
|
|
Platform/IPC/StreamServerConnection.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Platform/IPC/StringReference.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
|
|
|
PluginProcess/PluginControllerProxy.cpp @no-unify
|
|
|
|
PluginProcess/PluginCreationParameters.cpp @no-unify
|
|
|
|
PluginProcess/PluginProcess.cpp @no-unify
|
|
|
|
PluginProcess/WebProcessConnection.cpp @no-unify
|
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: The files here marked @no-unify should be unified once GTK's PluginProcess2 is removed.
|
2021-06-11 00:49:38 +00:00
|
|
|
Shared/AccessibilityPreferences.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/ActivityAssertion.cpp @no-unify
|
2019-01-29 22:12:51 +00:00
|
|
|
Shared/AuxiliaryProcess.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/BlobDataFileReferenceWithSandboxExtension.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/CacheModel.cpp
|
|
|
|
Shared/ContextMenuContextData.cpp
|
2019-12-22 04:19:53 +00:00
|
|
|
Shared/DebuggableInfoData.cpp
|
2019-03-03 00:02:34 +00:00
|
|
|
Shared/EditingRange.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/EditorState.cpp
|
|
|
|
Shared/FontInfo.cpp
|
|
|
|
Shared/FrameInfoData.cpp
|
2020-11-11 21:44:38 +00:00
|
|
|
Shared/InspectorExtensionTypes.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/LayerTreeContext.cpp
|
|
|
|
Shared/LoadParameters.cpp
|
|
|
|
Shared/NavigationActionData.cpp
|
2019-01-08 22:02:16 +00:00
|
|
|
Shared/PersistencyUtils.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/PlatformPopupMenuData.cpp
|
|
|
|
Shared/PrintInfo.cpp
|
|
|
|
Shared/RTCNetwork.cpp
|
|
|
|
Shared/RTCPacketOptions.cpp
|
2019-10-30 22:39:31 +00:00
|
|
|
Shared/ServiceWorkerInitializationData.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/SessionState.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/ShareableBitmap.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/ShareableResource.cpp
|
|
|
|
Shared/SharedStringHashStore.cpp
|
|
|
|
Shared/SharedStringHashTableReadOnly.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/SharedStringHashTable.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/TouchBarMenuData.cpp
|
|
|
|
Shared/TouchBarMenuItemData.cpp
|
|
|
|
Shared/URLSchemeTaskParameters.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/UpdateInfo.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/UserData.cpp
|
2020-03-31 20:13:48 +00:00
|
|
|
Shared/UserContentControllerParameters.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebBackForwardListItem.cpp
|
|
|
|
Shared/WebCompiledContentRuleList.cpp
|
|
|
|
Shared/WebCompiledContentRuleListData.cpp
|
|
|
|
Shared/WebConnection.cpp
|
|
|
|
Shared/WebConnectionClient.cpp
|
|
|
|
Shared/WebContextMenuItem.cpp
|
|
|
|
Shared/WebContextMenuItemData.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebCoreArgumentCoders.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebErrors.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebEvent.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebEventConversion.cpp
|
|
|
|
Shared/WebGeolocationPosition.cpp
|
|
|
|
Shared/WebHitTestResultData.cpp
|
|
|
|
Shared/WebImage.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebKeyboardEvent.cpp @no-unify
|
|
|
|
Shared/WebKit2Initialize.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebMemorySampler.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebMouseEvent.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebPageCreationParameters.cpp
|
|
|
|
Shared/WebPageGroupData.cpp
|
2021-06-04 18:02:04 +00:00
|
|
|
Shared/WebPageNetworkParameters.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebPlatformTouchPoint.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebPopupItem.cpp
|
|
|
|
Shared/WebPreferencesDefaultValues.cpp
|
|
|
|
Shared/WebPreferencesStore.cpp
|
|
|
|
Shared/WebProcessCreationParameters.cpp
|
2020-07-30 16:31:40 +00:00
|
|
|
Shared/API/c/WKRenderLayer.cpp
|
|
|
|
Shared/API/c/WKRenderObject.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebTouchEvent.cpp @no-unify
|
|
|
|
Shared/WebUserContentControllerDataTypes.cpp
|
2020-10-09 20:56:25 +00:00
|
|
|
Shared/WebWheelEventCoalescer.cpp
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebWheelEvent.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
Shared/WebsiteDataStoreParameters.cpp
|
|
|
|
Shared/WebsitePoliciesData.cpp
|
|
|
|
|
2018-09-08 00:36:09 +00:00
|
|
|
Shared/API/APIArray.cpp
|
|
|
|
Shared/API/APIData.cpp
|
|
|
|
Shared/API/APIDictionary.cpp
|
|
|
|
Shared/API/APIError.cpp
|
|
|
|
Shared/API/APIFrameHandle.cpp
|
|
|
|
Shared/API/APIGeometry.cpp
|
|
|
|
Shared/API/APIObject.cpp
|
2021-05-18 20:26:15 +00:00
|
|
|
Shared/API/APIPageGroupHandle.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
Shared/API/APIPageHandle.cpp
|
|
|
|
Shared/API/APIURLRequest.cpp
|
|
|
|
Shared/API/APIURLResponse.cpp
|
|
|
|
|
|
|
|
Shared/API/c/WKArray.cpp
|
|
|
|
Shared/API/c/WKCertificateInfo.cpp
|
|
|
|
Shared/API/c/WKConnectionRef.cpp
|
|
|
|
Shared/API/c/WKContextMenuItem.cpp
|
|
|
|
Shared/API/c/WKData.cpp
|
|
|
|
Shared/API/c/WKDeprecatedFunctions.cpp
|
|
|
|
Shared/API/c/WKDictionary.cpp
|
|
|
|
Shared/API/c/WKErrorRef.cpp
|
|
|
|
Shared/API/c/WKGeometry.cpp
|
|
|
|
Shared/API/c/WKImage.cpp
|
|
|
|
Shared/API/c/WKMutableArray.cpp
|
|
|
|
Shared/API/c/WKMutableDictionary.cpp
|
|
|
|
Shared/API/c/WKNumber.cpp
|
|
|
|
Shared/API/c/WKPluginInformation.cpp
|
|
|
|
Shared/API/c/WKSecurityOriginRef.cpp
|
|
|
|
Shared/API/c/WKSerializedScriptValue.cpp
|
|
|
|
Shared/API/c/WKString.cpp
|
|
|
|
Shared/API/c/WKType.cpp
|
|
|
|
Shared/API/c/WKURL.cpp
|
|
|
|
Shared/API/c/WKURLRequest.cpp
|
|
|
|
Shared/API/c/WKURLResponse.cpp
|
|
|
|
Shared/API/c/WKUserContentURLPattern.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/Authentication/AuthenticationManager.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
|
|
|
Shared/Databases/IndexedDB/IDBUtilities.cpp
|
|
|
|
Shared/Databases/IndexedDB/WebIDBResult.cpp
|
|
|
|
|
|
|
|
Shared/Gamepad/GamepadData.cpp
|
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: These files should be unified once GTK's PluginProcess2 is removed.
|
|
|
|
Shared/Plugins/NPIdentifierData.cpp @no-unify
|
|
|
|
Shared/Plugins/NPObjectMessageReceiver.cpp @no-unify
|
|
|
|
Shared/Plugins/NPObjectProxy.cpp @no-unify
|
|
|
|
Shared/Plugins/NPRemoteObjectMap.cpp @no-unify
|
|
|
|
Shared/Plugins/NPVariantData.cpp @no-unify
|
|
|
|
Shared/Plugins/PluginProcessCreationParameters.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: These files should be unified once GTK's PluginProcess2 is removed.
|
|
|
|
Shared/Plugins/Netscape/NetscapePluginModule.cpp @no-unify
|
|
|
|
Shared/Plugins/Netscape/PluginInformation.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
Shared/WebsiteData/WebsiteData.cpp
|
|
|
|
|
2021-07-12 09:30:56 +00:00
|
|
|
Shared/XR/XRDeviceInfo.cpp
|
|
|
|
Shared/XR/XRDeviceProxy.cpp
|
|
|
|
|
2019-01-29 22:12:51 +00:00
|
|
|
UIProcess/AuxiliaryProcessProxy.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/BackgroundProcessResponsivenessTimer.cpp
|
[GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
https://bugs.webkit.org/show_bug.cgi?id=190466
Patch by Alejandro G. Castro <alex@igalia.com> on 2018-12-21
Reviewed by Youenn Fablet.
Source/WebCore:
Added persistency to the DeviceIdHashSaltStorage.
* platform/glib/FileSystemGlib.cpp:
(WebCore::FileSystem::getFileSize): Implemented this function to
allow sharing code with the statistics storage class.
* platform/glib/KeyedDecoderGlib.cpp:
(WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
condition to control situations where the key is empty, it can
happen if the user modifies the file in the disk.
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
to make work compilation with debug, unified builds.
Source/WebKit:
Added persistency to the DeviceIdHashSaltStorage. Implemented a
decoder and an encoder for the HashSaltForOrigin struct to store
it in a file, this allows us to save the lastTimeUsed, the origin
and the hash salt. It uses a new directory where it creates a file
per hash salt, the name of the file is the hash salt to avoid
leaking information in the system. The last time used and the
origin are stored inside the file, it also adds a version
directory used to change the structure of the file in the future,
if we need to do it. In the DeviceIdHashSaltStorage class the disk
operations happen in a WorkQueue, but all interactions go in the
main thread. We added code to handle the operations when the load
still did not finish.
* Platform/Logging.h:
Added channel DiskPersistency..
* Sources.txt: Added new files.
* UIProcess/API/APIProcessPoolConfiguration.cpp: Added code to set
the directory for the deviceIdHashSalts. That way we can use the
configuration when creating the DeviceIdHashSaltStorage.
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
Added code to set the directory in the disk used to store the
information.
* UIProcess/API/APIWebsiteDataStore.h: Ditto.
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added dummy
implementation to get the directory in cocoa.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Defined the
default directories used to store the information in the disk.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkitWebsiteDataManagerGetDataStore): Added the directory used
to store the information.
(webkit_website_data_manager_remove): Modified the way we use to
make sure when we remove the cookies we also remove the hash salts.
* UIProcess/API/win/APIWebsiteDataStoreWin.cpp: Added dummy
implementations to get the directory in windows platform.
(API::WebsiteDataStore::defaultDeviceIdHashSaltsStorageDirectory):
(API::WebsiteDataStore::legacyDefaultDeviceIdHashSaltsStorageDirectory):
* UIProcess/API/C/WKBackForwardListItemRef.cpp: Add namespace, it
seems some unified build compilation issue.
* UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::create): Added a create method
used to pass the directory and the persistency status of the websitedatastore.
(WebKit::DeviceIdHashSaltStorage::completeHandler): Added to share
the code copying the origins to complete the get handler.
(WebKit::DeviceIdHashSaltStorage::completeDeviceIdHashSaltForOriginCall):
Added to share the code when completing the task of getting a new
hash salt.
(WebKit::DeviceIdHashSaltStorage::DeviceIdHashSaltStorage): Added
a new constructor for the create method.
(WebKit::getSecurityOriginData): Added to get the
SecurityOriginData from a field in the decoder and do all the
checks.
(WebKit::DeviceIdHashSaltStorage::loadStorageFromDisk): Open the
directory and restore all the hash salts from disk to the memory
structure.
(WebKit::DeviceIdHashSaltStorage::createEncoderFromData const):
Creates the decoder to store the HashSaltForOrigin structure.
(WebKit::DeviceIdHashSaltStorage::storeHashSaltToDisk): Write to
disk a decoder object created from a HashSaltForOrigin
structure. It uses the writeEncoderToDisk function.
(WebKit::DeviceIdHashSaltStorage::deviceIdHashSaltForOrigin): Make
sure we store in disk a new hash salt when it is generated and the
WebsiteDataStore is persistent. Add a completionHandler to return
the value found or generated, this way we can control if the
HashMap is already loaded from disk.
(WebKit::DeviceIdHashSaltStorage::getDeviceIdHashSaltOrigins):
Make sure we run the get in a queue now that we store information
in disk.
(WebKit::DeviceIdHashSaltStorage::deleteHashSaltFromDiskIfNeeded):
Added code to make sure we remove the files in disk.
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigins):
Added code to use the deleteHashSaltFromDiskIfNeeded and remove the files in disk.
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltOriginsModifiedSince):
Added code to use the deleteHashSaltFromDiskIfNeeded and remove the files in disk.
* UIProcess/DeviceIdHashSaltStorage.h: Ditto.
* UIProcess/PersistencyUtils.cpp: Added file to share the
persistency code with the ResourceLoadStatisticsPersistentStorage class.
(WebKit::createDecoderForFile): Ditto.
(WebKit::writeEncoderToDisk): Ditto.
* UIProcess/PersistencyUtils.h: Ditto.
* UIProcess/ResourceLoadStatisticsPersistentStorage.cpp: Use the
new PersistencyUtils functions shared with the
DeviceIdHashSaltStorage class.
(WebKit::ResourceLoadStatisticsPersistentStorage::refreshMemoryStoreFromDisk):
(WebKit::ResourceLoadStatisticsPersistentStorage::populateMemoryStoreFromDisk):
(WebKit::ResourceLoadStatisticsPersistentStorage::writeMemoryStoreToDisk):
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp: After
changing the API of the deviceIdHashSaltForOrigin we now use a
completionHandler because it could happen the HashMap is not still
loaded and we would have to wait for it. We refactored the calls
to the method to use this new completionHandler.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore): Create the
DeviceIdHashSaltStorage class with the persistency information.
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): Make
sure we have the directory to store the information.
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Add get
and set functions for the deviceHashSaltStorageDirectory.
* WebKit.xcodeproj/project.pbxproj: Added PersistencyUtils file to
the xcode compilation.
Canonical link: https://commits.webkit.org/207545@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-21 20:00:41 +00:00
|
|
|
UIProcess/DeviceIdHashSaltStorage.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/DrawingAreaProxy.cpp
|
|
|
|
UIProcess/FrameLoadState.cpp
|
|
|
|
UIProcess/GeolocationPermissionRequestManagerProxy.cpp
|
|
|
|
UIProcess/GeolocationPermissionRequestProxy.cpp
|
2019-09-20 20:36:57 +00:00
|
|
|
UIProcess/LegacyGlobalSettings.cpp
|
2021-02-09 12:46:22 +00:00
|
|
|
UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp
|
|
|
|
UIProcess/MediaKeySystemPermissionRequestProxy.cpp
|
2021-06-30 17:09:59 +00:00
|
|
|
UIProcess/ModelElementController.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/PageLoadState.cpp
|
|
|
|
UIProcess/ProcessAssertion.cpp
|
|
|
|
UIProcess/ProcessThrottler.cpp
|
Regression(PSON) View becomes blank after click a cross-site download link
https://bugs.webkit.org/show_bug.cgi?id=193361
<rdar://problem/47099573>
Reviewed by Geoffrey Garen.
Source/WebCore:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
When restoring from PageCache, make sure we notify the client that the load was committed
*before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy
logic in the UIProcess.
Source/WebKit:
The issue tracked by rdar://problem/47099573 is that a provisional load may get
canceled (or converted into a download) *after* we've decided to process-swap.
In such cases, the view should keep displaying the current site and it should
still be interactive. However, with the previous PSON model, the view (pageProxy)
would have already swapped to the new process and would end up displaying the
initially empty document.
To address the issue, this patch introduces the concept of a provisional load
in the UIProcess, handled by a ProvisionalPageProxy which has its own privisional
process. The WebPageProxy owns the ProvisionalPageProxy but we do not commit the
provisional page until after the load was committed in the new process. This means
that the view / WebPageProxy keeps using the old process and displays the current
content until a load has committed in the provisional page. If no load commits
in the provisional process (e.g. because the load is cancelled or converted into
a download), then we merely destroy the ProvisionalPageProxy and terminate its
process, without impacting the WebPageProxy.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Rename isSwapFromSuspended to isProcessSwap for clarity as we always want to
delay attaching the drawing area in case of a process-swap, no matter what
now that the previous process is kept alive until the provisional load is
committed in the new process.
* Shared/WebPolicyAction.h:
Drop Suspend policy action. At decidePolicyForNavigationAction time, in case of
process-swap, we now tell the previous process to simply ignore the load, while
we create a ProvisionalPageProxy to do the new load in a new process.
Suspension of the previous page in the old process, happens later, when a load
is actually committed in the new process.
* Sources.txt:
Add new ProvisionalPageProxy file.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _killWebContentProcessAndResetState]):
When calling _killWebContentProcessAndResetState on a WKWebView, kill both the current
process and the provisional one, to maintain previous behavior in our API tests.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/API/wpe/PageClientImpl.h:
* UIProcess/AcceleratedDrawingAreaProxy.cpp:
(WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
(WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
* UIProcess/AcceleratedDrawingAreaProxy.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::createDrawingAreaProxy):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::process):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::update):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/PageClient.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _createDrawingAreaProxy:]):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/win/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/win/PageClientImpl.h:
* UIProcess/win/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/win/PageClientImpl.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
Pass the drawing area's associated process when constructing it and store it as a member
in addition to the page. This is necessary now that a page can be associated with 2
WebProcesses at a time, each having its own drawing area.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
Pass the process.
* UIProcess/ProvisionalPageProxy.cpp: Added.
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::processDidTerminate):
(WebKit::ProvisionalPageProxy::takeDrawingArea):
(WebKit::ProvisionalPageProxy::cancel):
(WebKit::ProvisionalPageProxy::processDidFinishLaunching):
(WebKit::ProvisionalPageProxy::finishInitializingWebPageAfterProcessLaunch):
(WebKit::ProvisionalPageProxy::initializeWebPage):
(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didPerformClientRedirect):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
(WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::startURLSchemeTask):
(WebKit::ProvisionalPageProxy::backForwardGoToItem):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
(WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
* UIProcess/ProvisionalPageProxy.h: Added.
(WebKit::ProvisionalPageProxy::page):
(WebKit::ProvisionalPageProxy::mainFrame const):
(WebKit::ProvisionalPageProxy::process):
(WebKit::ProvisionalPageProxy::processSwapRequestedByClient const):
(WebKit::ProvisionalPageProxy::navigationID const):
(WebKit::ProvisionalPageProxy::drawingArea const):
New WebPageProxy-like class which is owned by the WebPageProxy and proxies IPC from
the provisional process.
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
(WebKit::SuspendedPageProxy::unsuspend):
(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):
Unregister the SuspendedPageProxy as an IPC message receiver a little bit earlier
when we're going to unsuspend it. This avoids conflicting with the ProvisionalPageProxy
which tries to register itself as an IPC message receiver for the same pageID when
a process-swap occurs and we're switching to a suspended page.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isMainFrame const):
WebFrameProxy::isMainFrame() relies on checking that the frame is the WebPageProxy's m_mainFrame.
Now that the WebPageProxy can have a ProvisionalPageProxy, also check if it is the ProvisionalPageProxy's
m_mainFrame to maintain previous behavior.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::provisionalDrawingArea const):
Add getter for the provisional drawing area. We normally only deal with the page's current drawing area, but
the ViewGestureController needs access to the provisional once to display the swipe gesture snapshot.
(WebKit::WebPageProxy::swapToWebProcess):
swapToWebProcess() no longer takes care of unsuspending the SuspendedPage because we now call swapToWebProcess()
later, when a load is actually committed in the provisional page / process. swapToWebProcess() now also needs
to initialize some data members such as the drawing area and the main frame as it is transferring them over from
the ProvisionalPageProxy which started the provisional load.
(WebKit::WebPageProxy::finishAttachingToWebProcess):
We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.
(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::initializeWebPage):
- We no longer need IsSwapFromSuspended parameter as this is called later now, after a load has actually been
committed in the provisional process.
- Factor some code out to WebPageProxy::setDrawingArea() so that it can be shared with swapToWebProcess().
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
Only call setPendingAPIRequestURL() in loadRequestWithNavigation() only if ShouldTreatAsContinuingLoad is not
Yes. This avoids hitting some assertions as this was already called during the first API call if needed.
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
In case of process swap, tell the previous process to ignore the load instead of suspending it right away.
Suspension now happens later, only if we end up committing the provisional load in the new process.
Also discard the SuspendedPage if it failed to suspend (we only reuse its process in this case). This used
to happen a bit later but it is clearer if we do this as early as possible I think.
(WebKit::WebPageProxy::commitProvisionalPage):
When the load is committed in the new process, we call WebPageProxy::commitProvisionalPage(). It takes care of:
- Actually swapping the WebPageProxy to the new process by calling processDidTerminate() / swapToWebProcess().
- Suspending the current page.
- Letting the client know the load is comitted
- Destroy the ProvisionalPageProxy.
This work used to happen earlier in continueNavigationInNewProcess().
(WebKit::WebPageProxy::continueNavigationInNewProcess):
Moved some of the logic to commitProvisionalPage(). We now merely start the load in a new ProvisionalPageProxy,
without actually having the WebPageProxy switch to the new process yet.
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didCreateWindow):
Drop some code that is no longer needed, now that the ProvisionalPageProxy takes care of this.
(WebKit::WebPageProxy::didDestroyNavigation):
On process-swap, when telling the previous process to ignore the load and starting the new load in a new
ProvisionalPageProxy, the previous WebPage attempts to destroy the navigation. In this case, we ignore
the call since the navigation is merely taken over by the ProvisionalPageProxy.
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Moved some PSON logic to the ProvisionalPageProxy instead.
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
When didFailProvisionalLoadForFrame() is called for a ProvisionalPageProxy, destroy it.
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::didNavigateWithNavigationData):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirect):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirect):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::learnWord):
(WebKit::WebPageProxy::ignoreWord):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::focusedFrameChanged):
(WebKit::WebPageProxy::frameSetLargestFrameChanged):
(WebKit::WebPageProxy::provisionalProcessDidTerminate):
Cancel the provisiona load and destroy the ProvisionalPageProxy if
the provisional process crashes.
(WebKit::WebPageProxy::resetState):
Drop some code that is no longer needed.
(WebKit::WebPageProxy::creationParameters):
- Move the hasRegisteredServiceWorkers flag initialization from the call site to here now that we have
more than one call site. This was just some bad factoring.
- Take the process in parameter now that we page can be associated with several processes at a time.
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::startURLSchemeTaskShared):
(WebKit::WebPageProxy::stopURLSchemeTask):
(WebKit::WebPageProxy::loadSynchronousURLSchemeTask):
(WebKit::WebPageProxy::checkURLReceivedFromCurrentOrPreviousWebProcess):
(WebKit::WebPageProxy::willAcquireUniversalFileReadSandboxExtension):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::visitedLinkStore):
(WebKit::WebPageProxy::provisionalPageProxy const):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::hasProvisionalPageWithID const):
(WebKit::WebProcessProxy::updateBackForwardItem):
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::canTerminateChildProcess):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::addProvisionalPageProxy):
(WebKit::WebProcessProxy::removeProvisionalPageProxy):
Before updating a BackForwardListItem, we normally make sure the process has a WebPageProxy with the
item's pageID. We have to tweak the logic because there may now be no WebPageProxy with this pageID
associated with this process yet, because it is still a ProvisionalPageProxy.
* UIProcess/WebURLSchemeHandler.cpp:
(WebKit::WebURLSchemeHandler::startTask):
* UIProcess/WebURLSchemeHandler.h:
* UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::create):
(WebKit::WebURLSchemeTask::WebURLSchemeTask):
(WebKit::WebURLSchemeTask::didPerformRedirection):
(WebKit::WebURLSchemeTask::didReceiveResponse):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):
(WebKit::WebURLSchemeTask::pageDestroyed):
* UIProcess/WebURLSchemeTask.h:
Pass the process when constructing a WebURLSchemeTask and store it as a data member in addition to
the page. This is necessary now that a WebPageProxy can be associated with several WebProcesses.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
Use the provisional drawing area to display the swipe snapshot as it may differ from the one currently
associated with the page in case of process swap.
* WebKit.xcodeproj/project.pbxproj:
Add ProvisionalPageProxy class.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::toPolicyAction):
(WebKit::WebFrame::didReceivePolicyDecision):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldAttachDrawingAreaOnPageTransition):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didReceivePolicyDecision):
Stop dealing with WebPolicyAction::Suspend as it no longer exists.
(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::setIsSuspended):
Suspend the Page when setIsSuspended(true) is called, now that there is no longer a WebPolicyAction::Suspend.
setIsSuspended(true) IPC is sent when we actually commit the provisional page.
* WebProcess/WebPage/WebPage.h:
Tools:
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
LayoutTests:
Skip test testing the cross-process DOMWindow API as I broke it with this patch.
The feature is far from ready and off by default anyway. I will add support back
in a follow-up.
* platform/wk2/TestExpectations:
Canonical link: https://commits.webkit.org/208009@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-16 20:40:02 +00:00
|
|
|
UIProcess/ProvisionalPageProxy.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/ResponsivenessTimer.cpp
|
2020-12-09 08:28:16 +00:00
|
|
|
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
|
|
|
|
UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp
|
2020-11-04 01:44:02 +00:00
|
|
|
UIProcess/SpeechRecognitionServer.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/SuspendedPageProxy.cpp
|
|
|
|
UIProcess/SystemPreviewController.cpp
|
2020-11-14 02:16:49 +00:00
|
|
|
UIProcess/SpeechRecognitionPermissionManager.cpp
|
2020-01-14 18:37:41 +00:00
|
|
|
UIProcess/TextChecker.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/TextCheckerCompletion.cpp
|
|
|
|
UIProcess/UserMediaPermissionCheckProxy.cpp
|
|
|
|
UIProcess/UserMediaPermissionRequestManagerProxy.cpp
|
|
|
|
UIProcess/UserMediaPermissionRequestProxy.cpp
|
|
|
|
UIProcess/UserMediaProcessManager.cpp
|
|
|
|
UIProcess/VisitedLinkStore.cpp
|
2019-10-11 20:40:48 +00:00
|
|
|
UIProcess/WebBackForwardCache.cpp
|
2019-10-15 16:56:13 +00:00
|
|
|
UIProcess/WebBackForwardCacheEntry.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/WebBackForwardList.cpp
|
|
|
|
UIProcess/WebColorPicker.cpp
|
|
|
|
UIProcess/WebConnectionToWebProcess.cpp
|
|
|
|
UIProcess/WebContextClient.cpp
|
|
|
|
UIProcess/WebContextConnectionClient.cpp
|
|
|
|
UIProcess/WebContextInjectedBundleClient.cpp
|
|
|
|
UIProcess/WebContextMenuListenerProxy.cpp
|
|
|
|
UIProcess/WebContextMenuProxy.cpp
|
|
|
|
UIProcess/WebCookieManagerProxy.cpp
|
2019-07-31 08:02:09 +00:00
|
|
|
UIProcess/WebDataListSuggestionsDropdown.cpp
|
[macOS] Show picker for date and datetime-local input types
https://bugs.webkit.org/show_bug.cgi?id=214946
Reviewed by Darin Adler and Wenson Hsieh.
Source/WebCore:
Date and datetime-local input types require a calendar picker to be presented when activated.
Consequently, BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent was modified to
create a DateTimeChooser and display a calendar upon activation. This object is destroyed
when the element is blurred, hiding the calendar.
There is currently no picker UI for month, week, and time input types. As a result,
handleDOMActivateEvent is a no-op on those input types.
Wrote an encoder and decoder for DateTimeChooserParameters, so that the picker can be
created with the correct values.
Tests: fast/forms/date/date-show-hide-picker.html
fast/forms/datetimelocal/datetimelocal-show-hide-picker.html
* WebCore.xcodeproj/project.pbxproj:
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
(WebCore::BaseChooserOnlyDateAndTimeInputType::elementDidBlur):
(WebCore::BaseChooserOnlyDateAndTimeInputType::isPresentingAttachedView const):
(WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/HTMLInputElement.cpp:
* html/MonthInputType.cpp:
(WebCore::MonthInputType::handleDOMActivateEvent):
* html/MonthInputType.h:
* html/TimeInputType.cpp:
(WebCore::TimeInputType::handleDOMActivateEvent):
* html/TimeInputType.h:
* html/WeekInputType.cpp:
(WebCore::WeekInputType::handleDOMActivateEvent):
* html/WeekInputType.h:
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::createDateTimeChooser):
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::createDateTimeChooser):
* page/Chrome.h:
* page/ChromeClient.h:
* platform/DateTimeChooser.h:
* platform/DateTimeChooserClient.h:
* platform/DateTimeChooserParameters.h: Added.
(WebCore::DateTimeChooserParameters::encode const):
(WebCore::DateTimeChooserParameters::decode):
Source/WebKit:
Created WKDateTimePicker as a wrapper around NSDatePicker. The picker is
displayed in its own NSWindow, ensuring the view is always above the page.
WebPageProxy and WKDateTimePicker communicate through WebDateTimePickerMac,
in order for the picker to be initialized with the correct initial, minimum,
and maximum date, and so that the chosen date can be sent back to the
WebProcess.
Added IPC messages to enable communication between the UIProcess and the
WebProcess necessary for showing and hiding the picker.
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/PageClient.h:
* UIProcess/WebDateTimePicker.cpp: Added.
(WebKit::WebDateTimePicker::WebDateTimePicker):
(WebKit::WebDateTimePicker::~WebDateTimePicker):
(WebKit::WebDateTimePicker::endPicker):
* UIProcess/WebDateTimePicker.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showDateTimePicker):
(WebKit::WebPageProxy::endDateTimePicker):
(WebKit::WebPageProxy::didChooseDate):
(WebKit::WebPageProxy::didEndDateTimePicker):
(WebKit::WebPageProxy::closeOverlayedViews):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createDateTimePicker):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::createDateTimePicker):
* UIProcess/mac/WebDateTimePickerMac.h: Added.
* UIProcess/mac/WebDateTimePickerMac.mm: Added.
(WebKit::WebDateTimePickerMac::create):
(WebKit::WebDateTimePickerMac::~WebDateTimePickerMac):
(WebKit::WebDateTimePickerMac::WebDateTimePickerMac):
(WebKit::WebDateTimePickerMac::endPicker):
(WebKit::WebDateTimePickerMac::showDateTimePicker):
(WebKit::WebDateTimePickerMac::didChooseDate):
(-[WKDateTimePickerWindow initWithContentRect:styleMask:backing:defer:]):
(-[WKDateTimePickerWindow canBecomeKeyWindow]):
(-[WKDateTimePickerWindow hasKeyAppearance]):
(-[WKDateTimePickerWindow shadowOptions]):
(-[WKDateTimePicker initWithParams:inView:]):
(-[WKDateTimePicker showPicker:]):
(-[WKDateTimePicker invalidate]):
(-[WKDateTimePicker didChooseDate:]):
(-[WKDateTimePicker dateFormatStringForType:]):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDateTimeChooser):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebDateTimeChooser.cpp: Added.
(WebKit::WebDateTimeChooser::WebDateTimeChooser):
(WebKit::WebDateTimeChooser::didChooseDate):
(WebKit::WebDateTimeChooser::didEndChooser):
(WebKit::WebDateTimeChooser::endChooser):
(WebKit::WebDateTimeChooser::showChooser):
* WebProcess/WebCoreSupport/WebDateTimeChooser.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setActiveDateTimeChooser):
(WebKit::WebPage::didChooseDate):
(WebKit::WebPage::didEndDateTimePicker):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createDateTimeChooser):
Tools:
Added isShowingDateTimePicker testing hook in order to enable testing of the visibility of
the picker.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::isShowingDateTimePicker const):
* WebKitTestRunner/mac/UIScriptControllerMac.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::isShowingDateTimePicker const):
LayoutTests:
Added tests to verify that the picker is correctly shown and hidden for date and
datetime-local input types.
* fast/forms/date/date-show-hide-picker-expected.txt: Added.
* fast/forms/date/date-show-hide-picker.html: Added.
* fast/forms/datetimelocal/datetimelocal-show-hide-picker-expected.txt: Added.
* fast/forms/datetimelocal/datetimelocal-show-hide-picker.html: Added.
* platform/ios/TestExpectations:
* resources/ui-helper.js:
(window.UIHelper.isShowingDateTimePicker):
Canonical link: https://commits.webkit.org/228540@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-24 16:25:10 +00:00
|
|
|
UIProcess/WebDateTimePicker.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/WebEditCommandProxy.cpp
|
|
|
|
UIProcess/WebFormClient.cpp
|
|
|
|
UIProcess/WebFormSubmissionListenerProxy.cpp
|
|
|
|
UIProcess/WebFramePolicyListenerProxy.cpp
|
|
|
|
UIProcess/WebFrameProxy.cpp
|
|
|
|
UIProcess/WebFullScreenManagerProxy.cpp
|
|
|
|
UIProcess/WebGeolocationManagerProxy.cpp
|
|
|
|
UIProcess/WebGeolocationProvider.cpp
|
|
|
|
UIProcess/WebNavigationState.cpp
|
|
|
|
UIProcess/WebOpenPanelResultListenerProxy.cpp
|
|
|
|
UIProcess/WebPageDiagnosticLoggingClient.cpp
|
|
|
|
UIProcess/WebPageGroup.cpp
|
|
|
|
UIProcess/WebPageInjectedBundleClient.cpp
|
|
|
|
UIProcess/WebPageProxy.cpp
|
|
|
|
UIProcess/WebPasteboardProxy.cpp
|
|
|
|
UIProcess/WebPreferences.cpp
|
[PSON] Introduce a WebContent Process cache
https://bugs.webkit.org/show_bug.cgi?id=194594
<rdar://problem/46793397>
Reviewed by Geoff Garen.
Source/WebCore:
Update localizable strings.
* en.lproj/Localizable.strings:
Source/WebKit:
Introduce a WebContent Process cache to reduce the number of process launches when
process swap on navigation is enabled, and to reduce the power cost of the feature.
If a WebProcess loaded pages from a single registrable domain then it is eligible
for the cache. When process-swapping on navigation to a new registrable domain, we
now attempt to retrieve a process from the cache for the domain in question instead
of always launching a new one.
The WebProcess cache currently has the following attributes:
- It may contains 4 processes per GB of RAM the machine has, up to 30 processes.
- WebProcesses automatically get evicted from the cache after 30 minutes.
- If the application is no longer the active app, then the cache will get cleared
after 5 minutes.
- WebProcesses that are in the cache are reported as "(Cached)" in Activity Monitor.
The WebProcess cache is currently disabled by default and can by enabled by the
client via SPI.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::lastProcessIdentifier const):
(WebKit::WebBackForwardListItem::setLastProcessIdentifier):
Add new lastProcessIdentifier data member that reflects which process this item
was last loaded in. It is normally identical to the identifier of the process
that created the item but it gets overriden in case of cross-site client-side
redirect, since a new process takes over the item in this case.
* Sources.txt:
Add new source file.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationUsesWebProcessCache):
(WKContextConfigurationSetUsesWebProcessCache):
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setUsesWebProcessCache:]):
(-[_WKProcessPoolConfiguration usesWebProcessCache]):
Add new SPI to enable the WebProcess cache.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _webProcessCountIgnoringPrewarmedAndCached]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
Add new SPI for testing which returns the number of WebProcesses ignoring
both prewarmed and cached ones.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
Add application active state observers as the WebProcess cache gets cleared
when the application resigns active state for more than 5 minutes.
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::loadRequest):
When doing a load in a new process with the BackForwardList locked (i.e. client-side
redirect), make sure we update the last process identifier for the BackForwardListItem.
This is important because the logic in WebProcessPool::processForNavigation() relies on
this identifier to select which process to do the history navigation into, and we want
to do the load in the post-redirect process, not the pre-redirect one.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
Tell the WebProcess whenever a main frame provisional load is started, providing the URL.
* UIProcess/WebProcessCache.cpp: Added.
(WebKit::WebProcessCache::WebProcessCache):
(WebKit::WebProcessCache::addProcess):
(WebKit::WebProcessCache::takeProcess):
(WebKit::WebProcessCache::updateMaximumSize):
(WebKit::WebProcessCache::clear):
(WebKit::WebProcessCache::setApplicationIsActive):
(WebKit::WebProcessCache::evictProcess):
(WebKit::WebProcessCache::CachedProcess::CachedProcess):
(WebKit::WebProcessCache::CachedProcess::~CachedProcess):
(WebKit::WebProcessCache::CachedProcess::takeProcess):
(WebKit::WebProcessCache::CachedProcess::evictionTimerFired):
* UIProcess/WebProcessCache.h: Added.
(WebKit::WebProcessCache::maximumSize):
(WebKit::WebProcessCache::size const):
(WebKit::WebProcessCache::CachedProcess::process):
Add process cache implementation.
* UIProcess/WebProcessPool.cpp:
(WebKit::m_webProcessCache):
WebProcessCache is stored on the WebProcessPool via m_webProcessCache data member.
(WebKit::WebProcessPool::~WebProcessPool):
Clear the WebProcess cache in the destructor.
(WebKit::WebProcessPool::setApplicationIsActive):
Notify the WebProcessCache whenever the application's active state changes.
(WebKit::WebProcessPool::createWebPage):
If the state of PSON changes via the experimental features menu, dynamically
update the WebProcessCache's size. This is needed because the cache is disabled
when PSON is disabled.
(WebKit::WebProcessPool::handleMemoryPressureWarning):
Clear the WebProcess cache on memory pressure.
(WebKit::WebProcessPool::processForNavigationInternal):
Query the WebProcessCache before attempting to create a new WebProcess for a cross-site
navigation.
(WebKit::WebProcessPool::findReusableSuspendedPageProcess):
This logic was split out of processForNavigationInternal() to reduce the size
of the method.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setIsInProcessCache):
Update the isInProcessCache flag on the WebProcessProxy and send an IPC to the WebContent
process so that it can update its name in Activity Monitor.
We also need to stop holding a strong reference to the WebProcessPool whenever the process
is in the cache, similarly to what we do for pre-warmed processes, given that such processes
should not keep the process pool alive.
(WebKit::WebProcessProxy::addExistingWebPage):
Assert that we never try to add a page to a cached process, it should be taken out of the
cache before use.
(WebKit::WebProcessProxy::hasProvisionalPageWithID const):
(WebKit::WebProcessProxy::isAllowedToUpdateBackForwardItem const):
(WebKit::WebProcessProxy::updateBackForwardItem):
In case of client-side redirects, the previous process would sometimes send an IPC causing
the UIProcess' backforward list item to get updated with the pre-redirect URL after we've
already redirected. This previously would be unlikely to occur because we do not suspend
client-redirect pages and their process would normally exit before getting a chance to send
the IPC. However, with the process cache, the bug became obvious as the process would stay
alive and send up the "bad" IPC. To address the issue, we now only let the IPC update the
item if the item's page is (still) associated with the process. In the future, we may want
to update the IPC so that it gets sent to the WebPageProxy instead of the WebProcessProxy.
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):
If a cached WebProcess crashes, remove it from the cache so that we do not attempt to use
it for a load later.
(WebKit::WebProcessProxy::canBeAddedToWebProcessCache const):
Only cache WebProcesses that have loaded a single registrable domain. Also prevent caching
for service worker and inspector processes.
(WebKit::WebProcessProxy::maybeShutDown):
If the process is cacheable, add it to the cache instead of shutting it down right away.
(WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
Make sure we do not attempt to terminate a processes that is in the cache.
(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
Whenever a main frame provisional load starts, make sure we update the process's associated
registrable domain. nullopt indicates that there is no associated domain yet. Null string
indicates that the process is associated with several registrable domain and is therefore
not eligible for caching.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::registrableDomain const):
(WebKit::WebProcessProxy::isInProcessCache const):
(WebKit::WebProcessProxy::provisionalPageCount const):
Add convenience getters.
* WebKit.xcodeproj/project.pbxproj:
Add new files to project.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setIsInProcessCache):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::updateProcessName):
Update the WebProcess' name in Activity Monitor whenever it goes into or out of the WebProcess
cache.
Tools:
Update API tests to turn on the WebContent Process cache.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Canonical link: https://commits.webkit.org/209059@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-14 19:06:12 +00:00
|
|
|
UIProcess/WebProcessCache.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/WebProcessPool.cpp
|
|
|
|
UIProcess/WebProcessProxy.cpp
|
|
|
|
UIProcess/WebURLSchemeHandler.cpp
|
|
|
|
UIProcess/WebURLSchemeTask.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APIAttachment.cpp
|
|
|
|
UIProcess/API/APIContentRuleList.cpp
|
2019-03-21 20:23:46 +00:00
|
|
|
UIProcess/API/APIContentRuleListAction.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APIContentRuleListStore.cpp
|
2020-01-16 05:41:03 +00:00
|
|
|
UIProcess/API/APIContentWorld.cpp
|
2019-06-07 23:59:22 +00:00
|
|
|
UIProcess/API/APIContextMenuElementInfo.cpp
|
2019-12-22 04:19:53 +00:00
|
|
|
UIProcess/API/APIDebuggableInfo.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APIExperimentalFeature.cpp
|
|
|
|
UIProcess/API/APIFrameInfo.cpp
|
2020-03-04 20:35:46 +00:00
|
|
|
UIProcess/API/APIFrameTreeNode.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APIHTTPCookieStore.cpp
|
|
|
|
UIProcess/API/APIHitTestResult.cpp
|
2020-10-27 20:54:03 +00:00
|
|
|
UIProcess/API/APIInspectorConfiguration.cpp
|
2020-12-09 23:08:25 +00:00
|
|
|
UIProcess/API/APIInspectorExtension.cpp
|
2018-09-11 23:23:38 +00:00
|
|
|
UIProcess/API/APIInternalDebugFeature.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APINavigation.cpp
|
|
|
|
UIProcess/API/APINavigationData.cpp
|
|
|
|
UIProcess/API/APIPageConfiguration.cpp
|
|
|
|
UIProcess/API/APIProcessPoolConfiguration.cpp
|
|
|
|
UIProcess/API/APIOpenPanelParameters.cpp
|
|
|
|
UIProcess/API/APISessionState.cpp
|
|
|
|
UIProcess/API/APIUserScript.cpp
|
|
|
|
UIProcess/API/APIUserStyleSheet.cpp
|
2020-01-15 02:50:12 +00:00
|
|
|
UIProcess/API/APIWebAuthenticationAssertionResponse.cpp
|
2019-10-04 16:50:01 +00:00
|
|
|
UIProcess/API/APIWebAuthenticationPanel.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/APIWebsitePolicies.cpp
|
|
|
|
UIProcess/API/APIWindowFeatures.cpp
|
|
|
|
|
|
|
|
UIProcess/API/C/WKApplicationCacheManager.cpp
|
|
|
|
UIProcess/API/C/WKAuthenticationChallenge.cpp
|
|
|
|
UIProcess/API/C/WKAuthenticationDecisionListener.cpp
|
|
|
|
UIProcess/API/C/WKBackForwardListItemRef.cpp
|
|
|
|
UIProcess/API/C/WKBackForwardListRef.cpp
|
|
|
|
UIProcess/API/C/WKContext.cpp
|
|
|
|
UIProcess/API/C/WKContextConfigurationRef.cpp
|
|
|
|
UIProcess/API/C/WKCookieManager.cpp
|
|
|
|
UIProcess/API/C/WKCredential.cpp
|
Source/WebKit:
Introduce new download API
https://bugs.webkit.org/show_bug.cgi?id=217747
Patch by Alex Christensen <achristensen@webkit.org> on 2020-12-10
Reviewed by Brady Eidson.
Safari currently uses _WKDownload, which has evolved strangely over the last decade.
In order to make a nicer interface, we need to learn from those lessons and take a step back.
I did that, and here's what I came up with: WKDownload and WKDownloadDelegate!
Notable changes include:
1. The delegate now lives on the download object instead of the process pool.
2. WKDownload does not conform to NSCopying because we have NSMapTable instead of NSDictionary.
3. publishProgressAtURL is gone. That will be reimplemented in the UI process of the client that used it.
4. cancel has a completion handler to get the resume data instead of waiting for didCancel then getting it from the download object.
5. didFailWithError also gives you the resume data, so there is no way to get it from the download object. That's more about a fail/cancel
event than a property of the download.
6. wasUserInitiated is gone. Instead, WKNavigationDelegate has a callback that links a navigation action (where _isUserInitiated is exposed) to the download.
7. redirectChain is also gone. That can also be gotten from the link to the navigation and the download delegate's redirect callback.
8. _downloadDidStart is gone. Instead, we have completion handlers that expose a WKDownload once it's started. There's no need to
reference the download object before then anyways. Note: that's when the download "starts" which is before it receives the response,
so there will be no server delay in the difference between download object availabilities.
9. didReceiveServerRedirectToURL now gives you the option of continuing or cancelling. This reflects the amount of control the
WKNavigationDelegate has.
10. decideDestinationWithSuggestedFilename and didReceiveResponse have been merged, since they actually happen at the same time and
NSURLResponse has suggestedFilename API. allowOverwrite is also gone. It wasn't used, and not really needed.
11. didCreateDestination is gone. That callback time wasn't really necessary. If you need to know when it's created, wait until the first
didWriteData callback. The destination has definitely been created by then.
12. shouldDecodeSourceDataOfMIMEType is gone. It's actually not called since we adopted NSURLSession, and we should remove the related dead code.
13. originatingFrame is gone. On _WKDownload it was actually a non-null WKFrameInfo that often contained no information. When information was there,
the information access has been replaced by didBecomeDownload which links the WKNavigationResponse which has frame info on it.
I wrote API tests for everything I could think of.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::resumeDownload):
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::resume):
(WebKit::Download::platformCancelNetworkLoad):
* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::suggestedFilename const):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::resumeDownload):
(WebKit::NetworkProcess::findPendingDownloadLocation):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
* Scripts/webkit/messages.py:
* Shared/API/Cocoa/WebKit.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::legacyDidStart):
(API::DownloadClient::didFail):
(API::DownloadClient::didStart): Deleted.
* UIProcess/API/APINavigationAction.h:
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::navigationResponseDidBecomeDownload):
(API::NavigationClient::navigationActionDidBecomeDownload):
(API::NavigationClient::contextMenuDidCreateDownload):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKContextDownloadClient.h: Removed.
* UIProcess/API/C/WKDownload.cpp: Removed.
* UIProcess/API/C/WKDownloadClient.h: Added.
* UIProcess/API/C/WKDownloadRef.cpp: Added.
(WKDownloadGetTypeID):
(WKDownloadCopyRequest):
(WKDownloadCancel):
(WKDownloadGetOriginatingPage):
(WKDownloadGetWasUserInitiated):
(WKDownloadSetClient):
* UIProcess/API/C/WKDownloadRef.h: Renamed from Source/WebKit/UIProcess/API/C/WKDownload.h.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/API/Cocoa/WKDownload.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKDownload.h.
* UIProcess/API/Cocoa/WKDownload.mm: Added.
(-[WKDownload cancel:]):
(-[WKDownload originalRequest]):
(-[WKDownload delegate]):
(-[WKDownload setDelegate:]):
(-[WKDownload dealloc]):
(-[WKDownload _apiObject]):
* UIProcess/API/Cocoa/WKDownloadDelegate.h: Added.
* UIProcess/API/Cocoa/WKDownloadInternal.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKDownloadInternal.h.
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction downloadAttribute]):
(-[WKNavigationAction _shouldPerformDownload]):
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _downloadURLRequest:websiteDataStore:originatingWebView:]):
(-[WKProcessPool _resumeDownloadFromData:websiteDataStore:path:originatingWebView:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView downloadRequest:completionHandler:]):
(-[WKWebView resumeDownloadWithData:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload initWithDownload2:]):
(+[_WKDownload downloadWithDownload:]):
(-[_WKDownload cancel]):
(-[_WKDownload publishProgressAtURL:]):
(-[_WKDownload request]):
(-[_WKDownload originatingWebView]):
(-[_WKDownload redirectChain]):
(-[_WKDownload wasUserInitiated]):
(-[_WKDownload resumeData]):
(-[_WKDownload originatingFrame]):
(-[_WKDownload _apiObject]):
(-[_WKDownload dealloc]): Deleted.
* UIProcess/API/Cocoa/_WKDownloadDelegate.h:
* UIProcess/API/Cocoa/_WKDownloadInternal.h:
* UIProcess/API/glib/WebKitDownloadClient.cpp:
* UIProcess/Cocoa/LegacyDownloadClient.h:
* UIProcess/Cocoa/LegacyDownloadClient.mm:
(WebKit::LegacyDownloadClient::legacyDidStart):
(WebKit::LegacyDownloadClient::didReceiveResponse):
(WebKit::LegacyDownloadClient::didReceiveData):
(WebKit::LegacyDownloadClient::didReceiveAuthenticationChallenge):
(WebKit::LegacyDownloadClient::didCreateDestination):
(WebKit::LegacyDownloadClient::processDidCrash):
(WebKit::LegacyDownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::LegacyDownloadClient::didFinish):
(WebKit::LegacyDownloadClient::didFail):
(WebKit::LegacyDownloadClient::legacyDidCancel):
(WebKit::LegacyDownloadClient::willSendRequest):
(WebKit::LegacyDownloadClient::didStart): Deleted.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
(WebKit::NavigationState::NavigationClient::navigationActionDidBecomeDownload):
(WebKit::NavigationState::NavigationClient::navigationResponseDidBecomeDownload):
(WebKit::NavigationState::NavigationClient::contextMenuDidCreateDownload):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::~DownloadProxy):
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::setClient):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::setDidStartCallback):
(WebKit::DownloadProxy::setSuggestedFilename):
* UIProcess/Network/NetworkProcessProxy.cpp:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::resumeDownload):
(WebKit::WebPageProxy::downloadRequest):
(WebKit::WebPageProxy::contextMenuItemSelected):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::receivedPolicyDecision):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resumeDownload):
* UIProcess/WebProcessPool.h:
* WebKit.xcodeproj/project.pbxproj:
Tools:
Introduce new download SPI
https://bugs.webkit.org/show_bug.cgi?id=217747
Patch by Alex Christensen <achristensen@webkit.org> on 2020-12-10
Reviewed by Brady Eidson.
* TestWebKitAPI/SourcesCocoa.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp:
(TestWebKitAPI::decidePolicyForNavigationResponse):
(TestWebKitAPI::decideDestinationWithSuggestedFilename):
(TestWebKitAPI::navigationResponseDidBecomeDownload):
(TestWebKitAPI::setPagePolicyClient):
(TestWebKitAPI::TEST):
(TestWebKitAPI::decidePolicyForNavigationAction): Deleted.
(TestWebKitAPI::setContextDownloadClient): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
(TestWebKitAPI::decideDestinationWithSuggestedFilename):
(TestWebKitAPI::contextMenuDidCreateDownload):
(TestWebKitAPI::TEST):
(TestWebKitAPI::decideDestinationWithSuggestedFilenameContainingSlashes):
(TestWebKitAPI::contextMenuDidCreateDownloadWithSuggestedFilenameContainingSlashes):
* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(-[BecomeDownloadDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(-[ConvertResponseToDownloadNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFailProvisionalNavigation:withError:]):
(-[TestDownloadNavigationResponseFromMemoryCacheDelegate webView:didFinishNavigation:]):
(TEST):
(downloadTestServer):
(checkResumedDownloadContents):
(simpleDownloadTestServer):
(checkFileContents):
(tempFileThatDoesNotExist):
(-[DownloadTestSchemeDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TestWebKitAPI::mutateFile):
* TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:
(-[DownloadProgressTestRunner webView:decidePolicyForNavigationResponse:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
* TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
(TEST):
* TestWebKitAPI/cocoa/TestDownloadDelegate.h:
* TestWebKitAPI/cocoa/TestDownloadDelegate.mm:
(-[TestDownloadDelegate download:willPerformHTTPRedirection:newRequest:decisionHandler:]):
(-[TestDownloadDelegate download:decideDestinationWithResponse:suggestedFilename:completionHandler:]):
(-[TestDownloadDelegate download:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[TestDownloadDelegate download:didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestDownloadDelegate downloadDidFinish:]):
(-[TestDownloadDelegate download:didFailWithError:resumeData:]):
(-[TestDownloadDelegate webView:navigationResponse:didBecomeDownload:]):
(-[TestDownloadDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[TestDownloadDelegate waitForDownloadDidFinish]):
(-[TestDownloadDelegate takeCallbackRecord]):
(-[TestDownloadDelegate _downloadDidStart:]): Deleted.
(-[TestDownloadDelegate _download:didReceiveServerRedirectToURL:]): Deleted.
(-[TestDownloadDelegate _download:didReceiveResponse:]): Deleted.
(-[TestDownloadDelegate _download:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): Deleted.
(-[TestDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]): Deleted.
(-[TestDownloadDelegate _downloadDidFinish:]): Deleted.
(-[TestDownloadDelegate _download:didFailWithError:]): Deleted.
(-[TestDownloadDelegate _downloadDidCancel:]): Deleted.
(-[TestDownloadDelegate _download:didReceiveAuthenticationChallenge:completionHandler:]): Deleted.
(-[TestDownloadDelegate _download:didCreateDestination:]): Deleted.
* TestWebKitAPI/cocoa/TestLegacyDownloadDelegate.h: Copied from Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.h.
* TestWebKitAPI/cocoa/TestLegacyDownloadDelegate.mm: Copied from Tools/TestWebKitAPI/cocoa/TestDownloadDelegate.mm.
(-[TestLegacyDownloadDelegate _downloadDidStart:]):
(-[TestLegacyDownloadDelegate _download:didReceiveServerRedirectToURL:]):
(-[TestLegacyDownloadDelegate _download:didReceiveResponse:]):
(-[TestLegacyDownloadDelegate _download:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[TestLegacyDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
(-[TestLegacyDownloadDelegate _downloadDidFinish:]):
(-[TestLegacyDownloadDelegate _download:didFailWithError:]):
(-[TestLegacyDownloadDelegate _downloadDidCancel:]):
(-[TestLegacyDownloadDelegate _download:didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestLegacyDownloadDelegate _download:didCreateDestination:]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::navigationDidBecomeDownloadShared):
(WTR::TestController::navigationActionDidBecomeDownload):
(WTR::TestController::navigationResponseDidBecomeDownload):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::decideDestinationWithSuggestedFilename):
(WTR::TestController::downloadDidFinish):
(WTR::TestController::downloadDidFail):
(WTR::TestController::downloadDidReceiveServerRedirectToURL):
(WTR::TestController::downloadDidStart):
(WTR::TestController::decidePolicyForNavigationAction):
(WTR::TestController::downloadDidCancel): Deleted.
* WebKitTestRunner/TestController.h:
LayoutTests:
Introduce new download API
https://bugs.webkit.org/show_bug.cgi?id=217747
Patch by Alex Christensen <achristensen@webkit.org> on 2020-12-10
Reviewed by Brady Eidson.
* fast/dom/HTMLAnchorElement/anchor-download-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt:
Now that NetworkDataTaskBlob::suggestedFilename doesn't suggest "unknown"
the capitalization has changed to "Unknown" from NSURLResponse's suggestedFilename.
Canonical link: https://commits.webkit.org/232305@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-10 19:27:49 +00:00
|
|
|
UIProcess/API/C/WKDownloadRef.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKFormSubmissionListener.cpp
|
|
|
|
UIProcess/API/C/WKFrame.cpp
|
|
|
|
UIProcess/API/C/WKFrameHandleRef.cpp
|
|
|
|
UIProcess/API/C/WKFrameInfoRef.cpp
|
|
|
|
UIProcess/API/C/WKFramePolicyListener.cpp
|
|
|
|
UIProcess/API/C/WKGeolocationManager.cpp
|
|
|
|
UIProcess/API/C/WKGeolocationPermissionRequest.cpp
|
|
|
|
UIProcess/API/C/WKGeolocationPosition.cpp
|
2019-09-06 20:42:42 +00:00
|
|
|
UIProcess/API/C/WKHTTPCookieStoreRef.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKHitTestResult.cpp
|
|
|
|
UIProcess/API/C/WKIconDatabase.cpp
|
|
|
|
UIProcess/API/C/WKInspector.cpp
|
|
|
|
UIProcess/API/C/WKKeyValueStorageManager.cpp
|
2021-02-09 12:46:22 +00:00
|
|
|
UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp
|
2019-06-26 23:30:19 +00:00
|
|
|
UIProcess/API/C/WKMessageListener.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKMockDisplay.cpp
|
|
|
|
UIProcess/API/C/WKMockMediaDevice.cpp
|
|
|
|
UIProcess/API/C/WKNavigationActionRef.cpp
|
|
|
|
UIProcess/API/C/WKNavigationDataRef.cpp
|
|
|
|
UIProcess/API/C/WKNavigationRef.cpp
|
|
|
|
UIProcess/API/C/WKNavigationResponseRef.cpp
|
|
|
|
UIProcess/API/C/WKNotification.cpp
|
|
|
|
UIProcess/API/C/WKNotificationManager.cpp
|
|
|
|
UIProcess/API/C/WKNotificationPermissionRequest.cpp
|
|
|
|
UIProcess/API/C/WKOpenPanelParametersRef.cpp
|
|
|
|
UIProcess/API/C/WKOpenPanelResultListener.cpp
|
|
|
|
UIProcess/API/C/WKPage.cpp
|
|
|
|
UIProcess/API/C/WKPageConfigurationRef.cpp
|
|
|
|
UIProcess/API/C/WKPageGroup.cpp
|
|
|
|
UIProcess/API/C/WKPreferences.cpp
|
|
|
|
UIProcess/API/C/WKProtectionSpace.cpp
|
|
|
|
UIProcess/API/C/WKResourceCacheManager.cpp
|
|
|
|
UIProcess/API/C/WKSessionStateRef.cpp
|
2020-11-14 02:16:49 +00:00
|
|
|
UIProcess/API/C/WKSpeechRecognitionPermissionCallback.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKTextChecker.cpp
|
|
|
|
UIProcess/API/C/WKUserContentControllerRef.cpp
|
[GTK][WPE] Add content extensions support in WKTR and unskip layout tests
https://bugs.webkit.org/show_bug.cgi?id=193622
Reviewed by Michael Catanzaro.
.:
* Source/cmake/OptionsGTK.cmake: Enable CONTENT_EXTENSIONS by default.
* Source/cmake/OptionsWPE.cmake: Ditto.
* Source/cmake/WebKitFeatures.cmake: Add a private CONTENT_EXTENSIONS option.
Source/WebCore:
No new tests needed.
* SourcesCocoa.txt: Remove loader/ResourceLoadInfo.cpp, it's not Cocoa-specific anymore.
* Sources.txt: Add loader/ResourceLoadInfo.cpp, all ports use it now.
Source/WebKit:
* NetworkProcess/cache/NetworkCacheData.h: Define an adoptAndMapFile() implementation
for GFileIOStream objects.
* NetworkProcess/cache/NetworkCacheDataSoup.cpp:
(WebKit::NetworkCache::adoptAndMapFile): Added implementation, which extracts the file
descriptor from a GFileIOStream, as it inherits from GFileDescriptorBased, and then
reuses the version of adoptAndMapFile() which takes a file descritor for the actual work.
* NetworkProcess/NetworkLoadChecker.cpp:
(Webkit::NetworkLoadChecker::checkRequest): Use "this" when referring to
processContentExtensionRulesForLoad() in order to avoid ambiguity.
* Sources.txt: Add WKUserContentExtensionStoreRef.cpp, all ports use it now.
* SourcesCocoa.txt: Remove WKUserContentExtensionStoreRef.cpp, because it is not
Cocoa-specific anymore.
* SourcesGTK.txt: Add APIContentRuleListStoreGLib.cpp.
* SourcesWPE.txt: Ditto.
* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp:
(WKUserContentExtensionStoreCreate): Added.
(toResult): Added.
(WKUserContentExtensionStoreCompile): Added.
(WKUserContentExtensionStoreLookup): Added.
(WKUserContentExtensionStoreRemove): Added.
* UIProcess/API/C/WKUserContentExtensionStoreRef.h: Add declarations for the new C API
functions and for the WKUserContentExtensionStoreResult status enum.
* UIProcess/API/glib/APIContentRuleListStoreGLib.cpp: Added.
(API::ContentRuleListStore::defaultStorePath): Add a dummy implementation. The public API
for the GLib based ports (GTK+ and WPE) will not allow using the default store and will
always indicating a path.
Tools:
This adds support for loading content extension rule sets from the JSON files which
accompany the corresponding layout test, using the C API. The Cocoa specific parts
of WKTR for this could be removed, but that is left for a follow-up patch with
cleanups.
* Scripts/webkitperl/FeatureList.pm: Add an option to toggle CONTENT_EXTENSIONS.
* WebKitTestRunner/TestController.cpp:
(WTR::testPath): Subtract one from the length when constructing the result std::string to
avoid having the null-terminator copied into the result.
(WTR::TestController::configureViewForTest): Call configureContentExtensionForTest() as
part of the preparations to run a test.
(WTR::ContentExtensionStoreCallbackContext::ContentExtensionStoreCallbackContext): Added.
(WTR::contentExtensionStoreCallback): Added.
(WTR::contentExtensionJSONPath): Used to calculate the path to the JSON rule set to be
used for content extensions test.
(WTR::TestController::configureContentExtensionForTest): Added, handles enabling content
extensions and compiling the JSON rule set for tests involving content extensions.
(WTR::TestController::resetContentExtensions): Removes the content extension built for
testing and disables content extensions.
(WTR::TestController::resetPreferencesToConsistentValues): Add a call to
resetContentExtensions().
(WTR::TestController::userContentController): Added implementation for ports other than Cocoa.
* WebKitTestRunner/TestController.h: Add declarations for resetContentExtensions(),
configureContentExtensionForTest(), and userContentController().
LayoutTests:
* platform/gtk/TestExpectations: Un-skip tests for content extensions and add expectations.
Canonical link: https://commits.webkit.org/208942@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-12 00:07:21 +00:00
|
|
|
UIProcess/API/C/WKUserContentExtensionStoreRef.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKUserMediaPermissionCheck.cpp
|
|
|
|
UIProcess/API/C/WKUserMediaPermissionRequest.cpp
|
2019-09-07 16:04:00 +00:00
|
|
|
UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp
|
2018-09-08 00:36:09 +00:00
|
|
|
UIProcess/API/C/WKWebsiteDataStoreRef.cpp
|
|
|
|
UIProcess/API/C/WKWebsitePolicies.cpp
|
|
|
|
UIProcess/API/C/WKWindowFeaturesRef.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Authentication/AuthenticationChallengeProxy.cpp
|
|
|
|
UIProcess/Authentication/AuthenticationDecisionListener.cpp
|
|
|
|
UIProcess/Authentication/WebCredential.cpp
|
|
|
|
UIProcess/Authentication/WebProtectionSpace.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2020-01-15 02:50:12 +00:00
|
|
|
// FIXME(206266): AutomationProtocolObjects.h's "namespace Protocol" conflicts with objc/runtime.h's "typedef struct objc_object Protocol"
|
|
|
|
UIProcess/Automation/SimulatedInputDispatcher.cpp @no-unify
|
|
|
|
UIProcess/Automation/WebAutomationSession.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Downloads/DownloadProxy.cpp
|
|
|
|
UIProcess/Downloads/DownloadProxyMap.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Gamepad/UIGamepad.cpp
|
|
|
|
UIProcess/Gamepad/UIGamepadProvider.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: This file should be "unified" once GTK's PluginProcess2 is removed.
|
2018-08-18 01:31:15 +00:00
|
|
|
UIProcess/Launcher/ProcessLauncher.cpp @no-unify
|
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Network/NetworkProcessProxy.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* en.lproj/Localizable.strings:
Add a string for the user-visible name of the GPU process.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit:
Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.
In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.
For now, it is just a shell of a process; functionality will be added
in future patches!
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* Configurations/GPUService.xcconfig: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
* Shared/AuxiliaryProcess.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Platform/ExtraPrivateSymbolsForTAPI.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* Configurations/WebKit.xcconfig:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.
* GPUProcess/GPUConnectionToWebProcess.cpp: Added.
* GPUProcess/GPUConnectionToWebProcess.h: Added.
* GPUProcess/GPUConnectionToWebProcess.messages.in: Added.
On the GPU process side, the incoming connection from the Web Content process.
* GPUProcess/GPUProcess.cpp: Added.
* GPUProcess/GPUProcess.h: Added.
* GPUProcess/GPUProcess.messages.in: Added.
* GPUProcess/GPUProcessCreationParameters.cpp: Added.
* GPUProcess/GPUProcessCreationParameters.h: Added.
* GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
* GPUProcess/ios/GPUProcessIOS.mm: Added.
* GPUProcess/mac/GPUProcessMac.mm: Added.
Add the shell of the GPU process. Mostly stolen from the Networking process.
* UIProcess/GPU/GPUProcessProxy.cpp: Added.
(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):
* UIProcess/GPU/GPUProcessProxy.h: Added.
* UIProcess/GPU/GPUProcessProxy.messages.in: Added.
On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.
This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getGPUProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getGPUProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.
* WebProcess/GPU/GPUProcessConnection.cpp: Added.
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):
* WebProcess/GPU/GPUProcessConnection.h: Added.
(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):
* WebProcess/GPU/GPUProcessConnection.messages.in: Added.
* WebProcess/GPU/GPUProcessConnectionInfo.h: Added.
(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.
* WebProcess/WebProcess.cpp:
(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.
Source/WebKitLegacy/mac:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Canonical link: https://commits.webkit.org/218060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 09:58:21 +00:00
|
|
|
UIProcess/GPU/GPUProcessProxy.cpp
|
|
|
|
|
2020-01-28 01:13:27 +00:00
|
|
|
UIProcess/Inspector/InspectorTargetProxy.cpp
|
2021-03-22 23:26:01 +00:00
|
|
|
UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp
|
|
|
|
UIProcess/Inspector/WebInspectorUIProxy.cpp
|
2020-11-11 21:44:38 +00:00
|
|
|
UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp
|
2020-01-28 01:13:27 +00:00
|
|
|
UIProcess/Inspector/WebInspectorUtilities.cpp
|
|
|
|
UIProcess/Inspector/WebPageDebuggable.cpp
|
|
|
|
UIProcess/Inspector/WebPageInspectorController.cpp
|
|
|
|
|
2020-02-26 06:05:13 +00:00
|
|
|
UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp
|
|
|
|
|
2020-04-14 22:35:47 +00:00
|
|
|
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
|
2020-04-16 13:36:07 +00:00
|
|
|
UIProcess/Media/MediaUsageManager.cpp
|
2021-04-06 19:06:53 +00:00
|
|
|
UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp
|
2020-04-14 22:35:47 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Notifications/WebNotification.cpp
|
|
|
|
UIProcess/Notifications/WebNotificationManagerProxy.cpp
|
|
|
|
UIProcess/Notifications/WebNotificationProvider.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/Plugins/PluginInfoStore.cpp
|
|
|
|
UIProcess/Plugins/PluginProcessManager.cpp
|
|
|
|
UIProcess/Plugins/PluginProcessProxy.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/UserContent/WebScriptMessageHandler.cpp
|
|
|
|
UIProcess/UserContent/WebUserContentControllerProxy.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2019-08-13 20:43:00 +00:00
|
|
|
UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
|
2019-01-09 00:35:39 +00:00
|
|
|
UIProcess/WebAuthentication/fido/CtapHidDriver.cpp
|
2019-08-23 18:56:03 +00:00
|
|
|
UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp
|
[WebAuthn] Implement AuthenticatorCancel
https://bugs.webkit.org/show_bug.cgi?id=191523
<rdar://problem/55920204>
Reviewed by Brent Fulgham.
Source/WebCore:
Covered by new tests in existing test files.
* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::get):
(WebCore::CredentialsContainer::isCreate):
* Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::create const):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):
* Modules/webauthn/AuthenticatorCoordinator.h:
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp: Removed.
* Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::tryCreate):
* Modules/webauthn/PublicKeyCredential.h:
* Modules/webauthn/PublicKeyCredentialData.h:
* Modules/webauthn/fido/DeviceRequestConverter.h:
* Modules/webauthn/fido/FidoHidMessage.cpp:
(fido::FidoHidMessage::FidoHidMessage):
* Modules/webauthn/fido/FidoHidPacket.cpp:
(fido::FidoHidInitPacket::getSerializedData const):
(fido::FidoHidContinuationPacket::getSerializedData const):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* testing/MockWebAuthenticationConfiguration.h:
(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):
* testing/MockWebAuthenticationConfiguration.idl:
Adds a new option to test AuthenticatorCancel.
Source/WebKit:
This patch implement two ways to cancel a pending WebAuthn ceremony:
1) Via navigation activities. Activities include i) main frame navigation, ii) main frame reload,
iii) main frame destruction, iv) sub frame navigation, and v) sub frame destruction. All the above
activities will cancel any pending WebAuthn ceremony that is associated with the frame. To prove
the association, a GlobalFrameIdentifier is bridged into WebAuthenticationRequestData. Navigation
cancel is done in WebPageProxy::didStartProvisionalLoadForFrameShared, and destruction cancel is done
in WebProcessProxy::didDestroyFrame and WebPageProxy::resetState.
2) Via UI. This path is simply bridged -[_WKWebAuthenticationPanel cancel] into AuthenticatorManager.
Noted, this patch follows the spec to wait until time out to notify RPs.
References: i) Step 20 of https://www.w3.org/TR/webauthn/#createCredential, ii) Step 18 of
https://www.w3.org/TR/webauthn/#getAssertion
As for what the cancel actually does, it:
1) stops any HID/NFC scanning;
2) sends CTAPHID_CANCEL to any HID authenticators that have been added. Reference:
https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#usb-hid-cancel
Sending CTAPHID_CANCEL, however, is not trivial. An abstract class FidoAuthenticator is crafted to
do this labor for both CtapAuthenticator and U2fAuthenticator during the time of destructions.
Noted: The CtapHidDriver is the only CtapDriver implements the cancel method. Since the message
is sent during state reset, lifecycle of the HidConenction and HidService which manage the underlying
IOHIDDeviceRef is very hard to hold. This is required for the regular async sender. Therefore,
HidConnection::sendSync is crafted to send the message synchronously to get rid of the tediousness
of managing those lifecycles.
P.S. Vector::grow doesn't initialize POD types. Therefore, this patch also appends it with memset
for FidoHidPacket.
P.S.S. This patch also simplifies AuthenticatorCoordinatorClient by: i) moving code from AuthenticatorCoordinatorClient
to WebAuthenticatorCoordinatorClient, and ii) using sendWithAsyncReply. The latter allows us to
get rid of the complex mechanism of ensuring the right reply is returned.
* DerivedSources.make:
* Sources.txt:
* UIProcess/API/APIWebAuthenticationPanel.cpp:
(API::WebAuthenticationPanel::create):
(API::WebAuthenticationPanel::WebAuthenticationPanel):
(API::WebAuthenticationPanel::cancel const):
* UIProcess/API/APIWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(-[_WKWebAuthenticationPanel cancel]):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::cancelRequest):
(WebKit::AuthenticatorManager::clearState):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::resetState):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/Cocoa/HidConnection.h:
(WebKit::HidConnection::isInitialized const):
(WebKit::HidConnection::setIsInitialized):
* UIProcess/WebAuthentication/Cocoa/HidConnection.mm:
(WebKit::HidConnection::~HidConnection):
(WebKit::HidConnection::initialize):
(WebKit::HidConnection::terminate):
(WebKit::HidConnection::sendSync):
(WebKit::HidConnection::send):
(WebKit::HidConnection::registerDataReceivedCallback):
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
(WebKit::MockHidConnection::initialize):
(WebKit::MockHidConnection::terminate):
(WebKit::MockHidConnection::sendSync):
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::feedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h:
* UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):
(WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebAuthenticatorCoordinatorProxy::requestReply): Deleted.
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
(WebKit::CtapAuthenticator::CtapAuthenticator):
(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::tryDowngrade):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
* UIProcess/WebAuthentication/fido/CtapDriver.h:
(WebKit::CtapDriver::cancel):
* UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::Worker::reset):
(WebKit::CtapHidDriver::Worker::cancel):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):
(WebKit::CtapHidDriver::returnResponse):
(WebKit::CtapHidDriver::reset):
(WebKit::CtapHidDriver::cancel):
* UIProcess/WebAuthentication/fido/CtapHidDriver.h:
* UIProcess/WebAuthentication/fido/FidoAuthenticator.cpp: Copied from Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.cpp.
(WebKit::FidoAuthenticator::FidoAuthenticator):
(WebKit::FidoAuthenticator::~FidoAuthenticator):
(WebKit::FidoAuthenticator::driver const):
(WebKit::FidoAuthenticator::releaseDriver):
* UIProcess/WebAuthentication/fido/FidoAuthenticator.h: Copied from Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.cpp.
* UIProcess/WebAuthentication/fido/FidoService.cpp:
(WebKit::FidoService::continueAfterGetInfo):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:
(WebKit::U2fAuthenticator::U2fAuthenticator):
(WebKit::U2fAuthenticator::issueCommand):
* UIProcess/WebAuthentication/fido/U2fAuthenticator.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didDestroyFrame):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::WebAuthenticatorCoordinator):
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebAuthenticatorCoordinator::~WebAuthenticatorCoordinator): Deleted.
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.messages.in: Removed.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::fromCoreFrame):
* WebProcess/WebPage/WebFrame.h:
Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/FidoHidMessageTest.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(-[TestWebAuthenticationPanelUIDelegate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-cancel.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid.html.
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid.html:
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-nfc.html:
* TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion.html:
LayoutTests:
Modified one of the error message that is no longer emitted.
* http/wpt/webauthn/public-key-credential-create-failure.https.html:
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
* http/wpt/webauthn/public-key-credential-get-failure.https.html:
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
Canonical link: https://commits.webkit.org/216561@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-18 20:55:56 +00:00
|
|
|
UIProcess/WebAuthentication/fido/FidoAuthenticator.cpp
|
2019-08-23 18:56:03 +00:00
|
|
|
UIProcess/WebAuthentication/fido/FidoService.cpp
|
2019-08-13 20:43:00 +00:00
|
|
|
UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
|
2019-01-09 00:35:39 +00:00
|
|
|
|
[WebAuthN] Support CTAP HID authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=188623
<rdar://problem/43353777>
Reviewed by Brent Fulgham and Chris Dumez.
Source/WebCore:
This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
Tests: http/wpt/webauthn/ctap-hid-failure.https.html
http/wpt/webauthn/ctap-hid-success.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
http/wpt/webauthn/public-key-credential-create-success-hid.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
http/wpt/webauthn/public-key-credential-get-success-hid.https.html
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
(WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
* Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
* Modules/webauthn/fido/DeviceResponseConverter.cpp:
(fido::readCTAPGetAssertionResponse):
* Modules/webauthn/fido/FidoConstants.h:
Source/WebKit:
This patch introduces a primitive support of CTAP HID authenticators for WebAuthN in macOS.
It involves low level HID device management&communication, high level CTAP HID authenticator
management&communication, and mock testing. The above three aspects will be covered in details:
1) Low level HID device management&communication: HidService&HidConnection
It relies on IOHIDManager to discover appropriate hid devices by passing a matching dictionary:
{ PrimaryUsagePage: 0xf1d0, PrimaryUsage: 0x01}. For communication, it utilizes HID reports.
To send a report, it calls IOHIDDeviceSetReport since the async version is not implemented.
To recieve a report, it calls IOHIDDeviceRegisterInputReportCallback to asynchronously wait
for incoming reports.
Here is the corresponding reference:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW2
2) High level CTAP HID authenticator management&communication: HidService&CtapHidDriver
Whenever an appropriate hid device is discovered by IOHIDManager, an AuthenticatorGetInfo command
is sent to the device to determine properties of the authenticator, says, which version of protocol
it supports, i.e. CTAP or U2F. So far, we only support CTAP authenticators. Once the authenticator
is determined to support CTAP, we then instantiate CtapHidAuthenticator which will then take care
of even higher level WebAuthN requests&responses.
Binaries are constructed and packaged according to the CTAP HID porotocol. CtapHidDriver takes care
of concurrency and channels, i.e. allocating channel and establishing the actual request/response
transaction. At the meantime, CtapHidDriver::Worker is then responsible for each single transaction.
Here is the corresponding reference:
https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#usb.
3) Mock Testing: MockHidService & MockHidConnection
A CTAP hid authenticator is simulated within MockHidConnection with options of specifying specific
error scenarios and of course could take care of successful cases. Four stages are presented in the
simulated authenticator to reflect: a) allocating channel for AuthenticatorGetInfo, b) sending
AuthenticatorGetInfo, c) allocating channel for actual request, and d) sending the actual request.
Besides implementing the above, it also does a few other things:
1) Make AuthenticatorManager::clearState asynchronous to avoid cyclic dependency:
Authenticator::returnResponse => AuthenticatorManager::respondReceived => AuthenticatorManager::clearState
=> Authenticator::~Authenticator.
2) Reorganize unified build sources to make it clear that which files are .mm and which are .cpp.
3) Import LocalAuthentication.framework in LocalAuthenticationSoftLink instead of being scattered.
* Sources.txt:
* SourcesCocoa.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManagerInternal::collectTransports):
(WebKit::AuthenticatorManager::clearStateAsync):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):
(WebKit::AuthenticatorTransportService::startDiscovery):
(WebKit::AuthenticatorTransportService::startDiscovery const): Deleted.
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
* UIProcess/WebAuthentication/Cocoa/HidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.h.
* UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Added.
(WebKit::reportReceived):
(WebKit::HidConnection::HidConnection):
(WebKit::HidConnection::~HidConnection):
(WebKit::HidConnection::initialize):
(WebKit::HidConnection::terminate):
(WebKit::HidConnection::send):
(WebKit::HidConnection::registerDataReceivedCallback):
(WebKit::HidConnection::unregisterDataReceivedCallback):
(WebKit::HidConnection::receiveReport):
(WebKit::HidConnection::consumeReports):
(WebKit::HidConnection::registerDataReceivedCallbackInternal):
* UIProcess/WebAuthentication/Cocoa/HidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/Cocoa/HidService.mm: Added.
(WebKit::deviceAddedCallback):
(WebKit::deviceRemovedCallback):
(WebKit::HidService::HidService):
(WebKit::HidService::~HidService):
(WebKit::HidService::startDiscoveryInternal):
(WebKit::HidService::platformStartDiscovery):
(WebKit::HidService::createHidConnection const):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
* UIProcess/WebAuthentication/Cocoa/LocalService.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::startDiscoveryInternal):
(WebKit::LocalService::startDiscoveryInternal const): Deleted.
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: Added.
(WebKit::MockHidConnection::MockHidConnection):
(WebKit::MockHidConnection::initialize):
(WebKit::MockHidConnection::terminate):
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::assembleRequest):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::stagesMatch const):
(WebKit::MockHidConnection::shouldContinueFeedReports):
(WebKit::MockHidConnection::continueFeedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockHidService.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockHidService::MockHidService):
(WebKit::MockHidService::platformStartDiscovery):
(WebKit::MockHidService::createHidConnection const):
* UIProcess/WebAuthentication/Mock/MockHidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
* UIProcess/WebAuthentication/Mock/MockLocalService.mm: Renamed from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockLocalService::MockLocalService):
(WebKit::MockLocalService::platformStartDiscovery const):
(WebKit::MockLocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: Added.
(WebKit::CtapHidAuthenticator::CtapHidAuthenticator):
(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapHidAuthenticator::getAssertion):
(WebKit::CtapHidAuthenticator::continueGetAssertionAfterResponseReceived const):
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: Added.
(WebKit::CtapHidDriver::Worker::Worker):
(WebKit::CtapHidDriver::Worker::~Worker):
(WebKit::CtapHidDriver::Worker::transact):
(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::CtapHidDriver):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):
(WebKit::CtapHidDriver::returnResponse):
* UIProcess/WebAuthentication/fido/CtapHidDriver.h: Added.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebKit.xcodeproj/project.pbxproj:
Tools:
This patch adds support for the mock testing and entitlements to allow minibrowser to talk
to hid devices.
* MiniBrowser/MiniBrowser.entitlements:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
LayoutTests:
* http/wpt/webauthn/ctap-hid-failure.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-failure.https.html: Added.
* http/wpt/webauthn/ctap-hid-success.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-success.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html: Added.
* http/wpt/webauthn/resources/util.js:
* platform/ios-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/206370@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-14 06:54:32 +00:00
|
|
|
UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp
|
|
|
|
UIProcess/WebAuthentication/Mock/MockHidConnection.cpp
|
|
|
|
UIProcess/WebAuthentication/Mock/MockHidService.cpp
|
|
|
|
|
|
|
|
UIProcess/WebAuthentication/AuthenticatorManager.cpp
|
|
|
|
UIProcess/WebAuthentication/AuthenticatorTransportService.cpp
|
|
|
|
UIProcess/WebAuthentication/Authenticator.cpp
|
|
|
|
UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp
|
2020-03-25 00:03:19 +00:00
|
|
|
UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp
|
2020-10-16 19:38:48 +00:00
|
|
|
UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp
|
[WebAuthN] Support CTAP HID authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=188623
<rdar://problem/43353777>
Reviewed by Brent Fulgham and Chris Dumez.
Source/WebCore:
This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
Tests: http/wpt/webauthn/ctap-hid-failure.https.html
http/wpt/webauthn/ctap-hid-success.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
http/wpt/webauthn/public-key-credential-create-success-hid.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
http/wpt/webauthn/public-key-credential-get-success-hid.https.html
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
(WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
* Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
* Modules/webauthn/fido/DeviceResponseConverter.cpp:
(fido::readCTAPGetAssertionResponse):
* Modules/webauthn/fido/FidoConstants.h:
Source/WebKit:
This patch introduces a primitive support of CTAP HID authenticators for WebAuthN in macOS.
It involves low level HID device management&communication, high level CTAP HID authenticator
management&communication, and mock testing. The above three aspects will be covered in details:
1) Low level HID device management&communication: HidService&HidConnection
It relies on IOHIDManager to discover appropriate hid devices by passing a matching dictionary:
{ PrimaryUsagePage: 0xf1d0, PrimaryUsage: 0x01}. For communication, it utilizes HID reports.
To send a report, it calls IOHIDDeviceSetReport since the async version is not implemented.
To recieve a report, it calls IOHIDDeviceRegisterInputReportCallback to asynchronously wait
for incoming reports.
Here is the corresponding reference:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW2
2) High level CTAP HID authenticator management&communication: HidService&CtapHidDriver
Whenever an appropriate hid device is discovered by IOHIDManager, an AuthenticatorGetInfo command
is sent to the device to determine properties of the authenticator, says, which version of protocol
it supports, i.e. CTAP or U2F. So far, we only support CTAP authenticators. Once the authenticator
is determined to support CTAP, we then instantiate CtapHidAuthenticator which will then take care
of even higher level WebAuthN requests&responses.
Binaries are constructed and packaged according to the CTAP HID porotocol. CtapHidDriver takes care
of concurrency and channels, i.e. allocating channel and establishing the actual request/response
transaction. At the meantime, CtapHidDriver::Worker is then responsible for each single transaction.
Here is the corresponding reference:
https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#usb.
3) Mock Testing: MockHidService & MockHidConnection
A CTAP hid authenticator is simulated within MockHidConnection with options of specifying specific
error scenarios and of course could take care of successful cases. Four stages are presented in the
simulated authenticator to reflect: a) allocating channel for AuthenticatorGetInfo, b) sending
AuthenticatorGetInfo, c) allocating channel for actual request, and d) sending the actual request.
Besides implementing the above, it also does a few other things:
1) Make AuthenticatorManager::clearState asynchronous to avoid cyclic dependency:
Authenticator::returnResponse => AuthenticatorManager::respondReceived => AuthenticatorManager::clearState
=> Authenticator::~Authenticator.
2) Reorganize unified build sources to make it clear that which files are .mm and which are .cpp.
3) Import LocalAuthentication.framework in LocalAuthenticationSoftLink instead of being scattered.
* Sources.txt:
* SourcesCocoa.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManagerInternal::collectTransports):
(WebKit::AuthenticatorManager::clearStateAsync):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):
(WebKit::AuthenticatorTransportService::startDiscovery):
(WebKit::AuthenticatorTransportService::startDiscovery const): Deleted.
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
* UIProcess/WebAuthentication/Cocoa/HidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.h.
* UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Added.
(WebKit::reportReceived):
(WebKit::HidConnection::HidConnection):
(WebKit::HidConnection::~HidConnection):
(WebKit::HidConnection::initialize):
(WebKit::HidConnection::terminate):
(WebKit::HidConnection::send):
(WebKit::HidConnection::registerDataReceivedCallback):
(WebKit::HidConnection::unregisterDataReceivedCallback):
(WebKit::HidConnection::receiveReport):
(WebKit::HidConnection::consumeReports):
(WebKit::HidConnection::registerDataReceivedCallbackInternal):
* UIProcess/WebAuthentication/Cocoa/HidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/Cocoa/HidService.mm: Added.
(WebKit::deviceAddedCallback):
(WebKit::deviceRemovedCallback):
(WebKit::HidService::HidService):
(WebKit::HidService::~HidService):
(WebKit::HidService::startDiscoveryInternal):
(WebKit::HidService::platformStartDiscovery):
(WebKit::HidService::createHidConnection const):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
* UIProcess/WebAuthentication/Cocoa/LocalService.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::startDiscoveryInternal):
(WebKit::LocalService::startDiscoveryInternal const): Deleted.
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: Added.
(WebKit::MockHidConnection::MockHidConnection):
(WebKit::MockHidConnection::initialize):
(WebKit::MockHidConnection::terminate):
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::assembleRequest):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::stagesMatch const):
(WebKit::MockHidConnection::shouldContinueFeedReports):
(WebKit::MockHidConnection::continueFeedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockHidService.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockHidService::MockHidService):
(WebKit::MockHidService::platformStartDiscovery):
(WebKit::MockHidService::createHidConnection const):
* UIProcess/WebAuthentication/Mock/MockHidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
* UIProcess/WebAuthentication/Mock/MockLocalService.mm: Renamed from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockLocalService::MockLocalService):
(WebKit::MockLocalService::platformStartDiscovery const):
(WebKit::MockLocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: Added.
(WebKit::CtapHidAuthenticator::CtapHidAuthenticator):
(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapHidAuthenticator::getAssertion):
(WebKit::CtapHidAuthenticator::continueGetAssertionAfterResponseReceived const):
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: Added.
(WebKit::CtapHidDriver::Worker::Worker):
(WebKit::CtapHidDriver::Worker::~Worker):
(WebKit::CtapHidDriver::Worker::transact):
(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::CtapHidDriver):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):
(WebKit::CtapHidDriver::returnResponse):
* UIProcess/WebAuthentication/fido/CtapHidDriver.h: Added.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebKit.xcodeproj/project.pbxproj:
Tools:
This patch adds support for the mock testing and entitlements to allow minibrowser to talk
to hid devices.
* MiniBrowser/MiniBrowser.entitlements:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
LayoutTests:
* http/wpt/webauthn/ctap-hid-failure.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-failure.https.html: Added.
* http/wpt/webauthn/ctap-hid-success.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-success.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html: Added.
* http/wpt/webauthn/resources/util.js:
* platform/ios-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/206370@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-14 06:54:32 +00:00
|
|
|
|
2019-04-17 17:03:59 +00:00
|
|
|
UIProcess/WebsiteData/WebDeviceOrientationAndMotionAccessController.cpp
|
2018-08-24 00:59:11 +00:00
|
|
|
UIProcess/WebsiteData/WebsiteDataRecord.cpp
|
|
|
|
UIProcess/WebsiteData/WebsiteDataStore.cpp
|
2018-12-05 18:42:21 +00:00
|
|
|
UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2021-07-12 09:30:56 +00:00
|
|
|
UIProcess/XR/PlatformXRSystem.cpp
|
|
|
|
|
2020-10-16 19:38:48 +00:00
|
|
|
WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp
|
|
|
|
WebAuthnProcess/WebAuthnProcess.cpp
|
|
|
|
WebAuthnProcess/WebAuthnProcessCreationParameters.cpp
|
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebConnectionToUIProcess.cpp
|
|
|
|
WebProcess/WebProcess.cpp
|
2020-03-30 14:48:38 +00:00
|
|
|
WebProcess/WebSleepDisablerClient.cpp
|
2020-11-09 20:20:06 +00:00
|
|
|
WebProcess/WebSystemSoundDelegate.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2020-01-15 02:50:12 +00:00
|
|
|
// FIXME(206266): AutomationProtocolObjects.h's "namespace Protocol" conflicts with objc/runtime.h's "typedef struct objc_object Protocol"
|
|
|
|
WebProcess/Automation/WebAutomationSessionProxy.cpp @no-unify
|
2020-04-24 17:50:41 +00:00
|
|
|
WebProcess/Automation/WebAutomationDOMWindowObserver.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Cache/WebCacheStorageConnection.cpp
|
|
|
|
WebProcess/Cache/WebCacheStorageProvider.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Databases/WebDatabaseProvider.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2021-02-09 12:46:22 +00:00
|
|
|
WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp
|
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/FileAPI/BlobRegistryProxy.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/FullScreen/WebFullScreenManager.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Gamepad/WebGamepad.cpp
|
|
|
|
WebProcess/Gamepad/WebGamepadProvider.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp
|
|
|
|
WebProcess/Geolocation/WebGeolocationManager.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/InjectedBundle/InjectedBundle.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundleClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
|
|
|
|
WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-09-08 00:36:09 +00:00
|
|
|
WebProcess/InjectedBundle/API/c/WKBundle.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp
|
|
|
|
WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp
|
2018-11-28 19:05:21 +00:00
|
|
|
WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp @no-unify
|
|
|
|
WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2020-01-28 01:13:27 +00:00
|
|
|
WebProcess/Inspector/RemoteWebInspectorUI.cpp
|
|
|
|
WebProcess/Inspector/WebInspector.cpp
|
|
|
|
WebProcess/Inspector/WebInspectorClient.cpp
|
|
|
|
WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp
|
|
|
|
WebProcess/Inspector/WebInspectorUI.cpp
|
2020-11-11 21:44:38 +00:00
|
|
|
WebProcess/Inspector/WebInspectorUIExtensionController.cpp
|
2020-01-28 01:13:27 +00:00
|
|
|
WebProcess/Inspector/WebPageInspectorTarget.cpp
|
|
|
|
WebProcess/Inspector/WebPageInspectorTargetController.cpp
|
|
|
|
WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp
|
|
|
|
|
2021-04-06 19:06:53 +00:00
|
|
|
WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp
|
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp
|
|
|
|
WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* en.lproj/Localizable.strings:
Add a string for the user-visible name of the GPU process.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit:
Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.
In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.
For now, it is just a shell of a process; functionality will be added
in future patches!
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* Configurations/GPUService.xcconfig: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
* Shared/AuxiliaryProcess.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Platform/ExtraPrivateSymbolsForTAPI.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* Configurations/WebKit.xcconfig:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.
* GPUProcess/GPUConnectionToWebProcess.cpp: Added.
* GPUProcess/GPUConnectionToWebProcess.h: Added.
* GPUProcess/GPUConnectionToWebProcess.messages.in: Added.
On the GPU process side, the incoming connection from the Web Content process.
* GPUProcess/GPUProcess.cpp: Added.
* GPUProcess/GPUProcess.h: Added.
* GPUProcess/GPUProcess.messages.in: Added.
* GPUProcess/GPUProcessCreationParameters.cpp: Added.
* GPUProcess/GPUProcessCreationParameters.h: Added.
* GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
* GPUProcess/ios/GPUProcessIOS.mm: Added.
* GPUProcess/mac/GPUProcessMac.mm: Added.
Add the shell of the GPU process. Mostly stolen from the Networking process.
* UIProcess/GPU/GPUProcessProxy.cpp: Added.
(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):
* UIProcess/GPU/GPUProcessProxy.h: Added.
* UIProcess/GPU/GPUProcessProxy.messages.in: Added.
On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.
This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getGPUProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getGPUProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.
* WebProcess/GPU/GPUProcessConnection.cpp: Added.
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):
* WebProcess/GPU/GPUProcessConnection.h: Added.
(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):
* WebProcess/GPU/GPUProcessConnection.messages.in: Added.
* WebProcess/GPU/GPUProcessConnectionInfo.h: Added.
(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.
* WebProcess/WebProcess.cpp:
(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.
Source/WebKitLegacy/mac:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Canonical link: https://commits.webkit.org/218060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 09:58:21 +00:00
|
|
|
WebProcess/GPU/GPUProcessConnection.cpp
|
[Concurrent display lists] Add an initial implementation of concurrent display list rendering
https://bugs.webkit.org/show_bug.cgi?id=218426
<rdar://problem/71167220>
Reviewed by Ryosuke Niwa.
This patch adds a first-cut implementation of concurrent display list rendering, which allows the GPU and web
processes to read and write display list data at the same time. To achieve this, we remove the placeholder
shared memory display list encoding mechanism previously added in <webkit.org/b/218406>, and replace it with a
new model in which a writer (i.e. the web process) and a reader (i.e. the GPU process) share a set of reusable
shared memory buffers which contain display list item data. As the writer appends data to shared memory, it
increments a counter in each shared memory buffer that represents the number of bytes that the reader has yet to
read; as the reader reads display list items from shared memory, it decrements this counter.
This patch also implements a simple strategy for reusing these shared item buffers. The web process maintains a
queue of reusable buffers; when display list items are appended and the current writable buffer is out of
capacity, the display list item buffer calls out to WebKit2 via a client method to request more shared memory.
Here, the web process traverses the queue of reusable item buffers in search of a buffer with sufficient
capacity; if found, we hand this back to WebCore as an opaque `ItemBufferHandle`; otherwise, we allocate a new
reusable shared memory buffer. Item buffers that have been used become reusable only after they are (1) no
longer being read from -- i.e., the counter value is 0, and (2) they are not actively being written to.
Buffers that have been used are lazily reintroduced into the reuse queue when a display list requests a handle
to writable item buffer data.
See below for more details.
* GPUProcess/graphics/DisplayListReaderHandle.cpp: Copied from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListReaderHandle::advance):
(WebKit::DisplayListReaderHandle::displayListForReading const):
* GPUProcess/graphics/DisplayListReaderHandle.h: Copied from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListReaderHandle::create):
(WebKit::DisplayListReaderHandle::DisplayListReaderHandle):
Add a new helper class to represent a shared display list item buffer that the GPU process can use to consume
display list items. Advancing the cursor in `DisplayListReaderHandle` decrements the "remaining bytes" counter;
the class also has a helper method for creating a new `DisplayList` with a given offset into the shared buffer,
as well the number of bytes to read.
* GPUProcess/graphics/RemoteImageBuffer.h:
Handle the `MetaCommandSwitchTo` and `FlushContext` items by (respectively) informing the rendering backend
about the next buffer to read from, and sending a "flush committed" IPC message back to the web process.
(WebKit::RemoteImageBuffer::RemoteImageBuffer):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::applyDisplayListsFromHandle):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
This is the main loop in the GPU process that is responsible for applying incoming display list item data. This
IPC endpoint receives information about where to start (i.e. an item buffer ID and an offset into shared memory
in that buffer) and begins reading ranges of display list item data inside that buffer. After it is done
processing all of its unread bytes, it then checks the unread byte count once again, and continues the loop if
the web process has advanced this count.
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):
(WebKit::RemoteRenderingBackend::didCreateSharedDisplayListHandle):
Add logic to handle the case where we reached the end of an item buffer, but the next buffer identifier is still
unknown to us (since it is still "in transit" via the `DidCreateSharedDisplayListHandle` IPC message). In this
case, we remember the next buffer identifier in `m_nextItemBufferToRead`, and exit the processing loop inside
`wakeUpAndApplyDisplayList`. Upon receiving the shared memory handle in `didCreateSharedDisplayListHandle`, we
then automatically resume display list processing, starting from the beginning of this new buffer.
(WebKit::RemoteRenderingBackend::applyDisplayList): Deleted.
(WebKit::RemoteRenderingBackend::submitDisplayList): Deleted.
(WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): Deleted.
(WebKit::RemoteRenderingBackend::didCreateSharedItemData): Deleted.
We don't need any of these methods anymore, now that there is only one codepath for processing display list
items. See `RemoteRenderingBackend::wakeUpAndApplyDisplayList` above. Also, rename `didCreateSharedItemData`
to `didCreateSharedDisplayListHandle` (also above).
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* Shared/SharedDisplayListHandle.h:
(WebKit::SharedDisplayListHandle::sharedMemory):
(WebKit::SharedDisplayListHandle::sharedMemory const):
(WebKit::SharedDisplayListHandle::identifier const):
(WebKit::SharedDisplayListHandle::data const):
(WebKit::SharedDisplayListHandle::unreadBytes):
(WebKit::SharedDisplayListHandle::Lock::Lock):
(WebKit::SharedDisplayListHandle::Lock::~Lock):
(WebKit::SharedDisplayListHandle::SharedDisplayListHandle):
(WebKit::SharedDisplayListHandle::header):
(WebKit::SharedDisplayListHandle::header const):
(WebKit::SharedDisplayListHandle::encode const): Deleted.
(WebKit::SharedDisplayListHandle::decode): Deleted.
Repurpose `SharedDisplayListHandle` to serve as a base class for both `DisplayListReaderHandle` and
`DisplayListWriterHandle`. This base class is aware of the memory layout of the display list item buffer in
shared memory (in particular, the fact that the first 8 bytes are the atomic lock and the next 8 bytes contain
the unread byte counter).
Internally, this uses a protected RAII class, `SharedDisplayListHandle::Lock`, to grab the lock before either
reading or writing the unread bytes count.
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/DisplayListWriterHandle.cpp: Added.
(WebKit::DisplayListWriterHandle::advance):
(WebKit::DisplayListWriterHandle::availableCapacity const):
(WebKit::DisplayListWriterHandle::createHandle const):
(WebKit::DisplayListWriterHandle::resetWritableOffsetIfPossible):
This helper method moves the writable offset (see below) back to the start of the buffer if it is not being read
from by the GPU process.
* WebProcess/GPU/graphics/DisplayListWriterHandle.h: Renamed from Source/WebKit/Shared/SharedDisplayListHandle.cpp.
(WebKit::DisplayListWriterHandle::create):
(WebKit::DisplayListWriterHandle::writableOffset const):
Similar to `DisplayListReaderHandle`, except that this contains logic specific to the web process for writing
display list items into shared memory. Advancing the cursor in `DisplayListWriterHandle` increments the counter.
It also increments the `writableOffset` of the handle, which represents the minimum offset into the shared
buffer that may contain newly appended display list items.
(WebKit::DisplayListWriterHandle::DisplayListWriterHandle):
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::submitDisplayList):
(WebKit::RemoteRenderingBackendProxy::updateReusableHandles):
This private helper iterates the set of buffers that are not currently being written to, and adds each one to
the reusable buffer queue only if its writable offset is at the start.
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):
Implements logic that hands shared item buffer data handles to WebCore for writing display list items. This will
try to reuse an item buffer in the reuse queue, if possible, and fall back to allocating a new chunk of shared
memory if no reusable buffer is found (or the existing buffers have insufficient capacity). The fact that we
iterate through each reusable buffer in order, combined with the above logic in `updateReusableHandles`, ensures
that once we begin writing to a item buffer, we will continue using that item buffer until it exhausts available
capacity.
This property is important because it allows the GPU process to simply start reading item data from a given
offset and buffer ID (specified in the `WakeUpAndApplyDisplayList` IPC message), and seamlessly continue
reading data even after it exhausts all available item data in the current buffer by continuing from the start
of the item buffer that contains the next display list items (which we learn in the GPU process by encountering
a `MetaCommandSwitchTo` item at the end of the previous buffer).
In "steady state" (wherein both processes are concurrently writing and reading items as quickly as possible),
this means that as the web process is busy filling up each item buffer with item data, the GPU process is also
busy applying all the item data in one buffer and automatically moving on to the next buffer with no additional
IPC messages required.
(WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
Canonical link: https://commits.webkit.org/231461@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-11 15:06:54 +00:00
|
|
|
WebProcess/GPU/graphics/DisplayListWriterHandle.cpp
|
2020-02-28 01:35:21 +00:00
|
|
|
WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
|
2020-12-09 18:32:29 +00:00
|
|
|
WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
|
|
|
|
WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
|
2020-10-16 22:20:58 +00:00
|
|
|
WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
|
2020-10-27 04:39:55 +00:00
|
|
|
WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
|
2020-01-13 22:27:39 +00:00
|
|
|
WebProcess/GPU/media/AudioTrackPrivateRemote.cpp
|
2020-01-06 23:49:21 +00:00
|
|
|
WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
|
2020-11-17 17:25:27 +00:00
|
|
|
WebProcess/GPU/media/MediaSourcePrivateRemote.cpp
|
2020-02-27 03:51:17 +00:00
|
|
|
WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp
|
2021-02-11 07:24:24 +00:00
|
|
|
WebProcess/GPU/media/RemoteAudioHardwareListener.cpp
|
2020-03-05 19:43:12 +00:00
|
|
|
WebProcess/GPU/media/RemoteAudioSession.cpp
|
2020-03-04 19:42:28 +00:00
|
|
|
WebProcess/GPU/media/RemoteCDM.cpp
|
|
|
|
WebProcess/GPU/media/RemoteCDMFactory.cpp
|
|
|
|
WebProcess/GPU/media/RemoteCDMInstance.cpp
|
|
|
|
WebProcess/GPU/media/RemoteCDMInstanceSession.cpp
|
2020-03-09 00:34:40 +00:00
|
|
|
WebProcess/GPU/media/RemoteLegacyCDM.cpp
|
|
|
|
WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp
|
|
|
|
WebProcess/GPU/media/RemoteLegacyCDMSession.cpp
|
2020-12-04 22:57:47 +00:00
|
|
|
WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp
|
2020-01-06 23:49:21 +00:00
|
|
|
WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
|
2020-01-06 05:47:49 +00:00
|
|
|
WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp @no-unify
|
2020-01-06 23:49:21 +00:00
|
|
|
WebProcess/GPU/media/RemoteMediaResourceProxy.cpp
|
2021-02-11 21:49:12 +00:00
|
|
|
WebProcess/GPU/media/RemoteRemoteCommandListener.cpp
|
2020-11-17 17:25:27 +00:00
|
|
|
WebProcess/GPU/media/SourceBufferPrivateRemote.cpp
|
2020-02-11 21:37:58 +00:00
|
|
|
WebProcess/GPU/media/TextTrackPrivateRemote.cpp
|
2020-01-14 08:16:00 +00:00
|
|
|
WebProcess/GPU/media/VideoTrackPrivateRemote.cpp
|
2020-02-27 03:51:17 +00:00
|
|
|
WebProcess/GPU/media/WebMediaStrategy.cpp
|
2019-12-31 10:00:48 +00:00
|
|
|
WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
|
2020-01-08 12:45:03 +00:00
|
|
|
WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp
|
|
|
|
WebProcess/GPU/webrtc/MediaRecorderProvider.cpp
|
2020-01-20 10:39:00 +00:00
|
|
|
WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp
|
|
|
|
WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp
|
Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343
Reviewed by Simon Fraser.
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
Source/WebCore:
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* en.lproj/Localizable.strings:
Add a string for the user-visible name of the GPU process.
Source/WebCore/PAL:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit:
Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.
In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.
For now, it is just a shell of a process; functionality will be added
in future patches!
* Configurations/FeatureDefines.xcconfig:
Add ENABLE(GPU_PROCESS).
* Configurations/GPUService.xcconfig: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
* Shared/AuxiliaryProcess.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Platform/ExtraPrivateSymbolsForTAPI.h:
* Shared/mac/AuxiliaryProcessMac.mm:
* Sources.txt:
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* Configurations/WebKit.xcconfig:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::getLaunchOptions):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.
* GPUProcess/GPUConnectionToWebProcess.cpp: Added.
* GPUProcess/GPUConnectionToWebProcess.h: Added.
* GPUProcess/GPUConnectionToWebProcess.messages.in: Added.
On the GPU process side, the incoming connection from the Web Content process.
* GPUProcess/GPUProcess.cpp: Added.
* GPUProcess/GPUProcess.h: Added.
* GPUProcess/GPUProcess.messages.in: Added.
* GPUProcess/GPUProcessCreationParameters.cpp: Added.
* GPUProcess/GPUProcessCreationParameters.h: Added.
* GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
* GPUProcess/ios/GPUProcessIOS.mm: Added.
* GPUProcess/mac/GPUProcessMac.mm: Added.
Add the shell of the GPU process. Mostly stolen from the Networking process.
* UIProcess/GPU/GPUProcessProxy.cpp: Added.
(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):
* UIProcess/GPU/GPUProcessProxy.h: Added.
* UIProcess/GPU/GPUProcessProxy.messages.in: Added.
On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.
* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.
This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::getGPUProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getGPUProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.
* WebProcess/GPU/GPUProcessConnection.cpp: Added.
(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):
* WebProcess/GPU/GPUProcessConnection.h: Added.
(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):
* WebProcess/GPU/GPUProcessConnection.messages.in: Added.
* WebProcess/GPU/GPUProcessConnectionInfo.h: Added.
(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.
* WebProcess/WebProcess.cpp:
(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.
Source/WebKitLegacy/mac:
* Configurations/FeatureDefines.xcconfig:
Tools:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Canonical link: https://commits.webkit.org/218060@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 09:58:21 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Network/NetworkProcessConnection.cpp
|
|
|
|
WebProcess/Network/WebLoaderStrategy.cpp
|
Web Inspector: Local Overrides - Provide substitution content for resource loads (URL based)
https://bugs.webkit.org/show_bug.cgi?id=201262
<rdar://problem/13108764>
Reviewed by Devin Rousso.
Source/JavaScriptCore:
When interception is enabled, Network requests that match any of the configured
interception patterns will be paused on the backend and allowed to be modified
by the frontend.
Currently the only time a network request can be intercepted is during the
HTTP response. However, this intercepting interface is mean to extend to
HTTP requests as well.
When a response is to be intercepted a new event is sent to the frontend:
`Network.responseIntercepted` event
With a `requestId` to identify that network request. The frontend
must respond with one of the following commands to continue:
`Network.interceptContinue` - proceed with the response unmodified
`Network.interceptWithResponse` - provide a response
The response is paused in the meantime.
* inspector/protocol/Network.json:
New interfaces for intercepting network responses and suppling override content.
* Scripts/generate-combined-inspector-json.py:
* inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification.load_specification):
Complete allowing comments in JSON protocol files.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCBackendDispatcherImplementationGenerator._generate_invocation_for_command):
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
Allow optional enums in ObjC interfaces.
Source/WebCore:
Tests: http/tests/inspector/network/local-resource-override-basic.html
http/tests/inspector/network/local-resource-override-main-resource.html
http/tests/inspector/network/local-resource-override-script-tag.html
http/tests/inspector/network/resource-response-inspector-override.html
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* Headers.cmake:
New files.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willInterceptRequestImpl):
(WebCore::InspectorInstrumentation::shouldInterceptResponseImpl):
(WebCore::InspectorInstrumentation::interceptResponseImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::hasFrontends):
(WebCore::InspectorInstrumentation::willInterceptRequest):
(WebCore::InspectorInstrumentation::shouldInterceptResponse):
(WebCore::InspectorInstrumentation::interceptResponse):
(WebCore::InspectorInstrumentation::frontendCreated):
(WebCore::InspectorInstrumentation::frontendDeleted):
* inspector/InspectorInstrumentationPublic.cpp:
* inspector/InspectorInstrumentationPublic.h:
* inspector/InspectorInstrumentationWebKit.cpp:
(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponseInternal):
(WebCore::InspectorInstrumentationWebKit::interceptResponseInternal):
* inspector/InspectorInstrumentationWebKit.h: Added.
(WebCore::InspectorInstrumentationWebKit::shouldInterceptResponse):
(WebCore::InspectorInstrumentationWebKit::interceptResponse):
Provide a slim InspectorInstrumentation API that can be used in the WebKit
layer without a ton of includes.
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::responseSource):
(WebCore::InspectorNetworkAgent::disable):
(WebCore::InspectorNetworkAgent::continuePendingResponses):
(WebCore::InspectorNetworkAgent::setInterceptionEnabled):
(WebCore::InspectorNetworkAgent::addInterception):
(WebCore::InspectorNetworkAgent::removeInterception):
(WebCore::InspectorNetworkAgent::willInterceptRequest):
(WebCore::InspectorNetworkAgent::shouldInterceptResponse):
(WebCore::InspectorNetworkAgent::interceptResponse):
(WebCore::InspectorNetworkAgent::interceptContinue):
(WebCore::InspectorNetworkAgent::interceptWithResponse):
Manage a list of URLs that will be intercepted and send
intercepts to an active frontend for response content.
* inspector/agents/InspectorNetworkAgent.h:
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::~PendingInterceptResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::originalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respondWithOriginalResponse):
(WebCore::InspectorNetworkAgent::PendingInterceptResponse::respond):
Callback for an eventual intercept response.
* platform/network/ResourceResponseBase.h:
New ResponseSource - Inspector Override.
* loader/DocumentLoader.cpp:
(WebCore::logResourceResponseSource):
* testing/Internals.cpp:
(WebCore::responseSourceToString):
Handle new response sources.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):
Avoid preloading or using the cache for URLs that would be intercepted
by an active Inspector frontend.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::remove):
Assertion to help detect if we ever get override content into the MemoryCache.
* loader/ResourceLoader.h:
(WebCore::DocumentLoader::responseReceived):
* loader/ResourceLoader.cpp:
Fix typos.
Source/WebInspectorUI:
This adds a new "Local Overrides" section to the Sources tab sidebar
which will allow users to provide their own resource content for text
resources. Users can clone a resource, and provide their own content
(by editing in Web Inspector) and new requests for those particular
URLs will get the substitute content.
Overrides are based on a particular URL (ignoring fragment). They
can override: status code, status text, response headers, content,
and MIME Type (Content-Type).
* Tools/CodeMirrorModes/index.html: Added.
* Tools/CodeMirrorModes/styles.css: Added.
Debug tool for CodeMirror editors and our custom CodeMirror modes.
* UserInterface/Main.html:
* UserInterface/Test.html:
* Localizations/en.lproj/localizedStrings.js:
New files and strings.
* UserInterface/Base/HTTPUtilities.js: Added.
(WI.httpStatusTextForStatusCode):
Translate between typical status codes and status text.
* UserInterface/Base/ObjectStore.js:
(WI.ObjectStore._open):
New persistent store for local resource overrides.
* UserInterface/Base/Main.js:
(WI.showLocalResourceOverride):
Convenience for showing an override file.
* UserInterface/Base/URLUtilities.js:
(parseURL):
Avoid uncaught exceptions with the URL constructor for common WebKit internal sourceURL strings.
(WI.urlWithoutFragment):
Strip a fragment from a URL.
* UserInterface/Controllers/HARBuilder.js:
(WI.HARBuilder.fetchType):
(WI.HARBuilder.responseSourceFromHARFetchType):
Handle new custom response types.
* UserInterface/Protocol/NetworkObserver.js:
(WI.NetworkObserver.prototype.responseIntercepted):
(WI.NetworkObserver):
New events.
* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager):
(WI.NetworkManager.supportsLocalResourceOverrides):
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.get localResourceOverrides):
(WI.NetworkManager.prototype.get interceptionEnabled):
(WI.NetworkManager.prototype.set interceptionEnabled):
(WI.NetworkManager.prototype.addLocalResourceOverride):
(WI.NetworkManager.prototype.removeLocalResourceOverride):
(WI.NetworkManager.prototype.localResourceOverrideForURL):
(WI.NetworkManager.prototype.canBeOverridden):
(WI.NetworkManager.prototype.responseIntercepted):
(WI.NetworkManager.prototype._handleResourceContentDidChange):
(WI.NetworkManager.prototype._persistLocalResourceOverrideSoonAfterContentChange):
(WI.NetworkManager.prototype._saveLocalResourceOverrides):
(WI.NetworkManager.prototype._extraDomainsActivated):
(WI.NetworkManager.prototype.localResourceForURL): Deleted.
Handle saving and restoring local resource overrides.
Handle responding to a `responseIntercepted` Network protocol event.
* UserInterface/Models/LocalResource.js:
(WI.LocalResource.fromJSON):
(WI.LocalResource.prototype.toJSON):
(WI.LocalResource.prototype.get localContent):
(WI.LocalResource.prototype.get localContentIsBase64Encoded):
(WI.LocalResource.prototype.isLocalResourceOverride):
(WI.LocalResource.prototype.updateOverrideContent):
Allow a LocalResource to identify itself as an "override".
* UserInterface/Models/LocalResourceOverride.js: Added.
(WI.LocalResourceOverride.prototype.create):
(WI.LocalResourceOverride.fromJSON):
(WI.LocalResourceOverride.prototype.toJSON):
(WI.LocalResourceOverride.prototype.get url):
(WI.LocalResourceOverride.prototype.get localResource):
(WI.LocalResourceOverride.prototype.get disabled):
(WI.LocalResourceOverride.prototype.set disabled):
(WI.LocalResourceOverride.prototype.saveIdentityToCookie):
(WI.LocalResourceOverride):
Model object for a LocalResourceOverride. This has LocalResource content
and an enabled/disabled state.
* UserInterface/Models/Resource.js:
(WI.Resource.classNamesForResource):
(WI.Resource.responseSourceFromPayload):
(WI.Resource.prototype.isLocalResourceOverride):
(WI.Resource.prototype.async.createLocalResourceOverride):
(WI.Resource.classNameForResource): Deleted.
Convenience functions and icon updates.
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.resolvedRepresentedObjectForRepresentedObject):
(WI.ContentView.isViewable):
Handle new represented object type.
* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype.willDismissPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissLocalOverridePopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissEventBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._willDismissURLBreakpointPopover):
(WI.SourcesNavigationSidebarPanel.prototype._addLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._removeLocalResourceOverride):
(WI.SourcesNavigationSidebarPanel.prototype._handleTreeSelectionDidChange):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideAdded):
(WI.SourcesNavigationSidebarPanel.prototype._handleLocalResourceOverrideRemoved):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
Hide and show Local Overrides section.
* UserInterface/Views/LocalResourceOverrideTreeElement.css:
(.item.resource.override .status > div):
* UserInterface/Views/LocalResourceOverrideTreeElement.js: Added.
(WI.LocalResourceOverrideTreeElement):
(WI.LocalResourceOverrideTreeElement.prototype.canSelectOnMouseDown):
(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
(WI.LocalResourceOverrideTreeElement.prototype.willDismissPopover):
TreeElement for a Local Resource Override.
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.css:
(.cm-s-default .cm-local-override-url-bad-scheme):
(.cm-s-default .cm-local-override-url-fragment):
* UserInterface/Views/CodeMirrorLocalOverrideURLMode.js: Added.
(tokenBase):
(return.startState):
(return.token):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
* UserInterface/Views/ContextMenu.js:
(WI.ContextMenu.prototype._itemSelected):
(WI.ContextMenu):
Better debugging for exceptions in context menu handlers.
* UserInterface/Views/ContextMenuUtilities.js:
(WI.appendContextMenuItemsForSourceCode):
(WI.appendContextMenuItemsForURL):
Context menu items for Local Resource Overrides.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.startEditingNode):
(WI.DataGrid.prototype._startEditingNodeAtColumnIndex):
(WI.DataGrid.prototype._startEditing):
(WI.DataGrid.prototype._contextMenuInDataTable):
* UserInterface/Views/DataGridNode.js:
(WI.DataGridNode):
(WI.DataGridNode.prototype.get editable):
(WI.DataGridNode.prototype.set editable):
Improve DataGrid editing functionality.
Allow a node to not be editable.
Allow adding a new node and starting to edit in one action.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
Do not provide overrides in the Debugger tab.
* UserInterface/Views/LocalResourceOverrideLabelView.css:
(.local-resource-override-label-view):
(.local-resource-override-label-view > div):
(.local-resource-override-label-view > div > .label):
(.local-resource-override-label-view > div > .url):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideLabelView.js:
(WI.LocalResourceOverrideLabelView):
(WI.LocalResourceOverrideLabelView.prototype.initialLayout):
* UserInterface/Views/LocalResourceOverridePopover.css: Added.
(.popover .local-resource-override-popover-content):
(.popover .local-resource-override-popover-content > label.toggle):
(.popover .local-resource-override-popover-content > table):
(.popover .local-resource-override-popover-content > table > tr > th):
(.popover .local-resource-override-popover-content > table > tr > td):
(.popover .local-resource-override-popover-content .editor):
(.popover .local-resource-override-popover-content .editor > .CodeMirror):
(.popover .local-resource-override-popover-content .editor.url):
(.popover .local-resource-override-popover-content .editor.mime):
(.popover .local-resource-override-popover-content .editor.status):
(.popover .local-resource-override-popover-content .editor.status-text):
(.popover .local-resource-override-popover-content .add-header):
(@media (prefers-color-scheme: dark)):
New banner view for a local resource override itself.
Shows the URL being overriden.
* UserInterface/Views/LocalResourceOverrideWarningView.css:
(.local-resource-override-warning-view):
(.local-resource-override-warning-view[hidden]):
(.local-resource-override-warning-view > div):
(.local-resource-override-warning-view > div > button):
(@media (prefers-color-scheme: dark)):
* UserInterface/Views/LocalResourceOverrideWarningView.js: Added.
(WI.LocalResourceOverrideWarningView):
(WI.LocalResourceOverrideWarningView.prototype.attached):
(WI.LocalResourceOverrideWarningView.prototype.detached):
(WI.LocalResourceOverrideWarningView.prototype._updateContent):
(WI.LocalResourceOverrideWarningView.prototype._handleLocalResourceOverrideChanged):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
New banner view for a resource that has been overridden.
Allows jumping to the override itself.
* UserInterface/Views/LocalResourceOverridePopover.js: Added.
(WI.LocalResourceOverridePopover):
(WI.LocalResourceOverridePopover.prototype.get serializedData):
(WI.LocalResourceOverridePopover.prototype.show.addDataGridNodeForHeader):
(WI.LocalResourceOverridePopover.prototype.show):
(WI.LocalResourceOverridePopover.prototype._createEditor):
(WI.LocalResourceOverridePopover.prototype._defaultURL):
(WI.LocalResourceOverridePopover.prototype._presentOverTargetElement):
New popover for creating or editing a Local Resource Override.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.performSearch):
Consider searching overrides.
* UserInterface/Views/Variables.css:
(:root):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search.changed > .banner):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
* UserInterface/Views/ConsoleMessageView.css:
(.console-warning-level):
Use a new variable for a common warning color.
* UserInterface/Images/NavigationItemNetworkOverride.svg: Added.
* UserInterface/Views/SourceCodeTextEditor.js:
(WI.SourceCodeTextEditor.prototype.canBeFormatted):
(WI.SourceCodeTextEditor.prototype.get _supportsDebugging):
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > .warning-banner):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides)):
(.sidebar > .panel.navigation.sources > .content > .local-overrides):
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted.
* UserInterface/Views/TextEditor.css:
(.text-editor):
* UserInterface/Views/TextResourceContentView.css:
(.content-view.resource.text):
(.content-view.resource.text > .text-editor):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
(WI.TextResourceContentView.prototype.get navigationItems):
(WI.TextResourceContentView.prototype.closed):
(WI.TextResourceContentView.prototype._contentWillPopulate):
(WI.TextResourceContentView.prototype._contentDidPopulate):
(WI.TextResourceContentView.prototype.async._handleCreateLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleRemoveLocalResourceOverride):
(WI.TextResourceContentView.prototype._handleLocalResourceOverrideChanged):
(WI.TextResourceContentView.prototype._textEditorContentDidChange):
(WI.TextResourceContentView.prototype._shouldBeEditable):
Allow Text resources to create a local resource override.
Support for Image resources will come separately.
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
Handle new response type.
* UserInterface/Controllers/CSSManager.js:
Avoid extra handling for Local Resource Overrides.
* UserInterface/Views/ResourceIcons.css:
(.resource-icon.override .icon):
* UserInterface/Views/ResourceSizesContentView.js:
(WI.ResourceSizesContentView.prototype.initialLayout):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WI.ResourceTimelineDataGridNode.prototype.iconClassNames):
* UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype._updateIcon):
(WI.ResourceTreeElement.prototype._responseReceived):
(WI.ResourceTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WI.TimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateNameCell):
(WI.NetworkTableContentView.prototype._populateTransferSizeCell):
(WI.NetworkTableContentView.prototype._generateSortComparator):
Better Resource icons all over for overrides.
* UserInterface/Views/URLBreakpointPopover.js:
(WI.URLBreakpointPopover.prototype._createEditor):
Code cleanup.
Source/WebKit:
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
New sources.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
On receiving a response, check with the inspector if an active
frontend will override the response content.
* WebProcess/Network/WebResourceInterceptController.h:
* WebProcess/Network/WebResourceInterceptController.cpp:
(WebKit::WebResourceInterceptController::isIntercepting const):
(WebKit::WebResourceInterceptController::beginInterceptingResponse):
(WebKit::WebResourceInterceptController::continueResponse):
(WebKit::WebResourceInterceptController::interceptedResponse):
(WebKit::WebResourceInterceptController::defer):
Buffer networking callbacks for an ongoing intercept.
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::havePerformedSecurityChecks const):
Handle new response source.
LayoutTests:
* http/tests/inspector/network/local-resource-override-basic-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-basic.html: Added.
* http/tests/inspector/network/local-resource-override-main-resource-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-main-resource.html: Added.
* http/tests/inspector/network/local-resource-override-script-tag-expected.txt: Added.
* http/tests/inspector/network/local-resource-override-script-tag.html: Added.
* http/tests/inspector/network/resource-response-inspector-override-expected.txt: Added.
* http/tests/inspector/network/resource-response-inspector-override.html: Added.
* http/tests/inspector/network/resources/override.js: Added.
* http/tests/inspector/network/resources/override.txt: Added.
* inspector/network/local-resource-override-continue-response-expected.txt: Added.
* inspector/network/local-resource-override-continue-response.html: Added.
Tests for overrides.
* inspector/unit-tests/url-utilities-expected.txt:
* inspector/unit-tests/url-utilities.html:
Test WI.urlWithoutFragment.
* platform/mac-wk1/TestExpectations:
WebKitLegacy does not support overrides.
Canonical link: https://commits.webkit.org/215111@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-04 23:35:03 +00:00
|
|
|
WebProcess/Network/WebResourceInterceptController.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Network/WebResourceLoader.cpp
|
2019-12-31 10:00:48 +00:00
|
|
|
WebProcess/Network/WebSocketChannel.cpp @no-unify
|
2019-06-13 01:04:16 +00:00
|
|
|
WebProcess/Network/WebSocketChannelManager.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Network/WebSocketProvider.cpp
|
|
|
|
WebProcess/Network/WebSocketStream.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2020-05-05 13:40:04 +00:00
|
|
|
WebProcess/Network/webrtc/LibWebRTCNetwork.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Network/webrtc/LibWebRTCProvider.cpp
|
|
|
|
WebProcess/Network/webrtc/LibWebRTCResolver.cpp
|
|
|
|
WebProcess/Network/webrtc/LibWebRTCSocket.cpp
|
|
|
|
WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp
|
2021-03-22 18:29:36 +00:00
|
|
|
WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Network/webrtc/WebMDNSRegister.cpp
|
|
|
|
WebProcess/Network/webrtc/WebRTCMonitor.cpp
|
|
|
|
WebProcess/Network/webrtc/WebRTCResolver.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Notifications/NotificationPermissionRequestManager.cpp
|
|
|
|
WebProcess/Notifications/WebNotificationManager.cpp
|
2018-08-18 01:31:15 +00:00
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: These files should be unified once GTK's PluginProcess2 is removed.
|
2018-08-18 01:31:15 +00:00
|
|
|
WebProcess/Plugins/Plugin.cpp @no-unify
|
|
|
|
WebProcess/Plugins/PluginProcessConnection.cpp @no-unify
|
|
|
|
WebProcess/Plugins/PluginProcessConnectionManager.cpp @no-unify
|
|
|
|
WebProcess/Plugins/PluginProxy.cpp @no-unify
|
|
|
|
WebProcess/Plugins/PluginView.cpp @no-unify
|
|
|
|
WebProcess/Plugins/WebPluginInfoProvider.cpp @no-unify
|
|
|
|
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
// TODO: These files should be unified once GTK's PluginProcess2 is removed.
|
2018-08-18 01:31:15 +00:00
|
|
|
WebProcess/Plugins/Netscape/JSNPMethod.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/JSNPObject.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/NPJSObject.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp @no-unify
|
[CMake] Sync unified build with Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=188732
Reviewed by Tim Horton.
Source/WebCore:
For iOS, disambiguate between ::WebEvent declared in PlatformKeyboardEvent.h and
WebCore::WebEvent declared in WebEvent.h. It's expected that we'll have to deal with random
issues like this when modifying unrelated source files in higher-level projects, since any
change to the sources list changes which files get bundled together, and headers from
lower-level projects that were not included before may now be included together.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::event const):
Source/WebKit:
Sync unified build with Cocoa ports. This enables unified build for WebKit/Platform and
WebKit/Shared.
Lots of files need to be moved around since the existing Sources.txt was not copied from
CMakeLists.txt. This replaces the Sources.txt with the sources list from CMakeList.txt.
Files that are not built for Cocoa are moved to SourcesGTK.txt, SourcesWPE.txt, and
PlatformWin.cmake. Files that are built only on Cocoa are moved to SourcesCocoa.txt. There's
plenty of room to determine if many of these files really need to be platform-specific in
the future, but let's not change that now.
Unfortunately, several files under Shared and PluginProcess need to be un-unified to be
usable for GTK's WebKitPluginProcess2. I've never managed to understand why, but it won't
link otherwise. Fortunately, this only affects a few files (listed in
PluginProcessGTK2_SOURCES), only a couple dozen of which are cross-platform.
* CMakeLists.txt:
* PlatformWin.cmake:
* Sources.txt:
* SourcesCocoa.txt:
* SourcesGTK.txt:
* SourcesWPE.txt:
Canonical link: https://commits.webkit.org/203816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-20 22:59:23 +00:00
|
|
|
WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/NetscapePlugin.cpp @no-unify
|
|
|
|
WebProcess/Plugins/Netscape/NetscapePluginStream.cpp @no-unify
|
2018-08-18 01:31:15 +00:00
|
|
|
|
2020-12-09 08:28:16 +00:00
|
|
|
WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp
|
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/Storage/WebSWClientConnection.cpp
|
|
|
|
WebProcess/Storage/WebSWContextManagerConnection.cpp
|
|
|
|
WebProcess/Storage/WebSWOriginTable.cpp
|
|
|
|
WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp
|
|
|
|
WebProcess/Storage/WebServiceWorkerProvider.cpp
|
|
|
|
|
|
|
|
WebProcess/UserContent/WebUserContentController.cpp
|
|
|
|
|
[WebAuthN] Support CTAP HID authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=188623
<rdar://problem/43353777>
Reviewed by Brent Fulgham and Chris Dumez.
Source/WebCore:
This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
Tests: http/wpt/webauthn/ctap-hid-failure.https.html
http/wpt/webauthn/ctap-hid-success.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
http/wpt/webauthn/public-key-credential-create-success-hid.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
http/wpt/webauthn/public-key-credential-get-success-hid.https.html
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
(WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
* Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
* Modules/webauthn/fido/DeviceResponseConverter.cpp:
(fido::readCTAPGetAssertionResponse):
* Modules/webauthn/fido/FidoConstants.h:
Source/WebKit:
This patch introduces a primitive support of CTAP HID authenticators for WebAuthN in macOS.
It involves low level HID device management&communication, high level CTAP HID authenticator
management&communication, and mock testing. The above three aspects will be covered in details:
1) Low level HID device management&communication: HidService&HidConnection
It relies on IOHIDManager to discover appropriate hid devices by passing a matching dictionary:
{ PrimaryUsagePage: 0xf1d0, PrimaryUsage: 0x01}. For communication, it utilizes HID reports.
To send a report, it calls IOHIDDeviceSetReport since the async version is not implemented.
To recieve a report, it calls IOHIDDeviceRegisterInputReportCallback to asynchronously wait
for incoming reports.
Here is the corresponding reference:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW2
2) High level CTAP HID authenticator management&communication: HidService&CtapHidDriver
Whenever an appropriate hid device is discovered by IOHIDManager, an AuthenticatorGetInfo command
is sent to the device to determine properties of the authenticator, says, which version of protocol
it supports, i.e. CTAP or U2F. So far, we only support CTAP authenticators. Once the authenticator
is determined to support CTAP, we then instantiate CtapHidAuthenticator which will then take care
of even higher level WebAuthN requests&responses.
Binaries are constructed and packaged according to the CTAP HID porotocol. CtapHidDriver takes care
of concurrency and channels, i.e. allocating channel and establishing the actual request/response
transaction. At the meantime, CtapHidDriver::Worker is then responsible for each single transaction.
Here is the corresponding reference:
https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#usb.
3) Mock Testing: MockHidService & MockHidConnection
A CTAP hid authenticator is simulated within MockHidConnection with options of specifying specific
error scenarios and of course could take care of successful cases. Four stages are presented in the
simulated authenticator to reflect: a) allocating channel for AuthenticatorGetInfo, b) sending
AuthenticatorGetInfo, c) allocating channel for actual request, and d) sending the actual request.
Besides implementing the above, it also does a few other things:
1) Make AuthenticatorManager::clearState asynchronous to avoid cyclic dependency:
Authenticator::returnResponse => AuthenticatorManager::respondReceived => AuthenticatorManager::clearState
=> Authenticator::~Authenticator.
2) Reorganize unified build sources to make it clear that which files are .mm and which are .cpp.
3) Import LocalAuthentication.framework in LocalAuthenticationSoftLink instead of being scattered.
* Sources.txt:
* SourcesCocoa.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManagerInternal::collectTransports):
(WebKit::AuthenticatorManager::clearStateAsync):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):
(WebKit::AuthenticatorTransportService::startDiscovery):
(WebKit::AuthenticatorTransportService::startDiscovery const): Deleted.
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
* UIProcess/WebAuthentication/Cocoa/HidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.h.
* UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Added.
(WebKit::reportReceived):
(WebKit::HidConnection::HidConnection):
(WebKit::HidConnection::~HidConnection):
(WebKit::HidConnection::initialize):
(WebKit::HidConnection::terminate):
(WebKit::HidConnection::send):
(WebKit::HidConnection::registerDataReceivedCallback):
(WebKit::HidConnection::unregisterDataReceivedCallback):
(WebKit::HidConnection::receiveReport):
(WebKit::HidConnection::consumeReports):
(WebKit::HidConnection::registerDataReceivedCallbackInternal):
* UIProcess/WebAuthentication/Cocoa/HidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/Cocoa/HidService.mm: Added.
(WebKit::deviceAddedCallback):
(WebKit::deviceRemovedCallback):
(WebKit::HidService::HidService):
(WebKit::HidService::~HidService):
(WebKit::HidService::startDiscoveryInternal):
(WebKit::HidService::platformStartDiscovery):
(WebKit::HidService::createHidConnection const):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
* UIProcess/WebAuthentication/Cocoa/LocalService.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::startDiscoveryInternal):
(WebKit::LocalService::startDiscoveryInternal const): Deleted.
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: Added.
(WebKit::MockHidConnection::MockHidConnection):
(WebKit::MockHidConnection::initialize):
(WebKit::MockHidConnection::terminate):
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::assembleRequest):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::stagesMatch const):
(WebKit::MockHidConnection::shouldContinueFeedReports):
(WebKit::MockHidConnection::continueFeedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockHidService.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockHidService::MockHidService):
(WebKit::MockHidService::platformStartDiscovery):
(WebKit::MockHidService::createHidConnection const):
* UIProcess/WebAuthentication/Mock/MockHidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
* UIProcess/WebAuthentication/Mock/MockLocalService.mm: Renamed from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockLocalService::MockLocalService):
(WebKit::MockLocalService::platformStartDiscovery const):
(WebKit::MockLocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: Added.
(WebKit::CtapHidAuthenticator::CtapHidAuthenticator):
(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapHidAuthenticator::getAssertion):
(WebKit::CtapHidAuthenticator::continueGetAssertionAfterResponseReceived const):
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: Added.
(WebKit::CtapHidDriver::Worker::Worker):
(WebKit::CtapHidDriver::Worker::~Worker):
(WebKit::CtapHidDriver::Worker::transact):
(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::CtapHidDriver):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):
(WebKit::CtapHidDriver::returnResponse):
* UIProcess/WebAuthentication/fido/CtapHidDriver.h: Added.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebKit.xcodeproj/project.pbxproj:
Tools:
This patch adds support for the mock testing and entitlements to allow minibrowser to talk
to hid devices.
* MiniBrowser/MiniBrowser.entitlements:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
LayoutTests:
* http/wpt/webauthn/ctap-hid-failure.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-failure.https.html: Added.
* http/wpt/webauthn/ctap-hid-success.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-success.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html: Added.
* http/wpt/webauthn/resources/util.js:
* platform/ios-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/206370@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-14 06:54:32 +00:00
|
|
|
WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp
|
2020-10-16 19:38:48 +00:00
|
|
|
WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp
|
[WebAuthN] Support CTAP HID authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=188623
<rdar://problem/43353777>
Reviewed by Brent Fulgham and Chris Dumez.
Source/WebCore:
This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
Tests: http/wpt/webauthn/ctap-hid-failure.https.html
http/wpt/webauthn/ctap-hid-success.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
http/wpt/webauthn/public-key-credential-create-success-hid.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
http/wpt/webauthn/public-key-credential-get-success-hid.https.html
* Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
(WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
* Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
* Modules/webauthn/fido/DeviceResponseConverter.cpp:
(fido::readCTAPGetAssertionResponse):
* Modules/webauthn/fido/FidoConstants.h:
Source/WebKit:
This patch introduces a primitive support of CTAP HID authenticators for WebAuthN in macOS.
It involves low level HID device management&communication, high level CTAP HID authenticator
management&communication, and mock testing. The above three aspects will be covered in details:
1) Low level HID device management&communication: HidService&HidConnection
It relies on IOHIDManager to discover appropriate hid devices by passing a matching dictionary:
{ PrimaryUsagePage: 0xf1d0, PrimaryUsage: 0x01}. For communication, it utilizes HID reports.
To send a report, it calls IOHIDDeviceSetReport since the async version is not implemented.
To recieve a report, it calls IOHIDDeviceRegisterInputReportCallback to asynchronously wait
for incoming reports.
Here is the corresponding reference:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/HID/new_api_10_5/tn2187.html#//apple_ref/doc/uid/TP40000970-CH214-SW2
2) High level CTAP HID authenticator management&communication: HidService&CtapHidDriver
Whenever an appropriate hid device is discovered by IOHIDManager, an AuthenticatorGetInfo command
is sent to the device to determine properties of the authenticator, says, which version of protocol
it supports, i.e. CTAP or U2F. So far, we only support CTAP authenticators. Once the authenticator
is determined to support CTAP, we then instantiate CtapHidAuthenticator which will then take care
of even higher level WebAuthN requests&responses.
Binaries are constructed and packaged according to the CTAP HID porotocol. CtapHidDriver takes care
of concurrency and channels, i.e. allocating channel and establishing the actual request/response
transaction. At the meantime, CtapHidDriver::Worker is then responsible for each single transaction.
Here is the corresponding reference:
https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#usb.
3) Mock Testing: MockHidService & MockHidConnection
A CTAP hid authenticator is simulated within MockHidConnection with options of specifying specific
error scenarios and of course could take care of successful cases. Four stages are presented in the
simulated authenticator to reflect: a) allocating channel for AuthenticatorGetInfo, b) sending
AuthenticatorGetInfo, c) allocating channel for actual request, and d) sending the actual request.
Besides implementing the above, it also does a few other things:
1) Make AuthenticatorManager::clearState asynchronous to avoid cyclic dependency:
Authenticator::returnResponse => AuthenticatorManager::respondReceived => AuthenticatorManager::clearState
=> Authenticator::~Authenticator.
2) Reorganize unified build sources to make it clear that which files are .mm and which are .cpp.
3) Import LocalAuthentication.framework in LocalAuthenticationSoftLink instead of being scattered.
* Sources.txt:
* SourcesCocoa.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManagerInternal::collectTransports):
(WebKit::AuthenticatorManager::clearStateAsync):
(WebKit::AuthenticatorManager::respondReceived):
(WebKit::AuthenticatorManager::initTimeOutTimer):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/AuthenticatorTransportService.cpp:
(WebKit::AuthenticatorTransportService::create):
(WebKit::AuthenticatorTransportService::createMock):
(WebKit::AuthenticatorTransportService::startDiscovery):
(WebKit::AuthenticatorTransportService::startDiscovery const): Deleted.
* UIProcess/WebAuthentication/AuthenticatorTransportService.h:
* UIProcess/WebAuthentication/Cocoa/HidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/AuthenticatorTransportService.h.
* UIProcess/WebAuthentication/Cocoa/HidConnection.mm: Added.
(WebKit::reportReceived):
(WebKit::HidConnection::HidConnection):
(WebKit::HidConnection::~HidConnection):
(WebKit::HidConnection::initialize):
(WebKit::HidConnection::terminate):
(WebKit::HidConnection::send):
(WebKit::HidConnection::registerDataReceivedCallback):
(WebKit::HidConnection::unregisterDataReceivedCallback):
(WebKit::HidConnection::receiveReport):
(WebKit::HidConnection::consumeReports):
(WebKit::HidConnection::registerDataReceivedCallbackInternal):
* UIProcess/WebAuthentication/Cocoa/HidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/Cocoa/HidService.mm: Added.
(WebKit::deviceAddedCallback):
(WebKit::deviceRemovedCallback):
(WebKit::HidService::HidService):
(WebKit::HidService::~HidService):
(WebKit::HidService::startDiscoveryInternal):
(WebKit::HidService::platformStartDiscovery):
(WebKit::HidService::createHidConnection const):
(WebKit::HidService::deviceAdded):
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticationSoftLink.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
* UIProcess/WebAuthentication/Cocoa/LocalService.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::startDiscoveryInternal):
(WebKit::LocalService::startDiscoveryInternal const): Deleted.
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:
(WebKit::MockAuthenticatorManager::respondReceivedInternal):
* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: Added.
(WebKit::MockHidConnection::MockHidConnection):
(WebKit::MockHidConnection::initialize):
(WebKit::MockHidConnection::terminate):
(WebKit::MockHidConnection::send):
(WebKit::MockHidConnection::registerDataReceivedCallbackInternal):
(WebKit::MockHidConnection::assembleRequest):
(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):
(WebKit::MockHidConnection::stagesMatch const):
(WebKit::MockHidConnection::shouldContinueFeedReports):
(WebKit::MockHidConnection::continueFeedReports):
* UIProcess/WebAuthentication/Mock/MockHidConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockHidService.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockHidService::MockHidService):
(WebKit::MockHidService::platformStartDiscovery):
(WebKit::MockHidService::createHidConnection const):
* UIProcess/WebAuthentication/Mock/MockHidService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h.
* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
* UIProcess/WebAuthentication/Mock/MockLocalService.mm: Renamed from Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.cpp.
(WebKit::MockLocalService::MockLocalService):
(WebKit::MockLocalService::platformStartDiscovery const):
(WebKit::MockLocalService::createLocalConnection const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp: Added.
(WebKit::CtapHidAuthenticator::CtapHidAuthenticator):
(WebKit::CtapHidAuthenticator::makeCredential):
(WebKit::CtapHidAuthenticator::continueMakeCredentialAfterResponseReceived const):
(WebKit::CtapHidAuthenticator::getAssertion):
(WebKit::CtapHidAuthenticator::continueGetAssertionAfterResponseReceived const):
* UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.h.
* UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: Added.
(WebKit::CtapHidDriver::Worker::Worker):
(WebKit::CtapHidDriver::Worker::~Worker):
(WebKit::CtapHidDriver::Worker::transact):
(WebKit::CtapHidDriver::Worker::write):
(WebKit::CtapHidDriver::Worker::read):
(WebKit::CtapHidDriver::Worker::returnMessage):
(WebKit::CtapHidDriver::CtapHidDriver):
(WebKit::CtapHidDriver::transact):
(WebKit::CtapHidDriver::continueAfterChannelAllocated):
(WebKit::CtapHidDriver::continueAfterResponseReceived):
(WebKit::CtapHidDriver::returnResponse):
* UIProcess/WebAuthentication/fido/CtapHidDriver.h: Added.
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebKit.xcodeproj/project.pbxproj:
Tools:
This patch adds support for the mock testing and entitlements to allow minibrowser to talk
to hid devices.
* MiniBrowser/MiniBrowser.entitlements:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
LayoutTests:
* http/wpt/webauthn/ctap-hid-failure.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-failure.https.html: Added.
* http/wpt/webauthn/ctap-hid-success.https-expected.txt: Added.
* http/wpt/webauthn/ctap-hid-success.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-failure-hid.https.html: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-get-success-hid.https.html: Added.
* http/wpt/webauthn/resources/util.js:
* platform/ios-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/206370@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-14 06:54:32 +00:00
|
|
|
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebCoreSupport/SessionStateConversion.cpp
|
2021-02-15 23:03:03 +00:00
|
|
|
WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp
|
2021-07-16 00:36:39 +00:00
|
|
|
WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebCoreSupport/WebChromeClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebColorChooser.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebContextMenuClient.cpp
|
2019-07-31 08:02:09 +00:00
|
|
|
WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp
|
[macOS] Show picker for date and datetime-local input types
https://bugs.webkit.org/show_bug.cgi?id=214946
Reviewed by Darin Adler and Wenson Hsieh.
Source/WebCore:
Date and datetime-local input types require a calendar picker to be presented when activated.
Consequently, BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent was modified to
create a DateTimeChooser and display a calendar upon activation. This object is destroyed
when the element is blurred, hiding the calendar.
There is currently no picker UI for month, week, and time input types. As a result,
handleDOMActivateEvent is a no-op on those input types.
Wrote an encoder and decoder for DateTimeChooserParameters, so that the picker can be
created with the correct values.
Tests: fast/forms/date/date-show-hide-picker.html
fast/forms/datetimelocal/datetimelocal-show-hide-picker.html
* WebCore.xcodeproj/project.pbxproj:
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
(WebCore::BaseChooserOnlyDateAndTimeInputType::elementDidBlur):
(WebCore::BaseChooserOnlyDateAndTimeInputType::isPresentingAttachedView const):
(WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/HTMLInputElement.cpp:
* html/MonthInputType.cpp:
(WebCore::MonthInputType::handleDOMActivateEvent):
* html/MonthInputType.h:
* html/TimeInputType.cpp:
(WebCore::TimeInputType::handleDOMActivateEvent):
* html/TimeInputType.h:
* html/WeekInputType.cpp:
(WebCore::WeekInputType::handleDOMActivateEvent):
* html/WeekInputType.h:
* loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::createDateTimeChooser):
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::createDateTimeChooser):
* page/Chrome.h:
* page/ChromeClient.h:
* platform/DateTimeChooser.h:
* platform/DateTimeChooserClient.h:
* platform/DateTimeChooserParameters.h: Added.
(WebCore::DateTimeChooserParameters::encode const):
(WebCore::DateTimeChooserParameters::decode):
Source/WebKit:
Created WKDateTimePicker as a wrapper around NSDatePicker. The picker is
displayed in its own NSWindow, ensuring the view is always above the page.
WebPageProxy and WKDateTimePicker communicate through WebDateTimePickerMac,
in order for the picker to be initialized with the correct initial, minimum,
and maximum date, and so that the chosen date can be sent back to the
WebProcess.
Added IPC messages to enable communication between the UIProcess and the
WebProcess necessary for showing and hiding the picker.
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/PageClient.h:
* UIProcess/WebDateTimePicker.cpp: Added.
(WebKit::WebDateTimePicker::WebDateTimePicker):
(WebKit::WebDateTimePicker::~WebDateTimePicker):
(WebKit::WebDateTimePicker::endPicker):
* UIProcess/WebDateTimePicker.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showDateTimePicker):
(WebKit::WebPageProxy::endDateTimePicker):
(WebKit::WebPageProxy::didChooseDate):
(WebKit::WebPageProxy::didEndDateTimePicker):
(WebKit::WebPageProxy::closeOverlayedViews):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createDateTimePicker):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::createDateTimePicker):
* UIProcess/mac/WebDateTimePickerMac.h: Added.
* UIProcess/mac/WebDateTimePickerMac.mm: Added.
(WebKit::WebDateTimePickerMac::create):
(WebKit::WebDateTimePickerMac::~WebDateTimePickerMac):
(WebKit::WebDateTimePickerMac::WebDateTimePickerMac):
(WebKit::WebDateTimePickerMac::endPicker):
(WebKit::WebDateTimePickerMac::showDateTimePicker):
(WebKit::WebDateTimePickerMac::didChooseDate):
(-[WKDateTimePickerWindow initWithContentRect:styleMask:backing:defer:]):
(-[WKDateTimePickerWindow canBecomeKeyWindow]):
(-[WKDateTimePickerWindow hasKeyAppearance]):
(-[WKDateTimePickerWindow shadowOptions]):
(-[WKDateTimePicker initWithParams:inView:]):
(-[WKDateTimePicker showPicker:]):
(-[WKDateTimePicker invalidate]):
(-[WKDateTimePicker didChooseDate:]):
(-[WKDateTimePicker dateFormatStringForType:]):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDateTimeChooser):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebDateTimeChooser.cpp: Added.
(WebKit::WebDateTimeChooser::WebDateTimeChooser):
(WebKit::WebDateTimeChooser::didChooseDate):
(WebKit::WebDateTimeChooser::didEndChooser):
(WebKit::WebDateTimeChooser::endChooser):
(WebKit::WebDateTimeChooser::showChooser):
* WebProcess/WebCoreSupport/WebDateTimeChooser.h: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setActiveDateTimeChooser):
(WebKit::WebPage::didChooseDate):
(WebKit::WebPage::didEndDateTimePicker):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Source/WebKitLegacy/mac:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::createDateTimeChooser):
Tools:
Added isShowingDateTimePicker testing hook in order to enable testing of the visibility of
the picker.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::isShowingDateTimePicker const):
* WebKitTestRunner/mac/UIScriptControllerMac.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::isShowingDateTimePicker const):
LayoutTests:
Added tests to verify that the picker is correctly shown and hidden for date and
datetime-local input types.
* fast/forms/date/date-show-hide-picker-expected.txt: Added.
* fast/forms/date/date-show-hide-picker.html: Added.
* fast/forms/datetimelocal/datetimelocal-show-hide-picker-expected.txt: Added.
* fast/forms/datetimelocal/datetimelocal-show-hide-picker.html: Added.
* platform/ios/TestExpectations:
* resources/ui-helper.js:
(window.UIHelper.isShowingDateTimePicker):
Canonical link: https://commits.webkit.org/228540@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-24 16:25:10 +00:00
|
|
|
WebProcess/WebCoreSupport/WebDateTimeChooser.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebDragClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebEditorClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebGeolocationClient.cpp
|
2021-02-09 12:46:22 +00:00
|
|
|
WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebNotificationClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebPopupMenu.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp
|
2019-09-07 01:53:20 +00:00
|
|
|
WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
|
|
|
|
WebProcess/WebCoreSupport/WebUserMediaClient.cpp
|
2020-11-04 01:44:02 +00:00
|
|
|
WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp
|
2019-03-15 18:18:36 +00:00
|
|
|
WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
|
|
|
|
WebProcess/WebPage/DrawingArea.cpp
|
|
|
|
WebProcess/WebPage/EventDispatcher.cpp
|
|
|
|
WebProcess/WebPage/FindController.cpp
|
Make it possible to send an arbitrary IPC message from JavaScript
https://bugs.webkit.org/show_bug.cgi?id=217423
<rdar://problem/69969351>
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Added a helper function to get uint64_t out of BigInt.
* runtime/JSBigInt.cpp:
(JSC::JSBigInt::toUint64Heap): Added.
* runtime/JSBigInt.h:
(JSC::JSBigInt::toUint64): Added.
Source/WebKit:
This patch introduces the JavaScript API (window.IPC) to send IPC out of WebContent process.
The feature is compiled in under ASAN and Debug builds and can be enabled at runtime.
window.IPC has two methods: sendMessage and sendSyncMessage which sends an async and sync IPC respectively.
It takes the destination process name (UI, GPU, or Networking), the destination ID (e.g. WebPageProxy ID),
message ID, timeout for sendSyncMessage, and optionally IPC message arguments. The message arguments can be
passed in as a TypedArray or ArrayBuffer, or a JavaScript array that recursively describes encoded objects.
Each object can be either a TypedArray or ArrayBuffer, which will be treated as encoded message, an array
which will be encoded as a Vector with each item within the array encoded recursively, or a dictionary which
describes a specific type.
When a specific type is described via a dictionary, "value" is encoed based on "type" as follows:
- When "type" is "String", "value" is encoded as a WTF::String, treating null or undefined as a null string.
- When "type" is "bool", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t",
or "uint64_t", "value" (which can be BigInt or a number) is encoded as the respective C++ type.
- When "type" is "RGBA", "value" is used as PackedColor::RGBA to construct WebCore::Color to be encoded.
- When "type" is "IntRect" or "FloatRect", "x", "y", "width", and "height" are treated as respective values
of IntRect or FloatRect C++ objects, and the constructed *Rect is encoded.
- When "type" is "FrameInfoData", the context object's WebFrame's FrameInfoData is encoded.
The list of IPC messages are exposed on window.IPC.messages, and VisitedLinkStore ID, WebPageProxy ID,
and frame identifiers are also exposed as static variables on window.IPC.
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): Inject the API if enabled.
* WebProcess/WebPage/IPCTestingAPI.cpp: Added.
(WebKit::IPCTestingAPI::JSIPC::create): Added.
(WebKit::IPCTestingAPI::JSIPC::webFrame): Added.
(WebKit::IPCTestingAPI::JSIPC::JSIPC): Added.
(WebKit::IPCTestingAPI::JSIPC::wrapperClass): Added.
(WebKit::IPCTestingAPI::JSIPC::unwrap): Added.
(WebKit::IPCTestingAPI::JSIPC::toWrapped): Added.
(WebKit::IPCTestingAPI::JSIPC::initialize): Added.
(WebKit::IPCTestingAPI::JSIPC::finalize): Added.
(WebKit::IPCTestingAPI::JSIPC::staticFunctions): Added.
(WebKit::IPCTestingAPI::JSIPC::staticValues): Added.
(WebKit::IPCTestingAPI::convertToUint64): Added.
(WebKit::IPCTestingAPI::processTargetFromArgument): Added.
(WebKit::IPCTestingAPI::destinationIDFromArgument): Added.
(WebKit::IPCTestingAPI::messageIDFromArgument): Added.
(WebKit::IPCTestingAPI::encodeTypedArray): Added.
(WebKit::IPCTestingAPI::createTypeError): Added.
(WebKit::IPCTestingAPI::encodeRectType): Added.
(WebKit::IPCTestingAPI::encodeIntegralType): Added.
(WebKit::IPCTestingAPI::VectorEncodeHelper::encode const): Added.
(WebKit::IPCTestingAPI::encodeArgument): Added.
(WebKit::IPCTestingAPI::JSIPC::sendMessage): Added.
(WebKit::IPCTestingAPI::JSIPC::sendSyncMessage): Added.
(WebKit::IPCTestingAPI::JSIPC::visitedLinkStoreID): Added.
(WebKit::IPCTestingAPI::JSIPC::webPageProxyID): Added.
(WebKit::IPCTestingAPI::JSIPC::frameIdentifier): Added.
(WebKit::IPCTestingAPI::JSIPC::retrieveID): Added.
(WebKit::IPCTestingAPI::JSIPC::messages): Added.
(WebKit::IPCTestingAPI::inject):
* WebProcess/WebPage/IPCTestingAPI.h: Added.
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::ipcTestingAPIEnabled const):
(WebKit::WebPage::webPageProxyID const):
(WebKit::WebPage::visitedLinkTableID const):
Source/WTF:
Added a compile time flag (ENABLE_IPC_TESTING_API) and a runtime flag (IPCTestingAPIEnabled)
for the JavaScript API to test IPC.
* Scripts/GeneratePreferences.rb:
(Preference::nameLower): Keep IPC uppercase.
* Scripts/Preferences/WebPreferencesInternal.yaml: Added IPCTestingAPIEnabled.
* wtf/PlatformEnable.h: Added ENABLE_IPC_TESTING_API.
Tools:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Added.
(-[IPCTestingAPIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
Canonical link: https://commits.webkit.org/230272@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 00:48:35 +00:00
|
|
|
WebProcess/WebPage/IPCTestingAPI.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebPage/PageBanner.cpp
|
|
|
|
WebProcess/WebPage/VisitedLinkTableController.cpp
|
|
|
|
WebProcess/WebPage/WebBackForwardListProxy.cpp
|
|
|
|
WebProcess/WebPage/WebContextMenu.cpp
|
2020-02-18 06:32:42 +00:00
|
|
|
WebProcess/WebPage/WebCookieCache.cpp
|
2019-01-15 23:31:33 +00:00
|
|
|
WebProcess/WebPage/WebCookieJar.cpp
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebPage/WebDocumentLoader.cpp
|
|
|
|
WebProcess/WebPage/WebFrame.cpp
|
|
|
|
WebProcess/WebPage/WebOpenPanelResultListener.cpp
|
2018-08-22 22:51:22 +00:00
|
|
|
WebProcess/WebPage/WebPage.cpp @no-unify
|
2018-08-22 22:44:49 +00:00
|
|
|
WebProcess/WebPage/WebPageGroupProxy.cpp
|
|
|
|
WebProcess/WebPage/WebPageOverlay.cpp
|
|
|
|
WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp
|
|
|
|
WebProcess/WebPage/WebURLSchemeTaskProxy.cpp
|
|
|
|
WebProcess/WebPage/WebUndoStep.cpp
|
|
|
|
|
|
|
|
WebProcess/WebStorage/StorageAreaImpl.cpp
|
|
|
|
WebProcess/WebStorage/StorageAreaMap.cpp
|
|
|
|
WebProcess/WebStorage/StorageNamespaceImpl.cpp
|
|
|
|
WebProcess/WebStorage/WebStorageNamespaceProvider.cpp
|
2020-12-09 18:32:29 +00:00
|
|
|
|
2021-07-12 09:30:56 +00:00
|
|
|
WebProcess/XR/PlatformXRSystemProxy.cpp
|
|
|
|
|
2021-07-16 00:36:39 +00:00
|
|
|
NetworkBroadcastChannelRegistryMessageReceiver.cpp
|
2021-03-22 18:29:36 +00:00
|
|
|
RTCDataChannelRemoteManagerMessageReceiver.cpp
|
|
|
|
RTCDataChannelRemoteManagerProxyMessageReceiver.cpp
|
2021-05-21 09:53:36 +00:00
|
|
|
RemoteAudioMediaStreamTrackRendererInternalUnitManagerMessageReceiver.cpp
|
2020-12-09 18:32:29 +00:00
|
|
|
RemoteGraphicsContextGLMessageReceiver.cpp
|
|
|
|
RemoteGraphicsContextGLProxyMessageReceiver.cpp
|
2021-07-12 09:30:56 +00:00
|
|
|
PlatformXRSystemMessageReceiver.cpp
|
|
|
|
PlatformXRSystemProxyMessageReceiver.cpp
|
2021-07-16 00:36:39 +00:00
|
|
|
WebBroadcastChannelRegistryMessageReceiver.cpp
|