haikuwebkit/Source/WebKit/Sources.txt

742 lines
30 KiB
Plaintext
Raw Permalink Normal View History

Support in-band VTT captions when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=207467 <rdar://problem/59312749> Reviewed by Jer Noble. Source/WebCore: No new tests, existing tests enabled in GPU process. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::nextAudioNodeLogIdentifier): (WebCore::AudioContext::nextAudioParameterLogIdentifier): * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::willRemove): (WebCore::AudioTrack::setMediaElement): (WebCore::AudioTrack::setLogger): * html/track/AudioTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parseWebVTTCueData): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::toPrivate): (WebCore::InbandTextTrack::updateKindFromPrivate): (WebCore::InbandTextTrack::setLogger): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): * html/track/InbandWebVTTTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::setKind): (WebCore::TextTrack::setMode): (WebCore::TextTrack::removeAllCues): (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (WTF::LogArgument<WebCore::TextTrack::Kind>::toString): (WTF::LogArgument<WebCore::TextTrack::Mode>::toString): * html/track/TrackBase.cpp: (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::setLogger): (WebCore::nextLogIdentifier): Deleted. * html/track/TrackBase.h: * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setMediaElement): (WebCore::VideoTrack::setLogger): * html/track/VideoTrack.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::kind const): (WebCore::InbandTextTrackPrivate::cueFormat const): (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/MediaPlayerEnums.h: * platform/graphics/TrackPrivateBase.cpp: (WebCore::TrackPrivateBase::setLogger): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: (WebCore::InbandTextTrackPrivateAVFObjC::kind const): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF): * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::ISOWebVTTCue): * platform/graphics/iso/ISOVTTCue.h: * platform/mock/mediasource/MockTracks.h: (WebCore::MockTextTrackPrivate::MockTextTrackPrivate): Source/WebKit: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/media/RemoteAudioTrackProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack): (WebKit::RemoteMediaPlayerProxy::textTrackRepresentationBoundsChanged): (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: Added. (WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy): (WebKit::RemoteTextTrackProxy::configuration): (WebKit::RemoteTextTrackProxy::configurationChanged): (WebKit::RemoteTextTrackProxy::willRemove): (WebKit::RemoteTextTrackProxy::idChanged): (WebKit::RemoteTextTrackProxy::labelChanged): (WebKit::RemoteTextTrackProxy::languageChanged): (WebKit::RemoteTextTrackProxy::addDataCue): (WebKit::RemoteTextTrackProxy::updateDataCue): (WebKit::RemoteTextTrackProxy::removeDataCue): (WebKit::RemoteTextTrackProxy::addGenericCue): (WebKit::RemoteTextTrackProxy::updateGenericCue): (WebKit::RemoteTextTrackProxy::removeGenericCue): (WebKit::RemoteTextTrackProxy::parseWebVTTFileHeader): (WebKit::RemoteTextTrackProxy::parseWebVTTCueData): * GPUProcess/media/RemoteTextTrackProxy.h: Copied from Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h. * GPUProcess/media/RemoteVideoTrackProxy.h: * GPUProcess/media/TextTrackPrivateRemoteConfiguration.h: Added. (WebKit::TextTrackPrivateRemoteConfiguration::encode const): (WebKit::TextTrackPrivateRemoteConfiguration::decode): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: (WebKit::RemoteSampleBufferDisplayLayerManager::createLayer): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::remoteTextTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::parseWebVTTFileHeader): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueData): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Added. (WebKit::TextTrackPrivateRemote::TextTrackPrivateRemote): (WebKit::TextTrackPrivateRemote::setMode): (WebKit::TextTrackPrivateRemote::updateConfiguration): (WebKit::TextTrackPrivateRemote::addDataCue): (WebKit::TextTrackPrivateRemote::updateDataCue): (WebKit::TextTrackPrivateRemote::removeDataCue): (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): (WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader): (WebKit::TextTrackPrivateRemote::parseWebVTTCueData): (WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/TextTrackPrivateRemote.h: Added. * WebProcess/GPU/media/TextTrackPrivateRemote.messages.in: Added. Source/WTF: * wtf/LoggerHelper.h: (WTF::LoggerHelper::childLogIdentifier const): LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/220550@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-11 21:37:58 +00:00
// Copyright (C) 2018-2020 Apple Inc. All rights reserved.
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[GPU Process] Exchange RemoteImageBuffer and RemoteImageBufferProxy https://bugs.webkit.org/show_bug.cgi?id=217809 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-10-16 Reviewed by Simon Fraser. The names of the GPU rendering classes have been confusing. RemoteImageBuffer should be the real object in the GPU Process because it owns the backend. And RemoteImageBufferProxy should be a proxy to this object in the Web Process. So we are going to exchange the following classes: -- RemoteImageBuffer <-> RemoteImageBufferProxy -- RemoteRenderingBackend <-> RemoteRenderingBackendProxy -- RemoteImageBufferMessageHandler <-> RemoteImageBufferMessageHandlerProxy * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createRenderingBackend): (WebKit::GPUConnectionToWebProcess::releaseRenderingBackend): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/graphics/PlatformRemoteImageBuffer.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/PlatformRemoteImageBuffer.h. * GPUProcess/graphics/RemoteImageBuffer.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferProxy.h. (WebKit::RemoteImageBuffer::create): (WebKit::RemoteImageBuffer::RemoteImageBuffer): (WebKit::RemoteImageBuffer::~RemoteImageBuffer): (WebKit::RemoteImageBuffer::apply): * GPUProcess/graphics/RemoteImageBufferMessageHandler.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.cpp. (WebKit::RemoteImageBufferMessageHandler::RemoteImageBufferMessageHandler): (WebKit::RemoteImageBufferMessageHandler::createBackend): (WebKit::RemoteImageBufferMessageHandler::commitFlushContext): * GPUProcess/graphics/RemoteImageBufferMessageHandler.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h. (WebKit::RemoteImageBufferMessageHandler::backend): * GPUProcess/graphics/RemoteRenderingBackend.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.cpp. (WebKit::RemoteRenderingBackend::create): (WebKit::RemoteRenderingBackend::RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::~RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::messageSenderConnection const): (WebKit::RemoteRenderingBackend::messageSenderDestinationID const): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::releaseRemoteResource): (WebKit::RemoteRenderingBackend::getImageData): (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContext): (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContextAndCommit): (WebKit::RemoteRenderingBackend::gpuConnectionToWebProcess const): * GPUProcess/graphics/RemoteRenderingBackend.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.h. (WebKit::RemoteRenderingBackend::renderingBackendIdentifier const): * GPUProcess/graphics/RemoteRenderingBackend.messages.in: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in. * GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/PlatformRemoteImageBufferProxy.h: Renamed from Source/WebKit/GPUProcess/graphics/PlatformRemoteImageBufferProxy.h. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.cpp: Removed. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp: Added. (WebKit::RemoteImageBufferMessageHandlerProxy::RemoteImageBufferMessageHandlerProxy): (WebKit::RemoteImageBufferMessageHandlerProxy::~RemoteImageBufferMessageHandlerProxy): (WebKit::RemoteImageBufferMessageHandlerProxy::getImageData const): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCreateImageBufferBackend): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCommitImageBufferFlushContext): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContext): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContextAndWaitCommit): (WebKit::RemoteImageBufferMessageHandlerProxy::commitFlushContext): * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h. (WebKit::RemoteImageBufferMessageHandlerProxy::remoteResourceIdentifier const): (WebKit::RemoteImageBufferMessageHandlerProxy::isPendingFlush const): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteImageBuffer.h. (WebKit::RemoteImageBufferProxy::create): (WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::putImageData): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.cpp. (WebKit::RemoteRenderingBackendProxy::create): (WebKit::RemoteRenderingBackendProxy::RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::messageSenderConnection const): (WebKit::RemoteRenderingBackendProxy::messageSenderDestinationID const): (WebKit::RemoteRenderingBackendProxy::waitForCreateImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::waitForCommitImageBufferFlushContext): (WebKit::RemoteRenderingBackendProxy::createImageBuffer): (WebKit::RemoteRenderingBackendProxy::releaseRemoteResource): (WebKit::RemoteRenderingBackendProxy::createImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::commitImageBufferFlushContext): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.h. (WebKit::RemoteRenderingBackendProxy::renderingBackendIdentifier const): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::ensureRemoteRenderingBackendProxy const): (WebKit::WebChromeClient::createImageBuffer const): (WebKit::WebChromeClient::ensureRemoteRenderingBackend const): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: Canonical link: https://commits.webkit.org/230574@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 22:20:58 +00:00
GPUProcess/graphics/RemoteRenderingBackend.cpp
Source/WebCore: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Extracts an interface GraphicsContextGLIOSurfaceSwapChain which is used to submit IOSurfaces from GraphicsContextGLOpenGL. For web process WebGL, these go to WebGLLayer. For GPU process WebGL, the IOSurfaces go to the prepareForDisplay caller, e.g. the RemoteGraphicsContextGL, which then return the IOSurfaces back to Web process side. RemoteGraphicsContextGLProxy will send them to WebGLLayer. No new tests, tested by existing webgl tests once the implementation works. * PlatformMac.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::getQueryParameter): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::getSamplerParameter): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): (WebCore::WebGL2RenderingContext::readPixels): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::readPixels): * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::updateCache): * page/Chrome.cpp: (WebCore::Chrome::createGraphicsContextGL const): (WebCore::Chrome::windowScreenDidChange): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createGraphicsContextGL const): * platform/HostWindow.h: * platform/RuntimeApplicationChecks.h: (WebCore::isInGPUProcess): * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::isInGPUProcess): * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::create): * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: (GCGLSpan::GCGLSpan): (GCGLSpan<GCGLvoid>::GCGLSpan): * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: Added. (WebCore::RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase): (WebCore::RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL const): (WebCore::RemoteGraphicsContextGLProxyBase::platformTexture const): (WebCore::RemoteGraphicsContextGLProxyBase::getExtensions): (WebCore::RemoteGraphicsContextGLProxyBase::setContextVisibility): (WebCore::RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation const): (WebCore::RemoteGraphicsContextGLProxyBase::isGLES2Compliant const): (WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged): (WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): (WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): (WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): (WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas): (WebCore::RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer): (WebCore::RemoteGraphicsContextGLProxyBase::supports): (WebCore::RemoteGraphicsContextGLProxyBase::ensureEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::isEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::initialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): * platform/graphics/RemoteGraphicsContextGLProxyBase.h: Added. * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Added. * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::InitializeEGLDisplay): (WebCore::GraphicsContextGLOpenGL::create): (WebCore::GraphicsContextGLOpenGL::createShared): (WebCore::GraphicsContextGLOpenGL::createForGPUProcess): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const): (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: Added. (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): (WebCore::RemoteGraphicsContextGLProxyBase::asCV): (WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: (-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): (-[WebGLLayer swapChain]): (-[WebGLLayer prepareForDisplay]): (-[WebGLLayer display]): (WebGLLayerSwapChain::present): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Source/WebKit: Implement RemoteWebGLBackend https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Implement the RemoteGraphicsContextGL in WebKit side. This class will forward calls received via IPC to the GraphicsContextGLOpenGL. At the moment RemoteGraphicsContextGL instance is a direct child of GPUConnectionToWebProcess. Compositing is implemented only for PLATFORM(COCOA). Missing: - Simulated context loss - Simulated context change - Paint WebGL contents to 2D canvas - Upload video to WebGL - Upload canvas to WebGL * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createGraphicsContextGL): (WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: Added. (WebKit::RemoteGraphicsContextGL::create): (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::gpuConnectionToWebProcess const): (WebKit::RemoteGraphicsContextGL::messageSenderConnection const): (WebKit::RemoteGraphicsContextGL::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGL::didComposite): (WebKit::RemoteGraphicsContextGL::forceContextLost): (WebKit::RemoteGraphicsContextGL::recycleContext): (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): (WebKit::RemoteGraphicsContextGL::recycleBuffer): (WebKit::RemoteGraphicsContextGL::present): (WebKit::RemoteGraphicsContextGL::detachClient): (WebKit::RemoteGraphicsContextGL::reshape): (WebKit::RemoteGraphicsContextGL::prepareForDisplay): (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged): * GPUProcess/graphics/RemoteGraphicsContextGL.h: Added. * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: Added. * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: Added. (setFailNextGPUStatusCheck): (synthesizeGLError): (moveErrorsToSyntheticErrorList): (activeTexture): (attachShader): (bindAttribLocation): (bindBuffer): (bindFramebuffer): (bindRenderbuffer): (bindTexture): (blendColor): (blendEquation): (blendEquationSeparate): (blendFunc): (blendFuncSeparate): (checkFramebufferStatus): (clear): (clearColor): (clearDepth): (clearStencil): (colorMask): (compileShader): (copyTexImage2D): (copyTexSubImage2D): (createBuffer): (createFramebuffer): (createProgram): (createRenderbuffer): (createShader): (createTexture): (cullFace): (deleteBuffer): (deleteFramebuffer): (deleteProgram): (deleteRenderbuffer): (deleteShader): (deleteTexture): (depthFunc): (depthMask): (depthRange): (detachShader): (disable): (disableVertexAttribArray): (drawArrays): (drawElements): (enable): (enableVertexAttribArray): (finish): (flush): (framebufferRenderbuffer): (framebufferTexture2D): (frontFace): (generateMipmap): (getActiveAttrib): (getActiveUniform): (getAttribLocation): (getBufferParameteri): (getString): (getFloatv): (getIntegerv): (getInteger64): (getInteger64i): (getProgrami): (getBooleanv): (getError): (getFramebufferAttachmentParameteri): (getProgramInfoLog): (getRenderbufferParameteri): (getShaderi): (getShaderInfoLog): (getShaderPrecisionFormat): (getShaderSource): (getTexParameterf): (getTexParameteri): (getUniformfv): (getUniformiv): (getUniformuiv): (getUniformLocation): (getVertexAttribOffset): (hint): (isBuffer): (isEnabled): (isFramebuffer): (isProgram): (isRenderbuffer): (isShader): (isTexture): (lineWidth): (linkProgram): (pixelStorei): (polygonOffset): (renderbufferStorage): (sampleCoverage): (scissor): (shaderSource): (stencilFunc): (stencilFuncSeparate): (stencilMask): (stencilMaskSeparate): (stencilOp): (stencilOpSeparate): (texParameterf): (texParameteri): (uniform1f): (uniform1fv): (uniform1i): (uniform1iv): (uniform2f): (uniform2fv): (uniform2i): (uniform2iv): (uniform3f): (uniform3fv): (uniform3i): (uniform3iv): (uniform4f): (uniform4fv): (uniform4i): (uniform4iv): (uniformMatrix2fv): (uniformMatrix3fv): (uniformMatrix4fv): (useProgram): (validateProgram): (vertexAttrib1f): (vertexAttrib1fv): (vertexAttrib2f): (vertexAttrib2fv): (vertexAttrib3f): (vertexAttrib3fv): (vertexAttrib4f): (vertexAttrib4fv): (vertexAttribPointer): (viewport): (bufferData0): (bufferData1): (bufferSubData): (readnPixels0): (readnPixels1): (texImage2D0): (texImage2D1): (texSubImage2D0): (texSubImage2D1): (compressedTexImage2D0): (compressedTexImage2D1): (compressedTexSubImage2D0): (compressedTexSubImage2D1): (drawArraysInstanced): (drawElementsInstanced): (vertexAttribDivisor): (createVertexArray): (deleteVertexArray): (isVertexArray): (bindVertexArray): (copyBufferSubData): (getBufferSubData): (blitFramebuffer): (framebufferTextureLayer): (invalidateFramebuffer): (invalidateSubFramebuffer): (readBuffer): (renderbufferStorageMultisample): (texStorage2D): (texStorage3D): (texImage3D0): (texImage3D1): (texSubImage3D0): (texSubImage3D1): (copyTexSubImage3D): (compressedTexImage3D0): (compressedTexImage3D1): (compressedTexSubImage3D0): (compressedTexSubImage3D1): (getFragDataLocation): (uniform1ui): (uniform2ui): (uniform3ui): (uniform4ui): (uniform1uiv): (uniform2uiv): (uniform3uiv): (uniform4uiv): (uniformMatrix2x3fv): (uniformMatrix3x2fv): (uniformMatrix2x4fv): (uniformMatrix4x2fv): (uniformMatrix3x4fv): (uniformMatrix4x3fv): (vertexAttribI4i): (vertexAttribI4iv): (vertexAttribI4ui): (vertexAttribI4uiv): (vertexAttribIPointer): (drawRangeElements): (drawBuffers): (clearBufferiv): (clearBufferuiv): (clearBufferfv): (clearBufferfi): (createQuery): (deleteQuery): (isQuery): (beginQuery): (endQuery): (getQuery): (getQueryObjectui): (createSampler): (deleteSampler): (isSampler): (bindSampler): (samplerParameteri): (samplerParameterf): (getSamplerParameterf): (getSamplerParameteri): (fenceSync): (isSync): (deleteSync): (clientWaitSync): (waitSync): (getSynci): (createTransformFeedback): (deleteTransformFeedback): (isTransformFeedback): (bindTransformFeedback): (beginTransformFeedback): (endTransformFeedback): (transformFeedbackVaryings): (getTransformFeedbackVarying): (pauseTransformFeedback): (resumeTransformFeedback): (bindBufferBase): (bindBufferRange): (getUniformIndices): (getActiveUniforms): (getUniformBlockIndex): (getActiveUniformBlockName): (uniformBlockBinding): (getActiveUniformBlockiv): (getGraphicsResetStatusARB): (blitFramebufferANGLE): (renderbufferStorageMultisampleANGLE): (createVertexArrayOES): (deleteVertexArrayOES): (isVertexArrayOES): (bindVertexArrayOES): (getTranslatedShaderSourceANGLE): (insertEventMarkerEXT): (pushGroupMarkerEXT): (popGroupMarkerEXT): (drawBuffersEXT): (drawArraysInstancedANGLE): (drawElementsInstancedANGLE): (vertexAttribDivisorANGLE): * GPUProcess/mac/GPUProcessMac.mm: (WebKit::GPUProcess::initializeProcess): * GPUProcess/media/RemoteLegacyCDMProxy.h: * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: * GPUProcess/media/RemoteMediaResourceManager.cpp: * GPUProcess/media/RemoteMediaResourceManager.h: * GPUProcess/media/RemoteMediaSourceProxy.h: * GPUProcess/media/RemoteSourceBufferProxy.cpp: * GPUProcess/media/RemoteSourceBufferProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: * GPUProcess/webrtc/RemoteMediaRecorder.h: * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/Download.h: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/DownloadManager.h: * NetworkProcess/NetworkSocketChannel.cpp: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/NetworkSocketStream.h: * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: * NetworkProcess/soup/WebSocketTaskSoup.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * Platform/IPC/ArgumentCoders.h: * Platform/IPC/ArrayReference.h: Copied from Source/WebKit/Platform/IPC/DataReference.h. (IPC::ArrayReference::ArrayReference): (IPC::ArrayReference::isEmpty const): (IPC::ArrayReference::size const): (IPC::ArrayReference::data const): (IPC::ArrayReference::vector const): * Platform/IPC/Connection.h: (IPC::Connection::sendSync): * Platform/IPC/DataReference.h: * Platform/IPC/Decoder.cpp: (IPC::Decoder::decodeFixedLengthReference): * Platform/IPC/Decoder.h: * Platform/IPC/Encoder.cpp: (IPC::Encoder::wrapForTesting): * Platform/IPC/Encoder.h: * Platform/IPC/HandleMessage.h: * Platform/IPC/MessageSender.h: (IPC::MessageSender::sendSync): * Platform/IPC/SharedBufferCopy.cpp: (IPC::SharedBufferCopy::decode): * Platform/IPC/SharedBufferDataReference.cpp: * Platform/IPC/StringReference.cpp: * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * Scripts/webkit/messages.py: * Shared/API/APIData.cpp: * Shared/AuxiliaryProcess.h: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cf/ArgumentCodersCF.cpp: * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder<CertificateInfo>::encode): (IPC::ArgumentCoder<CertificateInfo>::decode): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::sendSync): * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: * UIProcess/PageClient.h: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: * UIProcess/WebURLSchemeHandler.h: * UIProcess/WebURLSchemeTask.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h: Renamed from Source/WebKit/Platform/IPC/DataReference.cpp. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::create): (WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::messageSenderConnection const): (WebKit::RemoteGraphicsContextGLProxy::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGLProxy::reshape): (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): (WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGLProxy::notifyMarkContextChanged): (WebKit::RemoteGraphicsContextGLProxy::simulateContextChanged): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): (WebKit::RemoteGraphicsContextGLProxy::wasCreated): (WebKit::RemoteGraphicsContextGLProxy::wasLost): (WebKit::RemoteGraphicsContextGLProxy::wasChanged): (WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: Added. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck): (WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError): (WebKit::RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList): (WebKit::RemoteGraphicsContextGLProxy::activeTexture): (WebKit::RemoteGraphicsContextGLProxy::attachShader): (WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::bindBuffer): (WebKit::RemoteGraphicsContextGLProxy::bindFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::bindRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::bindTexture): (WebKit::RemoteGraphicsContextGLProxy::blendColor): (WebKit::RemoteGraphicsContextGLProxy::blendEquation): (WebKit::RemoteGraphicsContextGLProxy::blendEquationSeparate): (WebKit::RemoteGraphicsContextGLProxy::blendFunc): (WebKit::RemoteGraphicsContextGLProxy::blendFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::checkFramebufferStatus): (WebKit::RemoteGraphicsContextGLProxy::clear): (WebKit::RemoteGraphicsContextGLProxy::clearColor): (WebKit::RemoteGraphicsContextGLProxy::clearDepth): (WebKit::RemoteGraphicsContextGLProxy::clearStencil): (WebKit::RemoteGraphicsContextGLProxy::colorMask): (WebKit::RemoteGraphicsContextGLProxy::compileShader): (WebKit::RemoteGraphicsContextGLProxy::copyTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::createBuffer): (WebKit::RemoteGraphicsContextGLProxy::createFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::createProgram): (WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::createShader): (WebKit::RemoteGraphicsContextGLProxy::createTexture): (WebKit::RemoteGraphicsContextGLProxy::cullFace): (WebKit::RemoteGraphicsContextGLProxy::deleteBuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteProgram): (WebKit::RemoteGraphicsContextGLProxy::deleteRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteShader): (WebKit::RemoteGraphicsContextGLProxy::deleteTexture): (WebKit::RemoteGraphicsContextGLProxy::depthFunc): (WebKit::RemoteGraphicsContextGLProxy::depthMask): (WebKit::RemoteGraphicsContextGLProxy::depthRange): (WebKit::RemoteGraphicsContextGLProxy::detachShader): (WebKit::RemoteGraphicsContextGLProxy::disable): (WebKit::RemoteGraphicsContextGLProxy::disableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::drawArrays): (WebKit::RemoteGraphicsContextGLProxy::drawElements): (WebKit::RemoteGraphicsContextGLProxy::enable): (WebKit::RemoteGraphicsContextGLProxy::enableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::finish): (WebKit::RemoteGraphicsContextGLProxy::flush): (WebKit::RemoteGraphicsContextGLProxy::framebufferRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTexture2D): (WebKit::RemoteGraphicsContextGLProxy::frontFace): (WebKit::RemoteGraphicsContextGLProxy::generateMipmap): (WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniform): (WebKit::RemoteGraphicsContextGLProxy::getAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getString): (WebKit::RemoteGraphicsContextGLProxy::getFloatv): (WebKit::RemoteGraphicsContextGLProxy::getIntegerv): (WebKit::RemoteGraphicsContextGLProxy::getInteger64): (WebKit::RemoteGraphicsContextGLProxy::getInteger64i): (WebKit::RemoteGraphicsContextGLProxy::getProgrami): (WebKit::RemoteGraphicsContextGLProxy::getBooleanv): (WebKit::RemoteGraphicsContextGLProxy::getError): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri): (WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getRenderbufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getShaderi): (WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): (WebKit::RemoteGraphicsContextGLProxy::getShaderSource): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterf): (WebKit::RemoteGraphicsContextGLProxy::getTexParameteri): (WebKit::RemoteGraphicsContextGLProxy::getUniformfv): (WebKit::RemoteGraphicsContextGLProxy::getUniformiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformuiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformLocation): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribOffset): (WebKit::RemoteGraphicsContextGLProxy::hint): (WebKit::RemoteGraphicsContextGLProxy::isBuffer): (WebKit::RemoteGraphicsContextGLProxy::isEnabled): (WebKit::RemoteGraphicsContextGLProxy::isFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::isProgram): (WebKit::RemoteGraphicsContextGLProxy::isRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::isShader): (WebKit::RemoteGraphicsContextGLProxy::isTexture): (WebKit::RemoteGraphicsContextGLProxy::lineWidth): (WebKit::RemoteGraphicsContextGLProxy::linkProgram): (WebKit::RemoteGraphicsContextGLProxy::pixelStorei): (WebKit::RemoteGraphicsContextGLProxy::polygonOffset): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorage): (WebKit::RemoteGraphicsContextGLProxy::sampleCoverage): (WebKit::RemoteGraphicsContextGLProxy::scissor): (WebKit::RemoteGraphicsContextGLProxy::shaderSource): (WebKit::RemoteGraphicsContextGLProxy::stencilFunc): (WebKit::RemoteGraphicsContextGLProxy::stencilFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilMask): (WebKit::RemoteGraphicsContextGLProxy::stencilMaskSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilOp): (WebKit::RemoteGraphicsContextGLProxy::stencilOpSeparate): (WebKit::RemoteGraphicsContextGLProxy::texParameterf): (WebKit::RemoteGraphicsContextGLProxy::texParameteri): (WebKit::RemoteGraphicsContextGLProxy::uniform1f): (WebKit::RemoteGraphicsContextGLProxy::uniform1fv): (WebKit::RemoteGraphicsContextGLProxy::uniform1i): (WebKit::RemoteGraphicsContextGLProxy::uniform1iv): (WebKit::RemoteGraphicsContextGLProxy::uniform2f): (WebKit::RemoteGraphicsContextGLProxy::uniform2fv): (WebKit::RemoteGraphicsContextGLProxy::uniform2i): (WebKit::RemoteGraphicsContextGLProxy::uniform2iv): (WebKit::RemoteGraphicsContextGLProxy::uniform3f): (WebKit::RemoteGraphicsContextGLProxy::uniform3fv): (WebKit::RemoteGraphicsContextGLProxy::uniform3i): (WebKit::RemoteGraphicsContextGLProxy::uniform3iv): (WebKit::RemoteGraphicsContextGLProxy::uniform4f): (WebKit::RemoteGraphicsContextGLProxy::uniform4fv): (WebKit::RemoteGraphicsContextGLProxy::uniform4i): (WebKit::RemoteGraphicsContextGLProxy::uniform4iv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4fv): (WebKit::RemoteGraphicsContextGLProxy::useProgram): (WebKit::RemoteGraphicsContextGLProxy::validateProgram): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribPointer): (WebKit::RemoteGraphicsContextGLProxy::viewport): (WebKit::RemoteGraphicsContextGLProxy::bufferData): (WebKit::RemoteGraphicsContextGLProxy::bufferSubData): (WebKit::RemoteGraphicsContextGLProxy::readnPixels): (WebKit::RemoteGraphicsContextGLProxy::texImage2D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstanced): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstanced): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisor): (WebKit::RemoteGraphicsContextGLProxy::createVertexArray): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArray): (WebKit::RemoteGraphicsContextGLProxy::isVertexArray): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArray): (WebKit::RemoteGraphicsContextGLProxy::copyBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::blitFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTextureLayer): (WebKit::RemoteGraphicsContextGLProxy::invalidateFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::invalidateSubFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::readBuffer): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisample): (WebKit::RemoteGraphicsContextGLProxy::texStorage2D): (WebKit::RemoteGraphicsContextGLProxy::texStorage3D): (WebKit::RemoteGraphicsContextGLProxy::texImage3D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation): (WebKit::RemoteGraphicsContextGLProxy::uniform1ui): (WebKit::RemoteGraphicsContextGLProxy::uniform2ui): (WebKit::RemoteGraphicsContextGLProxy::uniform3ui): (WebKit::RemoteGraphicsContextGLProxy::uniform4ui): (WebKit::RemoteGraphicsContextGLProxy::uniform1uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform2uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform3uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform4uiv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4i): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4iv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4ui): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4uiv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribIPointer): (WebKit::RemoteGraphicsContextGLProxy::drawRangeElements): (WebKit::RemoteGraphicsContextGLProxy::drawBuffers): (WebKit::RemoteGraphicsContextGLProxy::clearBufferiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferuiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfi): (WebKit::RemoteGraphicsContextGLProxy::createQuery): (WebKit::RemoteGraphicsContextGLProxy::deleteQuery): (WebKit::RemoteGraphicsContextGLProxy::isQuery): (WebKit::RemoteGraphicsContextGLProxy::beginQuery): (WebKit::RemoteGraphicsContextGLProxy::endQuery): (WebKit::RemoteGraphicsContextGLProxy::getQuery): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui): (WebKit::RemoteGraphicsContextGLProxy::createSampler): (WebKit::RemoteGraphicsContextGLProxy::deleteSampler): (WebKit::RemoteGraphicsContextGLProxy::isSampler): (WebKit::RemoteGraphicsContextGLProxy::bindSampler): (WebKit::RemoteGraphicsContextGLProxy::samplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::fenceSync): (WebKit::RemoteGraphicsContextGLProxy::isSync): (WebKit::RemoteGraphicsContextGLProxy::deleteSync): (WebKit::RemoteGraphicsContextGLProxy::clientWaitSync): (WebKit::RemoteGraphicsContextGLProxy::waitSync): (WebKit::RemoteGraphicsContextGLProxy::getSynci): (WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::deleteTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::isTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::beginTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::endTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings): (WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying): (WebKit::RemoteGraphicsContextGLProxy::pauseTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::resumeTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindBufferBase): (WebKit::RemoteGraphicsContextGLProxy::bindBufferRange): (WebKit::RemoteGraphicsContextGLProxy::getUniformIndices): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniforms): (WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName): (WebKit::RemoteGraphicsContextGLProxy::uniformBlockBinding): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockiv): (WebKit::RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB): (WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): (WebKit::RemoteGraphicsContextGLProxy::createVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::isVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE): (WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::drawBuffersEXT): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativ): (WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess): * WebProcess/GPU/media/RemoteAudioSession.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: * WebProcess/GPU/media/SourceBufferPrivateRemote.h: * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebSocketChannel.cpp: * WebProcess/Network/WebSocketChannel.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.h: * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createGraphicsContextGL const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForWebGL): (WebKit::WebProcess::shouldUseRemoteRenderingForWebGL const): * WebProcess/WebProcess.h: Tools: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC and is incomplete. Add the code generator to generate the implementation. Currently the generator generates a WebKit IPC implementation. The input definition to the generator is the proxy implementation header files. The output of the generator is - WebKit IPC message definition file - Message sender code - Message receiver and payload invocation code The generator converts GraphicsContextGL GCGL -prefixed types to sized IPC types. The generator is invoked during development time and the results are stored in the repository. * Scripts/generate-gpup-webgl: Added. LayoutTests: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Adds test expectations for the missing functionality. Does not yet enable the tests that actually pass but which were skipped before the implementation. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/232258@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 18:32:29 +00:00
GPUProcess/graphics/RemoteGraphicsContextGL.cpp
Source/WebCore: [GPU Process] Introduce RemoteResourceCache to manage the resources in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=217554 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-10-16 Reviewed by Simon Fraser. Add a new virtual method named ImageBuffer::flushDisplayList() which applies a DisplayList to the ImageBuffer::context(). * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::flushDisplayList): Source/WebKit: [GPU Process] Introduce RemoteResourceCacheProxy to manage the resources in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=217554 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-10-16 Reviewed by Simon Fraser. RemoteResourceCache will be responsible for caching the remote resources. RemoteRenderingBackend will delegate all the resource caching to its RemoteResourceCache. We can get rid of RemoteImageBufferMessageHandler because all it does is is sending messages to WebProcess. Removing it will simplify the interface of RemoteImageBuffer. Sending the messages will be moved to RemoteRenderingBackend. Rename flushDrawingContext() to flushDisplayList() because the name is confusing. This function flushes a DisplayList to the context. No DrawingContext is involved here and there is another function with the same name which does not take any argument. Rename ImageBufferFlushIdentifier to DisplayListFlushIdentifier to make more general name and be ready for GPU DOM rendering. Rename the RemoteRenderingBackendProxy messages: CreateImageBufferBackend and CommitImageBufferFlushContext to be ImageBufferBackendWasCreated and FlushDisplayListWasCommitted. We need to include passive verbs in them to reflect that the actions were taken place in the GPU Process. They are sent only to inform the Web Process with the current state. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::RemoteImageBuffer): (WebKit::RemoteImageBuffer::apply): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::gpuConnectionToWebProcess const): (WebKit::RemoteRenderingBackend::imageBufferBackendWasCreated): (WebKit::RemoteRenderingBackend::flushDisplayListWasCommitted): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::flushDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackend::getImageData): We should call the completion handler even if the ImageBuffer was not found. (WebKit::RemoteRenderingBackend::releaseRemoteResource): (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContext): Deleted. (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContextAndCommit): Deleted. * GPUProcess/graphics/RemoteRenderingBackend.h: (WebKit::RemoteRenderingBackend::renderingBackendIdentifier const): Deleted. * GPUProcess/graphics/RemoteRenderingBackend.messages.in: * GPUProcess/graphics/RemoteResourceCache.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandler.cpp. (WebKit::RemoteResourceCache::cacheImageBuffer): (WebKit::RemoteResourceCache::cachedImageBuffer): (WebKit::RemoteResourceCache::releaseRemoteResource): * GPUProcess/graphics/RemoteResourceCache.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandler.h. * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/DisplayListFlushIdentifier.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/ImageBufferFlushIdentifier.h. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp: (WebKit::RemoteImageBufferMessageHandlerProxy::waitForImageBufferBackendWasCreated): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForFlushDisplayListWasCommitted): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDisplayList): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDisplayListAndWaitCommit): (WebKit::RemoteImageBufferMessageHandlerProxy::commitFlushContext): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCreateImageBufferBackend): Deleted. (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCommitImageBufferFlushContext): Deleted. (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContext): Deleted. (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContextAndWaitCommit): Deleted. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.h: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::waitForImageBufferBackendWasCreated): (WebKit::RemoteRenderingBackendProxy::waitForFlushDisplayListWasCommitted): (WebKit::RemoteRenderingBackendProxy::imageBufferBackendWasCreated): (WebKit::RemoteRenderingBackendProxy::flushDisplayListWasCommitted): (WebKit::RemoteRenderingBackendProxy::waitForCreateImageBufferBackend): Deleted. (WebKit::RemoteRenderingBackendProxy::waitForCommitImageBufferFlushContext): Deleted. (WebKit::RemoteRenderingBackendProxy::createImageBufferBackend): Deleted. (WebKit::RemoteRenderingBackendProxy::commitImageBufferFlushContext): Deleted. * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: Canonical link: https://commits.webkit.org/230595@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-17 06:46:25 +00:00
GPUProcess/graphics/RemoteResourceCache.cpp
RemoteRenderingBackend should clean up CG resources after last Canvas is destroyed in Gpu process https://bugs.webkit.org/show_bug.cgi?id=223885 <rdar://problem/75637356> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-01 Reviewed by Simon Fraser. Source/WebCore/PAL: Add SPI interface _MTLDevice for its _purgeDevice method. * pal/spi/cocoa/MetalSPI.h: Source/WebKit: Release CoreGraphics resources (Metal device command buffers, and other per-device resources) 1s after last - RemoteRenderingBackend drawable resource - RemoteGraphicsContextGL instance - RemoteMediaPlayerProxy instance has been destroyed. Adds ScopedRenderingResourcesRequest and ScopedWebGLRenderingResourcesRequest to hold the intent to use the global rendering resources. The names are called 'Request' because the implementation is not guaranteed to do anything specific. E.g. ResourcesRequest == "I'd like the resources to be available" ResourcesLock, ResourcesHolder, ... = "The resources are guaranteed to be held." The naming tries to be consistent with the similar class ScopedHighPerformanceGPURequest. For sequence like: 1) Visit a page with simple Context2D usage 2) Close the page (but leave the browser running) This saves 2mb of IOAccelMemory at step 2 on a tested device. * Configurations/WebKit.xcconfig: Link WebKit to Metal in order to use the RemoteRenderingRequest (_MTLCopyAllDevices symbol). * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): Clear the map containing RemoteGraphicsContextGL objects when connection to WebContent process is closed. This stops the RemoteGraphicsContextGL listening for IPC and destroys them in scenarios where the connection is closed but the GPUConnectionToWebProcess is staying alive for some reason. In this patch, this would happen for example during reload of the page. * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: (WebKit::remoteGraphicsContextGLStreamWorkQueue): (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::initialize): (WebKit::RemoteGraphicsContextGL::stopListeningForIPC): * GPUProcess/graphics/RemoteGraphicsContextGL.h: Hold the ScopedWebGLRenderingResourcesRequest for the duration of the RemoteGraphicsContextGL context lifetime. * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::~RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::releaseRemoteResource): (WebKit::RemoteRenderingBackend::updateRenderingResourceRequest): * GPUProcess/graphics/RemoteRenderingBackend.h: Hold the ScopedRenderingResourcesRequest for the duration that there are ImageBuffers or NativeImages in the RemoteResourceCache. A RemoteRenderingBackend might exist without any drawable due to a) Context2D being created and then destroyed b) WebGL taking a reference to the RemoteRenderingBackend in order to submit work in case the caller would request Image -> texture upload. In case of WebGL context being created and then destroyed, there is a RRB instance alive but not doing any rendering. In these cases, we want the rendering resources to be released and not held by the empty RRB. * GPUProcess/graphics/ScopedRenderingResourcesRequest.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h. (WebKit::ScopedRenderingResourcesRequest::scheduleFreeRenderingResources): (WebKit::ScopedRenderingResourcesRequest::freeRenderingResources): * GPUProcess/graphics/ScopedRenderingResourcesRequest.h: Added. (WebKit::ScopedRenderingResourcesRequest::ScopedRenderingResourcesRequest): (WebKit::ScopedRenderingResourcesRequest::~ScopedRenderingResourcesRequest): (WebKit::ScopedRenderingResourcesRequest::operator=): (WebKit::ScopedRenderingResourcesRequest::isRequested const): (WebKit::ScopedRenderingResourcesRequest::acquire): (WebKit::ScopedRenderingResourcesRequest::reset): * GPUProcess/graphics/ScopedRenderingResourcesRequestCocoa.mm: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h. (WebKit::ScopedRenderingResourcesRequest::scheduleFreeRenderingResources): (WebKit::ScopedRenderingResourcesRequest::freeRenderingResources): Add a scoped holder for the rendering resources. Currently it purges all Metal device memory. * GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h. (WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources): (WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources): * GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.h: Added. (WebKit::ScopedWebGLRenderingResourcesRequest::ScopedWebGLRenderingResourcesRequest): (WebKit::ScopedWebGLRenderingResourcesRequest::~ScopedWebGLRenderingResourcesRequest): (WebKit::ScopedWebGLRenderingResourcesRequest::operator=): (WebKit::ScopedWebGLRenderingResourcesRequest::isRequested const): (WebKit::ScopedWebGLRenderingResourcesRequest::acquire): (WebKit::ScopedWebGLRenderingResourcesRequest::reset): * GPUProcess/graphics/ScopedWebGLRenderingResourcesRequestCocoa.cpp: Copied from Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h. (WebKit::ScopedWebGLRenderingResourcesRequest::scheduleFreeWebGLRenderingResources): (WebKit::ScopedWebGLRenderingResourcesRequest::freeWebGLRenderingResources): Add a scoped holder for the WebGL global resources. Currently it frees the ANGLE related global data. It also purges all Metal device memory via RenderingResourcesRequest. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy): (WebKit::RemoteMediaPlayerProxy::invalidate): * GPUProcess/media/RemoteMediaPlayerProxy.h: Hold RenderingResourcesRequest for the duration of a media player existing in the GPU process. It's not known if media playback needs Metal. At least some videos do not need it. However, this is erring on the side of caution in order to avoid potential video frame skips the video playback using Metal but then the devices being purged by a Context2D or WebGL -related destruction. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/236066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-02 04:42:15 +00:00
GPUProcess/graphics/ScopedRenderingResourcesRequest.cpp
GPUProcess/graphics/ScopedWebGLRenderingResourcesRequest.cpp
Move AudioHardwareListener into the GPU Process https://bugs.webkit.org/show_bug.cgi?id=221455 Reviewed by Eric Carlson. Source/WebCore: Allow clients to override the creation method for AudioHardwareListener::create(). * platform/audio/AudioHardwareListener.cpp: (WebCore::audioHardwareListenerCreationFunction): (WebCore::AudioHardwareListener::setCreationFunction): (WebCore::AudioHardwareListener::resetCreationFunction): (WebCore::AudioHardwareListener::create): * platform/audio/AudioHardwareListener.h: * platform/audio/mac/AudioHardwareListenerMac.cpp: (WebCore::AudioHardwareListener::create): Deleted. Source/WebKit: Add a new Remote pair of classes, RemoteAudioHardwareListener/Proxy. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createAudioHardwareListener): (WebKit::GPUConnectionToWebProcess::releaseAudioHardwareListener): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/media/RemoteAudioHardwareListenerProxy.cpp: (WebKit::RemoteAudioHardwareListenerProxy::RemoteAudioHardwareListenerProxy): (WebKit::RemoteAudioHardwareListenerProxy::audioHardwareDidBecomeActive): (WebKit::RemoteAudioHardwareListenerProxy::audioHardwareDidBecomeInactive): (WebKit::RemoteAudioHardwareListenerProxy::audioOutputDeviceChanged): * GPUProcess/media/RemoteAudioHardwareListenerProxy.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioHardwareListener.cpp: Added. (WebKit::RemoteAudioHardwareListener::create): (WebKit::RemoteAudioHardwareListener::RemoteAudioHardwareListener): (WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener): (WebKit::RemoteAudioHardwareListener::gpuProcessConnectionDidClose): (WebKit::RemoteAudioHardwareListener::audioHardwareDidBecomeActive): (WebKit::RemoteAudioHardwareListener::audioHardwareDidBecomeInactive): (WebKit::RemoteAudioHardwareListener::audioOutputDeviceChanged): * WebProcess/GPU/media/RemoteAudioHardwareListener.h: * WebProcess/GPU/media/RemoteAudioHardwareListener.messages.in: * WebProcess/GPU/media/RemoteAudioHardwareListenerIdentifier.h: * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/233954@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-11 07:24:24 +00:00
GPUProcess/media/RemoteAudioHardwareListenerProxy.cpp
[GPUP] Implement RemoteAudioSession https://bugs.webkit.org/show_bug.cgi?id=208583 Reviewed by Alex Christensen. Source/WebCore: Add EnumTraits for all the enumerations inside AudioSession. Make many AudioSession methods virtual, so they can be overridden in the case where the GPU process is enabled. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/AudioSession.cpp: (WebCore::AudioSession::create): (WebCore::AudioSession::sharedSession): * platform/audio/AudioSession.h: Source/WebKit: Add a subclass of AudioSession which, instead of modifying the audio behavior of the current process, modifies the audio behavior of the GPU Process. And, in the GPU Process, since it represents the audio behavior of potentially multiple separate WebContent processes. Override the default shared AudioSession at WebProcess initialization time. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): (WebKit::GPUConnectionToWebProcess::audioSessionProxy): (WebKit::GPUConnectionToWebProcess::ensureAudioSession): (WebKit::GPUConnectionToWebProcess::legacyCdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): (WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): (WebKit::GPUProcess::audioSessionManager const): * GPUProcess/GPUProcess.h: * GPUProcess/media/RemoteAudioSessionProxy.cpp: Added. (WebKit::RemoteAudioSessionProxy::create): (WebKit::RemoteAudioSessionProxy::RemoteAudioSessionProxy): (WebKit::RemoteAudioSessionProxy::processIdentifier): (WebKit::RemoteAudioSessionProxy::configuration): (WebKit::RemoteAudioSessionProxy::setCategory): (WebKit::RemoteAudioSessionProxy::setPreferredBufferSize): (WebKit::RemoteAudioSessionProxy::tryToSetActive): (WebKit::RemoteAudioSessionProxy::beginInterruption): (WebKit::RemoteAudioSessionProxy::endInterruption): (WebKit::RemoteAudioSessionProxy::audioSessionManager): (WebKit::RemoteAudioSessionProxy::connection): * GPUProcess/media/RemoteAudioSessionProxy.h: Added. (WebKit::RemoteAudioSessionProxy::category const): (WebKit::RemoteAudioSessionProxy::routeSharingPolicy const): (WebKit::RemoteAudioSessionProxy::preferredBufferSize const): (WebKit::RemoteAudioSessionProxy::isActive const): * GPUProcess/media/RemoteAudioSessionProxy.messages.in: * GPUProcess/media/RemoteAudioSessionProxyManager.cpp: Added. (WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager): (WebKit::RemoteAudioSessionProxyManager::addProxy): (WebKit::RemoteAudioSessionProxyManager::removeProxy): (WebKit::RemoteAudioSessionProxyManager::getProxy): (WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess): (WebKit::RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess): (WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess): * GPUProcess/media/RemoteAudioSessionProxyManager.h: (WebKit::RemoteAudioSessionProxyManager::session const): * GPUProcess/media/RemoteAudioSessionProxyManager.messages.in: * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioSession.cpp: Added. (WebKit::RemoteAudioSession::create): (WebKit::RemoteAudioSession::RemoteAudioSession): (WebKit::RemoteAudioSession::connection): (WebKit::RemoteAudioSession::setCategory): (WebKit::RemoteAudioSession::setPreferredBufferSize): (WebKit::RemoteAudioSession::tryToSetActiveInternal): (WebKit::RemoteAudioSession::configurationChanged): (WebKit::RemoteAudioSession::beginInterruption): (WebKit::RemoteAudioSession::endInterruption): * WebProcess/GPU/media/RemoteAudioSession.h: Added. * WebProcess/GPU/media/RemoteAudioSession.messages.in: * WebProcess/GPU/media/RemoteAudioSessionConfiguration.h: Added. (WebKit::RemoteAudioSessionConfiguration::encode const): (WebKit::RemoteAudioSessionConfiguration::decode): * WebProcess/GPU/media/RemoteAudioSessionIdentifier.h: Source/WTF: Add UniqueRef to the list of forward-declared template types. * wtf/Forward.h: Canonical link: https://commits.webkit.org/221567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-05 19:43:12 +00:00
GPUProcess/media/RemoteAudioSessionProxy.cpp
GPUProcess/media/RemoteAudioSessionProxyManager.cpp
Expose audio tracks for media files in the GPUProcess https://bugs.webkit.org/show_bug.cgi?id=206152 <rdar://problem/58513227> Reviewed by youenn fablet. Source/WebCore: No new tests, un-skipped existing tests that pass because of this change. * platform/graphics/AudioTrackPrivate.h: * platform/graphics/TrackPrivateBase.h: Source/WebKit: * GPUProcess/media/RemoteAudioTrackProxy.cpp: Added. (WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy): (WebKit::RemoteAudioTrackProxy::configuration): (WebKit::RemoteAudioTrackProxy::configurationChanged): (WebKit::RemoteAudioTrackProxy::willRemove): (WebKit::RemoteAudioTrackProxy::enabledChanged): (WebKit::RemoteAudioTrackProxy::idChanged): (WebKit::RemoteAudioTrackProxy::labelChanged): (WebKit::RemoteAudioTrackProxy::languageChanged): * GPUProcess/media/RemoteAudioTrackProxy.h: Added. * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::setRate): (WebKit::RemoteMediaPlayerManagerProxy::audioTrackSetEnabled): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack): (WebKit::RemoteMediaPlayerProxy::audioTrackSetEnabled): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/TrackPrivateRemoteConfiguration.h: Added. (WebKit::TrackPrivateRemoteConfiguration::encode const): (WebKit::TrackPrivateRemoteConfiguration::decode): * GPUProcess/media/TrackPrivateRemoteIdentifier.h: Added. * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: Added. (WebKit::AudioTrackPrivateRemote::AudioTrackPrivateRemote): (WebKit::AudioTrackPrivateRemote::setEnabled): (WebKit::AudioTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/AudioTrackPrivateRemote.h: Added. (WebKit::AudioTrackPrivateRemote::create): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::timeChanged): (WebKit::RemoteMediaPlayerManager::durationChanged): (WebKit::RemoteMediaPlayerManager::engineFailedToLoad): (WebKit::RemoteMediaPlayerManager::characteristicChanged): (WebKit::RemoteMediaPlayerManager::sizeChanged): (WebKit::RemoteMediaPlayerManager::addRemoteAudioTrack): (WebKit::RemoteMediaPlayerManager::removeRemoteAudioTrack): (WebKit::RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged): (WebKit::RemoteMediaPlayerManager::updateCachedState): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/219281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-13 22:27:39 +00:00
GPUProcess/media/RemoteAudioTrackProxy.cpp
[GPUP] Implement Modern EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208090 Reviewed by Eric Carlson. Source/WebCore: Add export macros to CDMFactory::registeredFactories(). * platform/encryptedmedia/CDMFactory.h: Source/WebKit: Add support for RemoteCDMFactory, RemateCDM, RemoteCDMInstance, RemoteCDMInstanceSession, and all of their associated Proxy objects. Allow the existing CDMFactory machinery to work normally when the GPU process is disabled, by making initialization of the CDM factories contingent upon the "use GPU" setting. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::cdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteCDMFactoryProxy.cpp: Added. (WebKit::RemoteCDMFactoryProxy::RemoteCDMFactoryProxy): (WebKit::factoryForKeySystem): (WebKit::RemoteCDMFactoryProxy::createCDM): (WebKit::RemoteCDMFactoryProxy::supportsKeySystem): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMInstanceMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMInstanceSessionMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMInstanceMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMInstanceSessionMessage): (WebKit::RemoteCDMFactoryProxy::addProxy): (WebKit::RemoteCDMFactoryProxy::removeProxy): (WebKit::RemoteCDMFactoryProxy::addInstance): (WebKit::RemoteCDMFactoryProxy::removeInstance): (WebKit::RemoteCDMFactoryProxy::getInstance): (WebKit::RemoteCDMFactoryProxy::addSession): (WebKit::RemoteCDMFactoryProxy::removeSession): * GPUProcess/media/RemoteCDMFactoryProxy.h: Added. * GPUProcess/media/RemoteCDMFactoryProxy.messages.in: Added. * GPUProcess/media/RemoteCDMInstanceProxy.cpp: Added. (WebKit::RemoteCDMInstanceProxy::create): (WebKit::RemoteCDMInstanceProxy::RemoteCDMInstanceProxy): (WebKit::RemoteCDMInstanceProxy::initializeWithConfiguration): (WebKit::RemoteCDMInstanceProxy::setServerCertificate): (WebKit::RemoteCDMInstanceProxy::setStorageDirectory): (WebKit::RemoteCDMInstanceProxy::createSession): * GPUProcess/media/RemoteCDMInstanceProxy.h: Added. (WebKit::RemoteCDMInstanceProxy::configuration const): (WebKit::RemoteCDMInstanceProxy::instance): * GPUProcess/media/RemoteCDMInstanceProxy.messages.in: Added. * GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp: Added. (WebKit::RemoteCDMInstanceSessionProxy::create): (WebKit::RemoteCDMInstanceSessionProxy::RemoteCDMInstanceSessionProxy): (WebKit::RemoteCDMInstanceSessionProxy::~RemoteCDMInstanceSessionProxy): (WebKit::RemoteCDMInstanceSessionProxy::requestLicense): (WebKit::RemoteCDMInstanceSessionProxy::updateLicense): (WebKit::RemoteCDMInstanceSessionProxy::loadSession): (WebKit::RemoteCDMInstanceSessionProxy::closeSession): (WebKit::RemoteCDMInstanceSessionProxy::removeSessionData): (WebKit::RemoteCDMInstanceSessionProxy::storeRecordOfKeyUsage): (WebKit::RemoteCDMInstanceSessionProxy::updateKeyStatuses): (WebKit::RemoteCDMInstanceSessionProxy::sendMessage): (WebKit::RemoteCDMInstanceSessionProxy::sessionIdChanged): * GPUProcess/media/RemoteCDMInstanceSessionProxy.h: Added. * GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in: Added. * GPUProcess/media/RemoteCDMProxy.cpp: Added. (WebKit::RemoteCDMProxy::create): (WebKit::RemoteCDMProxy::RemoteCDMProxy): (WebKit::RemoteCDMProxy::supportsInitData): (WebKit::RemoteCDMProxy::sanitizeResponse): (WebKit::RemoteCDMProxy::sanitizeSessionId): (WebKit::RemoteCDMProxy::getSupportedConfiguration): (WebKit::RemoteCDMProxy::createInstance): (WebKit::RemoteCDMProxy::loadAndInitialize): * GPUProcess/media/RemoteCDMProxy.h: Added. (WebKit::RemoteCDMProxy::configuration const): (WebKit::RemoteCDMProxy::factory const): * GPUProcess/media/RemoteCDMProxy.messages.in: Added. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerInitializationDataEncountered): (WebKit::RemoteMediaPlayerProxy::cdmInstanceAttached): (WebKit::RemoteMediaPlayerProxy::cdmInstanceDetached): (WebKit::RemoteMediaPlayerProxy::attemptToDecryptWithInstance): (WebKit::RemoteMediaPlayerProxy::setShouldContinueAfterKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::CDMInstanceSession::Message>::encode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::Message>::decode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::encode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::decode): * Shared/WebCoreArgumentCoders.h: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveMessage): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::cdmInstanceAttached): (WebKit::MediaPlayerPrivateRemote::cdmInstanceDetached): (WebKit::MediaPlayerPrivateRemote::attemptToDecryptWithInstance): (WebKit::MediaPlayerPrivateRemote::initializationDataEncountered): (WebKit::MediaPlayerPrivateRemote::setShouldContinueAfterKeyNeeded): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteCDM.cpp: Added. (WebKit::RemoteCDM::create): (WebKit::RemoteCDM::RemoteCDM): (WebKit::RemoteCDM::getSupportedConfiguration): (WebKit::RemoteCDM::supportsConfiguration const): (WebKit::RemoteCDM::supportsConfigurationWithRestrictions const): (WebKit::RemoteCDM::supportsSessionTypeWithConfiguration const): (WebKit::RemoteCDM::supportsInitData const): (WebKit::RemoteCDM::distinctiveIdentifiersRequirement const): (WebKit::RemoteCDM::persistentStateRequirement const): (WebKit::RemoteCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable const): (WebKit::RemoteCDM::createInstance): (WebKit::RemoteCDM::loadAndInitialize): (WebKit::RemoteCDM::sanitizeResponse const): (WebKit::RemoteCDM::sanitizeSessionId const): * WebProcess/GPU/media/RemoteCDM.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: Added. (WebKit::RemoteCDMConfiguration::encode const): (WebKit::RemoteCDMConfiguration::decode): * WebProcess/GPU/media/RemoteCDMFactory.cpp: Added. (WebKit::RemoteCDMFactory::RemoteCDMFactory): (WebKit::RemoteCDMFactory::updatePreferences): (WebKit::RemoteCDMFactory::supplementName): (WebKit::RemoteCDMFactory::gpuProcessConnection): (WebKit::RemoteCDMFactory::supportsKeySystem): (WebKit::RemoteCDMFactory::createCDM): (WebKit::RemoteCDMFactory::addSession): (WebKit::RemoteCDMFactory::removeSession): (WebKit::RemoteCDMFactory::didReceiveSessionMessage): * WebProcess/GPU/media/RemoteCDMFactory.h: Added. * WebProcess/GPU/media/RemoteCDMIdentifier.h: Added. * WebProcess/GPU/media/RemoteCDMInstance.cpp: Added. (WebKit::RemoteCDMInstance::create): (WebKit::RemoteCDMInstance::RemoteCDMInstance): (WebKit::RemoteCDMInstance::initializeWithConfiguration): (WebKit::RemoteCDMInstance::setServerCertificate): (WebKit::RemoteCDMInstance::setStorageDirectory): (WebKit::RemoteCDMInstance::createSession): * WebProcess/GPU/media/RemoteCDMInstance.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: Added. (WebKit::RemoteCDMInstanceConfiguration::encode const): (WebKit::RemoteCDMInstanceConfiguration::decode): * WebProcess/GPU/media/RemoteCDMInstanceIdentifier.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceSession.cpp: Added. (WebKit::RemoteCDMInstanceSession::create): (WebKit::RemoteCDMInstanceSession::RemoteCDMInstanceSession): (WebKit::RemoteCDMInstanceSession::requestLicense): (WebKit::RemoteCDMInstanceSession::updateLicense): (WebKit::RemoteCDMInstanceSession::loadSession): (WebKit::RemoteCDMInstanceSession::closeSession): (WebKit::RemoteCDMInstanceSession::removeSessionData): (WebKit::RemoteCDMInstanceSession::storeRecordOfKeyUsage): (WebKit::RemoteCDMInstanceSession::updateKeyStatuses): (WebKit::RemoteCDMInstanceSession::sendMessage): (WebKit::RemoteCDMInstanceSession::sessionIdChanged): * WebProcess/GPU/media/RemoteCDMInstanceSession.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceSession.messages.in: Added. * WebProcess/GPU/media/RemoteCDMInstanceSessionIdentifier.h: Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: Canonical link: https://commits.webkit.org/221506@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-04 19:42:28 +00:00
GPUProcess/media/RemoteCDMFactoryProxy.cpp
GPUProcess/media/RemoteCDMInstanceProxy.cpp
GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp
GPUProcess/media/RemoteCDMProxy.cpp
[GPUP] Implement Legacy EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208402 Reviewed by Eric Carlson. Add support for RemoteLegacyCDMFactory, RemateLegacyCDM,RemoteLegacyCDMSession, and all of their associated Proxy objects. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::legacyCdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): (WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: Added. (WebKit::RemoteLegacyCDMFactoryProxy::RemoteLegacyCDMFactoryProxy): (WebKit::RemoteLegacyCDMFactoryProxy::createCDM): (WebKit::RemoteLegacyCDMFactoryProxy::supportsKeySystem): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMSessionMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMSessionMessage): (WebKit::RemoteLegacyCDMFactoryProxy::addProxy): (WebKit::RemoteLegacyCDMFactoryProxy::removeProxy): (WebKit::RemoteLegacyCDMFactoryProxy::addSession): (WebKit::RemoteLegacyCDMFactoryProxy::removeSession): (WebKit::RemoteLegacyCDMFactoryProxy::getSession const): * GPUProcess/media/RemoteLegacyCDMFactoryProxy.h: Added. * GPUProcess/media/RemoteLegacyCDMFactoryProxy.messages.in: Added. * GPUProcess/media/RemoteLegacyCDMProxy.cpp: Added. (WebKit::RemoteLegacyCDMProxy::create): (WebKit::RemoteLegacyCDMProxy::RemoteLegacyCDMProxy): (WebKit::RemoteLegacyCDMProxy::supportsMIMEType): (WebKit::RemoteLegacyCDMProxy::createSession): (WebKit::RemoteLegacyCDMProxy::setPlayerId): (WebKit::RemoteLegacyCDMProxy::cdmMediaPlayer const): * GPUProcess/media/RemoteLegacyCDMProxy.h: Added. (WebKit::RemoteLegacyCDMProxy::factory const): * GPUProcess/media/RemoteLegacyCDMProxy.messages.in: Added. * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: Added. (WebKit::RemoteLegacyCDMSessionProxy::create): (WebKit::RemoteLegacyCDMSessionProxy::RemoteLegacyCDMSessionProxy): (WebKit::convertToUint8Array): (WebKit::convertToOptionalDataReference): (WebKit::RemoteLegacyCDMSessionProxy::generateKeyRequest): (WebKit::RemoteLegacyCDMSessionProxy::releaseKeys): (WebKit::RemoteLegacyCDMSessionProxy::update): (WebKit::RemoteLegacyCDMSessionProxy::getCachedKeyForKeyId): (WebKit::RemoteLegacyCDMSessionProxy::cachedKeyForKeyID): (WebKit::RemoteLegacyCDMSessionProxy::sendMessage): (WebKit::RemoteLegacyCDMSessionProxy::sendError): (WebKit::RemoteLegacyCDMSessionProxy::mediaKeysStorageDirectory const): * GPUProcess/media/RemoteLegacyCDMSessionProxy.h: Added. (WebKit::RemoteLegacyCDMSessionProxy::factory const): (WebKit::RemoteLegacyCDMSessionProxy::session const): (WebKit::RemoteLegacyCDMSessionProxy::setPlayer): * GPUProcess/media/RemoteLegacyCDMSessionProxy.messages.in: Added. * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::getProxy): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const): (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): (WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: * GPUProcess/media/RemoteTextTrackProxy.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::mediaPlayerManager): (WebKit::GPUProcessConnection::legacyCDMFactory): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::setCDM): (WebKit::MediaPlayerPrivateRemote::setCDMSession): (WebKit::MediaPlayerPrivateRemote::mediaPlayerKeyNeeded): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteLegacyCDM.cpp: Added. (WebKit::RemoteLegacyCDM::create): (WebKit::RemoteLegacyCDM::RemoteLegacyCDM): (WebKit::RemoteLegacyCDM::supportsMIMEType): (WebKit::RemoteLegacyCDM::createSession): (WebKit::RemoteLegacyCDM::setPlayerId): * WebProcess/GPU/media/RemoteLegacyCDM.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp: Added. (WebKit::RemoteLegacyCDMFactory::RemoteLegacyCDMFactory): (WebKit::RemoteLegacyCDMFactory::registerFactory): (WebKit::RemoteLegacyCDMFactory::supplementName): (WebKit::RemoteLegacyCDMFactory::gpuProcessConnection): (WebKit::RemoteLegacyCDMFactory::supportsKeySystem): (WebKit::RemoteLegacyCDMFactory::supportsKeySystemAndMimeType): (WebKit::RemoteLegacyCDMFactory::createCDM): (WebKit::RemoteLegacyCDMFactory::addSession): (WebKit::RemoteLegacyCDMFactory::removeSession): (WebKit::RemoteLegacyCDMFactory::findCDM const): (WebKit::RemoteLegacyCDMFactory::didReceiveSessionMessage): * WebProcess/GPU/media/RemoteLegacyCDMFactory.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMIdentifier.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: Added. (WebKit::convertToArrayBuffer): (WebKit::convertToUint8Array): (WebKit::convertToOptionalDataReference): (WebKit::convertToDataReference): (WebKit::RemoteLegacyCDMSession::create): (WebKit::RemoteLegacyCDMSession::RemoteLegacyCDMSession): (WebKit::RemoteLegacyCDMSession::generateKeyRequest): (WebKit::RemoteLegacyCDMSession::releaseKeys): (WebKit::RemoteLegacyCDMSession::update): (WebKit::RemoteLegacyCDMSession::cachedKeyForKeyID const): (WebKit::RemoteLegacyCDMSession::sendMessage): (WebKit::RemoteLegacyCDMSession::sendError): * WebProcess/GPU/media/RemoteLegacyCDMSession.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMSession.messages.in: Added. * WebProcess/GPU/media/RemoteLegacyCDMSessionIdentifier.h: Added. * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::findRemotePlayerId): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::registerLegacyCDMFactories): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: Canonical link: https://commits.webkit.org/221729@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-09 00:34:40 +00:00
GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp
GPUProcess/media/RemoteLegacyCDMProxy.cpp
GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp
[GPUP] Move MediaCapabilities into the GPU process https://bugs.webkit.org/show_bug.cgi?id=219521 Reviewed by Eric Carlson. Source/WebCore: Add encode() and decode() operations to all structs used inside MediaEngineConfigurationFactory. Add the ability for clients to provide their own factories for use in MediaEngineConfigurationFactory. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/MediaCapabilitiesDecodingInfo.h: (WebCore::MediaCapabilitiesDecodingInfo::encode const): (WebCore::MediaCapabilitiesDecodingInfo::decode): * platform/MediaCapabilitiesEncodingInfo.h: (WebCore::MediaCapabilitiesEncodingInfo::encode const): (WebCore::MediaCapabilitiesEncodingInfo::decode): * platform/MediaCapabilitiesInfo.h: (WebCore::MediaCapabilitiesInfo::encode const): (WebCore::MediaCapabilitiesInfo::decode): * platform/mediacapabilities/AudioConfiguration.h: (WebCore::AudioConfiguration::encode const): (WebCore::AudioConfiguration::decode): * platform/mediacapabilities/ColorGamut.h: * platform/mediacapabilities/HdrMetadataType.h: * platform/mediacapabilities/MediaCapabilitiesLogging.h: * platform/mediacapabilities/MediaConfiguration.h: (WebCore::MediaConfiguration::encode const): (WebCore::MediaConfiguration::decode): * platform/mediacapabilities/MediaDecodingConfiguration.h: (WebCore::MediaDecodingConfiguration::encode const): (WebCore::MediaDecodingConfiguration::decode): * platform/mediacapabilities/MediaDecodingType.h: * platform/mediacapabilities/MediaEncodingConfiguration.h: (WebCore::MediaEncodingConfiguration::encode const): (WebCore::MediaEncodingConfiguration::decode): * platform/mediacapabilities/MediaEncodingType.h: * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp: (WebCore::defaultFactories): (WebCore::factories): (WebCore::MediaEngineConfigurationFactory::clearFactories): (WebCore::MediaEngineConfigurationFactory::resetFactories): (WebCore::MediaEngineConfigurationFactory::installFactory): (WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory): (WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory): * platform/mediacapabilities/MediaEngineConfigurationFactory.h: * platform/mediacapabilities/TransferFunction.h: * platform/mediacapabilities/VideoConfiguration.h: (WebCore::VideoConfiguration::encode const): (WebCore::VideoConfiguration::decode): Source/WebKit: Add a new pair of process supplements, RemoteMediaEngineConfigurationFactory and ..Proxy. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::mediaEngineConfigurationFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.cpp: Added. (WebKit::RemoteMediaEngineConfigurationFactoryProxy::RemoteMediaEngineConfigurationFactoryProxy): (WebKit::createDecodingConfiguration): (WebKit::RemoteMediaEngineConfigurationFactoryProxy::createEncodingConfiguration): * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.h: Added. * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.messages.in: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::mediaEngineConfigurationFactory): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp: Added. (WebKit::RemoteMediaEngineConfigurationFactory::RemoteMediaEngineConfigurationFactory): (WebKit::RemoteMediaEngineConfigurationFactory::registerFactory): (WebKit::RemoteMediaEngineConfigurationFactory::supplementName): (WebKit::RemoteMediaEngineConfigurationFactory::gpuProcessConnection): (WebKit::RemoteMediaEngineConfigurationFactory::createDecodingConfiguration): (WebKit::RemoteMediaEngineConfigurationFactory::createEncodingConfiguration): * WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.h: Copied from Source/WTF/wtf/Algorithms.h. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/232140@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-04 22:57:47 +00:00
GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.cpp
GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
GPUProcess/media/RemoteMediaPlayerProxy.cpp
GPUProcess/media/RemoteMediaResource.cpp
GPUProcess/media/RemoteMediaResourceLoader.cpp
GPUProcess/media/RemoteMediaResourceManager.cpp
[Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process https://bugs.webkit.org/show_bug.cgi?id=218912 Reviewed by Eric Carlson. Source/WebCore: This patch makes the MSE version of MediaPlayer::load() the same as the one in MediaPlayerPrivate to support running MSE MediaPlayerPrivate(s) in the GPU process. No new tests, no functional change yet. * Headers.cmake: * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::createSourceBufferPrivate): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): * WebCore.xcodeproj/project.pbxproj: * platform/ContentType.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/MediaSourcePrivate.h: * platform/graphics/SourceBufferPrivateClient.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::load): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::load): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::addSourceBuffer): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::load): * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::append): Source/WebKit: Add MediaSourcePrivateRemote/RemoteMediaSourceProxy and SourceBufferPrivateRemote/RemoteSourceBufferProxy, and setup IPC connections for them. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcessSessionParameters.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::loadMediaSource): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteMediaSourceProxy.cpp: Added. (WebKit::RemoteMediaSourceProxy::RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::~RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::setPrivateAndOpen): (WebKit::RemoteMediaSourceProxy::duration const): (WebKit::RemoteMediaSourceProxy::buffered const): (WebKit::RemoteMediaSourceProxy::seekToTime): (WebKit::RemoteMediaSourceProxy::monitorSourceBuffers): (WebKit::RemoteMediaSourceProxy::setLogIdentifier): (WebKit::RemoteMediaSourceProxy::failedToCreateRenderer): (WebKit::RemoteMediaSourceProxy::addSourceBuffer): * GPUProcess/media/RemoteMediaSourceProxy.h: Added. * GPUProcess/media/RemoteMediaSourceProxy.messages.in: Added. * GPUProcess/media/RemoteSourceBufferIdentifier.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.cpp: Added. (WebKit::RemoteSourceBufferProxy::create): (WebKit::RemoteSourceBufferProxy::RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::~RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError): (WebKit::RemoteSourceBufferProxy::append): * GPUProcess/media/RemoteSourceBufferProxy.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.messages.in: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::load): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: Added. (WebKit::MediaSourcePrivateRemote::create): (WebKit::MediaSourcePrivateRemote::MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::~MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::durationChanged): (WebKit::MediaSourcePrivateRemote::markEndOfStream): (WebKit::MediaSourcePrivateRemote::unmarkEndOfStream): (WebKit::MediaSourcePrivateRemote::readyState const): (WebKit::MediaSourcePrivateRemote::setReadyState): (WebKit::MediaSourcePrivateRemote::waitForSeekCompleted): (WebKit::MediaSourcePrivateRemote::seekCompleted): (WebKit::MediaSourcePrivateRemote::logChannel const): * WebProcess/GPU/media/MediaSourcePrivateRemote.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaSourceIdentifier.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: Added. (WebKit::SourceBufferPrivateRemote::create): (WebKit::SourceBufferPrivateRemote::SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::~SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::setClient): (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::abort): (WebKit::SourceBufferPrivateRemote::resetParserState): (WebKit::SourceBufferPrivateRemote::removedFromMediaSource): (WebKit::SourceBufferPrivateRemote::readyState const): (WebKit::SourceBufferPrivateRemote::setReadyState): (WebKit::SourceBufferPrivateRemote::flush): (WebKit::SourceBufferPrivateRemote::enqueueSample): (WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::setActive): (WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): (WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::canSwitchToType): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete): (WebKit::SourceBufferPrivateRemote::logChannel const): * WebProcess/GPU/media/SourceBufferPrivateRemote.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: Added. Canonical link: https://commits.webkit.org/231660@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 17:25:27 +00:00
GPUProcess/media/RemoteMediaSourceProxy.cpp
[Cocoa][GPUP] Move RemoteCommandListener into the GPU Process https://bugs.webkit.org/show_bug.cgi?id=221732 Reviewed by Eric Carlson. Source/WebCore: Refactor RemoteCommandListener to allow its methods to work over XPC: - Rather than having a synchronous client method to query whether seeking is supported, require clients to set seekability explicitly. - Change the RemoteCommandArgument from a union to an Optional<double>. - Allow clients to query the MediaPlaybackTarget through the session rather than wait for a notification that the playback target changed. Additionally, add a mini-factory functionality to RemoteCommandListener to allow clients to specify a different subclass to be created at runtime. * Modules/webaudio/AudioContext.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::didReceiveRemoteControlCommand): * html/MediaElementSession.h: * platform/NowPlayingManager.cpp: (WebCore::NowPlayingManager::didReceiveRemoteControlCommand): (WebCore::NowPlayingManager::setNowPlayingInfo): (WebCore::NowPlayingManager::supportsSeeking const): Deleted. * platform/NowPlayingManager.h: * platform/RemoteCommandListener.cpp: (WebCore::remoteCommandListenerCreationFunction): (WebCore::RemoteCommandListener::setCreationFunction): (WebCore::RemoteCommandListener::resetCreationFunction): (WebCore::RemoteCommandListener::create): (WebCore::RemoteCommandListener::RemoteCommandListener): (WebCore::RemoteCommandListener::setSupportsSeeking): * platform/RemoteCommandListener.h: (WebCore::RemoteCommandListener::RemoteCommandListener): Deleted. (WebCore::RemoteCommandListener::updateSupportedCommands): Deleted. (WebCore::RemoteCommandListener::client const): Deleted. * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): * platform/audio/PlatformMediaSession.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::processDidReceiveRemoteControlCommand): * platform/audio/PlatformMediaSessionManager.h: * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::scheduleSessionStatusUpdate): * platform/audio/ios/MediaSessionHelperIOS.h: * platform/audio/ios/MediaSessionHelperIOS.mm: (MediaSessionHelperiOS::activeVideoRouteDidChange): * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): * platform/ios/RemoteCommandListenerIOS.h: * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListenerIOS::create): (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): (WebCore::RemoteCommandListenerIOS::updateSupportedCommands): (WebCore::RemoteCommandListener::create): Deleted. * platform/mac/RemoteCommandListenerMac.h: * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListenerMac::create): (WebCore::RemoteCommandListenerMac::updateSupportedCommands): (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): (WebCore::RemoteCommandListener::create): Deleted. * testing/Internals.cpp: (WebCore::Internals::postRemoteControlCommand): Source/WebKit: Add a new Remote/Proxy class pair to facilitate RemoteCommandListener being created in the GPU Process. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createRemoteCommandListener): (WebKit::GPUConnectionToWebProcess::releaseRemoteCommandListener): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/media/RemoteRemoteCommandListenerProxy.cpp: (WebKit::RemoteRemoteCommandListenerProxy::RemoteRemoteCommandListenerProxy): (WebKit::RemoteRemoteCommandListenerProxy::didReceiveRemoteControlCommand): (WebKit::RemoteRemoteCommandListenerProxy::updateSupportedCommands): * GPUProcess/media/RemoteRemoteCommandListenerProxy.h: * GPUProcess/media/RemoteRemoteCommandListenerProxy.messages.in: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveRemoteCommand): * WebProcess/GPU/media/RemoteRemoteCommandListener.cpp: Added. (WebKit::RemoteRemoteCommandListener::create): (WebKit::RemoteRemoteCommandListener::RemoteRemoteCommandListener): (WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener): (WebKit::RemoteRemoteCommandListener::gpuProcessConnectionDidClose): (WebKit::RemoteRemoteCommandListener::didReceiveRemoteControlCommand): * WebProcess/GPU/media/RemoteRemoteCommandListener.h: * WebProcess/GPU/media/RemoteRemoteCommandListener.messages.in: * WebProcess/GPU/media/RemoteRemoteCommandListenerIdentifier.h: * WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp: (WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange): * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/233988@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-11 21:49:12 +00:00
GPUProcess/media/RemoteRemoteCommandListenerProxy.cpp
[Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process https://bugs.webkit.org/show_bug.cgi?id=218912 Reviewed by Eric Carlson. Source/WebCore: This patch makes the MSE version of MediaPlayer::load() the same as the one in MediaPlayerPrivate to support running MSE MediaPlayerPrivate(s) in the GPU process. No new tests, no functional change yet. * Headers.cmake: * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::createSourceBufferPrivate): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): * WebCore.xcodeproj/project.pbxproj: * platform/ContentType.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/MediaSourcePrivate.h: * platform/graphics/SourceBufferPrivateClient.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::load): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::load): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::addSourceBuffer): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::load): * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::append): Source/WebKit: Add MediaSourcePrivateRemote/RemoteMediaSourceProxy and SourceBufferPrivateRemote/RemoteSourceBufferProxy, and setup IPC connections for them. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcessSessionParameters.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::loadMediaSource): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteMediaSourceProxy.cpp: Added. (WebKit::RemoteMediaSourceProxy::RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::~RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::setPrivateAndOpen): (WebKit::RemoteMediaSourceProxy::duration const): (WebKit::RemoteMediaSourceProxy::buffered const): (WebKit::RemoteMediaSourceProxy::seekToTime): (WebKit::RemoteMediaSourceProxy::monitorSourceBuffers): (WebKit::RemoteMediaSourceProxy::setLogIdentifier): (WebKit::RemoteMediaSourceProxy::failedToCreateRenderer): (WebKit::RemoteMediaSourceProxy::addSourceBuffer): * GPUProcess/media/RemoteMediaSourceProxy.h: Added. * GPUProcess/media/RemoteMediaSourceProxy.messages.in: Added. * GPUProcess/media/RemoteSourceBufferIdentifier.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.cpp: Added. (WebKit::RemoteSourceBufferProxy::create): (WebKit::RemoteSourceBufferProxy::RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::~RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError): (WebKit::RemoteSourceBufferProxy::append): * GPUProcess/media/RemoteSourceBufferProxy.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.messages.in: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::load): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: Added. (WebKit::MediaSourcePrivateRemote::create): (WebKit::MediaSourcePrivateRemote::MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::~MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::durationChanged): (WebKit::MediaSourcePrivateRemote::markEndOfStream): (WebKit::MediaSourcePrivateRemote::unmarkEndOfStream): (WebKit::MediaSourcePrivateRemote::readyState const): (WebKit::MediaSourcePrivateRemote::setReadyState): (WebKit::MediaSourcePrivateRemote::waitForSeekCompleted): (WebKit::MediaSourcePrivateRemote::seekCompleted): (WebKit::MediaSourcePrivateRemote::logChannel const): * WebProcess/GPU/media/MediaSourcePrivateRemote.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaSourceIdentifier.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: Added. (WebKit::SourceBufferPrivateRemote::create): (WebKit::SourceBufferPrivateRemote::SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::~SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::setClient): (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::abort): (WebKit::SourceBufferPrivateRemote::resetParserState): (WebKit::SourceBufferPrivateRemote::removedFromMediaSource): (WebKit::SourceBufferPrivateRemote::readyState const): (WebKit::SourceBufferPrivateRemote::setReadyState): (WebKit::SourceBufferPrivateRemote::flush): (WebKit::SourceBufferPrivateRemote::enqueueSample): (WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::setActive): (WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): (WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::canSwitchToType): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete): (WebKit::SourceBufferPrivateRemote::logChannel const): * WebProcess/GPU/media/SourceBufferPrivateRemote.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: Added. Canonical link: https://commits.webkit.org/231660@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 17:25:27 +00:00
GPUProcess/media/RemoteSourceBufferProxy.cpp
Support in-band VTT captions when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=207467 <rdar://problem/59312749> Reviewed by Jer Noble. Source/WebCore: No new tests, existing tests enabled in GPU process. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::nextAudioNodeLogIdentifier): (WebCore::AudioContext::nextAudioParameterLogIdentifier): * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::willRemove): (WebCore::AudioTrack::setMediaElement): (WebCore::AudioTrack::setLogger): * html/track/AudioTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parseWebVTTCueData): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::toPrivate): (WebCore::InbandTextTrack::updateKindFromPrivate): (WebCore::InbandTextTrack::setLogger): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): * html/track/InbandWebVTTTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::setKind): (WebCore::TextTrack::setMode): (WebCore::TextTrack::removeAllCues): (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (WTF::LogArgument<WebCore::TextTrack::Kind>::toString): (WTF::LogArgument<WebCore::TextTrack::Mode>::toString): * html/track/TrackBase.cpp: (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::setLogger): (WebCore::nextLogIdentifier): Deleted. * html/track/TrackBase.h: * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setMediaElement): (WebCore::VideoTrack::setLogger): * html/track/VideoTrack.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::kind const): (WebCore::InbandTextTrackPrivate::cueFormat const): (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/MediaPlayerEnums.h: * platform/graphics/TrackPrivateBase.cpp: (WebCore::TrackPrivateBase::setLogger): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: (WebCore::InbandTextTrackPrivateAVFObjC::kind const): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF): * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::ISOWebVTTCue): * platform/graphics/iso/ISOVTTCue.h: * platform/mock/mediasource/MockTracks.h: (WebCore::MockTextTrackPrivate::MockTextTrackPrivate): Source/WebKit: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/media/RemoteAudioTrackProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack): (WebKit::RemoteMediaPlayerProxy::textTrackRepresentationBoundsChanged): (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: Added. (WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy): (WebKit::RemoteTextTrackProxy::configuration): (WebKit::RemoteTextTrackProxy::configurationChanged): (WebKit::RemoteTextTrackProxy::willRemove): (WebKit::RemoteTextTrackProxy::idChanged): (WebKit::RemoteTextTrackProxy::labelChanged): (WebKit::RemoteTextTrackProxy::languageChanged): (WebKit::RemoteTextTrackProxy::addDataCue): (WebKit::RemoteTextTrackProxy::updateDataCue): (WebKit::RemoteTextTrackProxy::removeDataCue): (WebKit::RemoteTextTrackProxy::addGenericCue): (WebKit::RemoteTextTrackProxy::updateGenericCue): (WebKit::RemoteTextTrackProxy::removeGenericCue): (WebKit::RemoteTextTrackProxy::parseWebVTTFileHeader): (WebKit::RemoteTextTrackProxy::parseWebVTTCueData): * GPUProcess/media/RemoteTextTrackProxy.h: Copied from Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h. * GPUProcess/media/RemoteVideoTrackProxy.h: * GPUProcess/media/TextTrackPrivateRemoteConfiguration.h: Added. (WebKit::TextTrackPrivateRemoteConfiguration::encode const): (WebKit::TextTrackPrivateRemoteConfiguration::decode): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: (WebKit::RemoteSampleBufferDisplayLayerManager::createLayer): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::remoteTextTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::parseWebVTTFileHeader): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueData): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Added. (WebKit::TextTrackPrivateRemote::TextTrackPrivateRemote): (WebKit::TextTrackPrivateRemote::setMode): (WebKit::TextTrackPrivateRemote::updateConfiguration): (WebKit::TextTrackPrivateRemote::addDataCue): (WebKit::TextTrackPrivateRemote::updateDataCue): (WebKit::TextTrackPrivateRemote::removeDataCue): (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): (WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader): (WebKit::TextTrackPrivateRemote::parseWebVTTCueData): (WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/TextTrackPrivateRemote.h: Added. * WebProcess/GPU/media/TextTrackPrivateRemote.messages.in: Added. Source/WTF: * wtf/LoggerHelper.h: (WTF::LoggerHelper::childLogIdentifier const): LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/220550@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-11 21:37:58 +00:00
GPUProcess/media/RemoteTextTrackProxy.cpp
Expose video tracks for media files in the GPUProcess https://bugs.webkit.org/show_bug.cgi?id=206209 <rdar://problem/58553026> Reviewed by Jer Noble. Source/WebCore: No new tests, un-skipped existing tests that pass because of this change. * platform/graphics/VideoTrackPrivate.h: Source/WebKit: * GPUProcess/media/RemoteAudioTrackProxy.cpp: (WebKit::RemoteAudioTrackProxy::configuration): * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::videoTrackSetSelected): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveVideoTrack): (WebKit::RemoteMediaPlayerProxy::videoTrackSetSelected): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp. (WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::configuration): (WebKit::RemoteVideoTrackProxy::configurationChanged): (WebKit::RemoteVideoTrackProxy::willRemove): (WebKit::RemoteVideoTrackProxy::selectedChanged): (WebKit::RemoteVideoTrackProxy::idChanged): (WebKit::RemoteVideoTrackProxy::labelChanged): (WebKit::RemoteVideoTrackProxy::languageChanged): * GPUProcess/media/RemoteVideoTrackProxy.h: Added. * GPUProcess/media/TrackPrivateRemoteConfiguration.h: (WebKit::TrackPrivateRemoteConfiguration::encode const): (WebKit::TrackPrivateRemoteConfiguration::decode): * NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: (WebKit::AudioTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteVideoTrack): (WebKit::MediaPlayerPrivateRemote::remoteVideoTrackConfigurationChanged): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::addRemoteVideoTrack): (WebKit::RemoteMediaPlayerManager::removeRemoteVideoTrack): (WebKit::RemoteMediaPlayerManager::remoteVideoTrackConfigurationChanged): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in: * WebProcess/GPU/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp. (WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::configuration): (WebKit::RemoteVideoTrackProxy::configurationChanged): (WebKit::RemoteVideoTrackProxy::willRemove): (WebKit::RemoteVideoTrackProxy::selectedChanged): (WebKit::RemoteVideoTrackProxy::idChanged): (WebKit::RemoteVideoTrackProxy::labelChanged): (WebKit::RemoteVideoTrackProxy::languageChanged): * WebProcess/GPU/media/RemoteVideoTrackProxy.h: Added. * WebProcess/GPU/media/VideoTrackPrivateRemote.cpp: Copied from Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp. (WebKit::VideoTrackPrivateRemote::VideoTrackPrivateRemote): (WebKit::VideoTrackPrivateRemote::setSelected): (WebKit::VideoTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/VideoTrackPrivateRemote.h: Added. (WebKit::VideoTrackPrivateRemote::create): LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/219314@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-14 08:16:00 +00:00
GPUProcess/media/RemoteVideoTrackProxy.cpp
Implement the remote RenderingBackend https://bugs.webkit.org/show_bug.cgi?id=207198 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-26 Reviewed by Simon Fraser. Source/WebCore: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer const): Make HTMLCanvasElement be able to create a remote ImageBuffer. Source/WebKit: RemoteRenderingBackend and RemoteRenderingBackendProxy will be responsible for creating the two parts of the ImageBuffer: RemoteImageBuffer and RemoteImageBufferProxy. They will also be responsible for sending and receiving the messages for the remote the ImageBuffers. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createRenderingBackend): (WebKit::GPUConnectionToWebProcess::releaseRenderingBackend): (WebKit::GPUConnectionToWebProcess::dispatchMessage): (WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): Deleted. (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): Deleted. * GPUProcess/GPUConnectionToWebProcess.h: (WebKit::GPUConnectionToWebProcess::messageReceiverMap): (WebKit::GPUConnectionToWebProcess::webProcessIdentifier const): GPUConnectionToWebProcess dispatches messages to RemoteRenderingBackendProxy. * GPUProcess/GPUConnectionToWebProcess.messages.in: Adding the 'WantsDispatchMessage' attribute will force the messages.py to generate code which calls dispatchMessage() and didReceiveSyncMessage() when messages are received. * GPUProcess/graphics: Added. * GPUProcess/graphics/RemoteRenderingBackendProxy.cpp: Added. (WebKit::RemoteRenderingBackendProxy::create): (WebKit::RemoteRenderingBackendProxy::RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::messageSenderConnection const): (WebKit::RemoteRenderingBackendProxy::messageSenderDestinationID const): (WebKit::RemoteRenderingBackendProxy::createImageBuffer): (WebKit::RemoteRenderingBackendProxy::releaseImageBuffer): * GPUProcess/graphics/RemoteRenderingBackendProxy.h: Added. * GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in: Added. RemoteRenderingBackendProxy is responsible for creating the remote ImageBuffer proxy in the GPUProcess side. It holds it in a HashMap of std::unique_ptr<ImageBuffer> indexed by the ImageBufferIdentifier. * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: * GPUProcess/webrtc/RemoteMediaRecorder.cpp: * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: Unified sources gardening. * Scripts/webkit/messages.py: Handle 'WantsDispatchMessage' attribute. * Shared/WebCoreArgumentCoders.h: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::dispatchMessage): (WebKit::GPUProcessConnection::dispatchSyncMessage): (WebKit::GPUProcessConnection::didReceiveMessage): Deleted. * WebProcess/GPU/GPUProcessConnection.h: (WebKit::GPUProcessConnection::messageReceiverMap): * WebProcess/GPU/GPUProcessConnection.messages.in: GPUConnection dispatches messages to RemoteRenderingBackend. * WebProcess/GPU/graphics: Added. * WebProcess/GPU/graphics/ImageBufferIdentifier.h: Added. * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: Added. (WebKit::RemoteRenderingBackend::create): (WebKit::RemoteRenderingBackend::RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::~RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::messageSenderConnection const): (WebKit::RemoteRenderingBackend::messageSenderDestinationID const): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::releaseImageBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackend.h: Added. * WebProcess/GPU/graphics/RemoteRenderingBackend.messages.in: Added. * WebProcess/GPU/graphics/RenderingBackendIdentifier.h: Added. RemoteRenderingBackend is responsible for creating the remote ImageBuffer in the WebProcess side. It holds it in a HashMap of ImageBuffer* indexed by the ImageBufferIdentifier. * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Unified sources gardening. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createDisplayRefreshMonitor const): (WebKit::WebChromeClient::createImageBuffer const): * WebProcess/WebCoreSupport/WebChromeClient.h: Create the remote ImageBuffer. Canonical link: https://commits.webkit.org/221230@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
PCM: Change from ad-click-attribution to private-click-measurement (in all forms, including .well-known URL) https://bugs.webkit.org/show_bug.cgi?id=218730 <rdar://problem/71094296> Reviewed by Alex Christensen. Change to the official name of the proposed standard Private Click Measurement https://github.com/privacycg/private-click-measurement. This includes a change of the reporting URL from "/.well-known/ad-click-attribution/" to "/.well-known/private-click-measurement/". Source/JavaScriptCore: * inspector/ConsoleMessage.cpp: (Inspector::messageSourceValue): * inspector/protocol/Console.json: * inspector/protocol/Page.json: * runtime/ConsoleClient.cpp: (JSC::appendMessagePrefix): * runtime/ConsoleTypes.h: Source/WebCore: Tests: http/tests/contentextensions/block-private-click-measurement.html http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html http/tests/privateClickMeasurement/clear-through-website-data-removal.html http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html http/tests/privateClickMeasurement/expired-attributions-removed.html http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html http/tests/privateClickMeasurement/send-attribution-conversion-request.html http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html http/tests/privateClickMeasurement/store-private-click-measurement.html inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const): (WebCore::HTMLAnchorElement::handleClick): (WebCore::HTMLAnchorElement::parseAdClickAttribution const): Deleted. * html/HTMLAnchorElement.h: * html/HTMLAnchorElement.idl: * inspector/InspectorClient.h: * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::overrideSetting): * inspector/agents/page/PageConsoleAgent.cpp: (WebCore::PageConsoleAgent::getLoggingChannels): * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): (WebCore::FrameLoader::loadFrameRequest): (WebCore::FrameLoader::loadURL): * loader/FrameLoader.h: * loader/NavigationAction.h: (WebCore::NavigationAction::privateClickMeasurement const): (WebCore::NavigationAction::setPrivateClickMeasurement): (WebCore::NavigationAction::adClickAttribution const): Deleted. (WebCore::NavigationAction::setAdClickAttribution): Deleted. * loader/PrivateClickMeasurement.cpp: Renamed from Source/WebCore/loader/AdClickAttribution.cpp. (WebCore::PrivateClickMeasurement::isValid const): (WebCore::PrivateClickMeasurement::parseConversionRequest): (WebCore::PrivateClickMeasurement::convertAndGetEarliestTimeToSend): (WebCore::PrivateClickMeasurement::markAsExpired): (WebCore::PrivateClickMeasurement::hasExpired const): (WebCore::PrivateClickMeasurement::hasHigherPriorityThan const): (WebCore::PrivateClickMeasurement::reportURL const): (WebCore::PrivateClickMeasurement::json const): (WebCore::PrivateClickMeasurement::markConversionAsSent): (WebCore::PrivateClickMeasurement::wasConversionSent const): (WebCore::PrivateClickMeasurement::toString const): (WebCore::PrivateClickMeasurement::debugModeEnabled): * loader/PrivateClickMeasurement.h: Renamed from Source/WebCore/loader/AdClickAttribution.h. (WebCore::PrivateClickMeasurement::Campaign::Campaign): (WebCore::PrivateClickMeasurement::Campaign::isValid const): (WebCore::PrivateClickMeasurement::Source::Source): (WebCore::PrivateClickMeasurement::Source::operator== const): (WebCore::PrivateClickMeasurement::Source::matches const): (WebCore::PrivateClickMeasurement::Source::isHashTableDeletedValue const): (WebCore::PrivateClickMeasurement::Source::deletedValue): (WebCore::PrivateClickMeasurement::Source::constructDeletedValue): (WebCore::PrivateClickMeasurement::Source::deleteValue): (WebCore::PrivateClickMeasurement::Source::isDeletedValue const): (WebCore::PrivateClickMeasurement::SourceHash::hash): (WebCore::PrivateClickMeasurement::SourceHash::equal): (WebCore::PrivateClickMeasurement::Destination::Destination): (WebCore::PrivateClickMeasurement::Destination::operator== const): (WebCore::PrivateClickMeasurement::Destination::matches const): (WebCore::PrivateClickMeasurement::Destination::isHashTableDeletedValue const): (WebCore::PrivateClickMeasurement::Destination::deletedValue): (WebCore::PrivateClickMeasurement::Destination::constructDeletedValue): (WebCore::PrivateClickMeasurement::Destination::deleteValue): (WebCore::PrivateClickMeasurement::Destination::isDeletedValue const): (WebCore::PrivateClickMeasurement::DestinationHash::hash): (WebCore::PrivateClickMeasurement::DestinationHash::equal): (WebCore::PrivateClickMeasurement::Priority::Priority): (WebCore::PrivateClickMeasurement::Conversion::Conversion): (WebCore::PrivateClickMeasurement::Conversion::isValid const): (WebCore::PrivateClickMeasurement::PrivateClickMeasurement): (WebCore::PrivateClickMeasurement::source const): (WebCore::PrivateClickMeasurement::destination const): (WebCore::PrivateClickMeasurement::earliestTimeToSend const): (WebCore::PrivateClickMeasurement::isEmpty const): (WebCore::PrivateClickMeasurement::encode const): (WebCore::PrivateClickMeasurement::decode): (WebCore::PrivateClickMeasurement::Conversion::encode const): (WebCore::PrivateClickMeasurement::Conversion::decode): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::emptyValue): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::constructDeletedValue): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Source>::isDeletedValue): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::emptyValue): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::constructDeletedValue): (WTF::HashTraits<WebCore::PrivateClickMeasurement::Destination>::isDeletedValue): * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::privateClickMeasurementDebugModeEnabled const): (WebCore::RuntimeEnabledFeatures::setPrivateClickMeasurementDebugModeEnabled): (WebCore::RuntimeEnabledFeatures::adClickAttributionDebugModeEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setAdClickAttributionDebugModeEnabled): Deleted. * platform/Logging.h: Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: * UserInterface/Models/ConsoleMessage.js: * UserInterface/Models/IssueMessage.js: (WI.IssueMessage): * UserInterface/Protocol/Legacy/14.0/InspectorBackendCommands.js: Source/WebKit: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::setPrivateClickMeasurementDebugMode): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::storePrivateClickMeasurement): (WebKit::NetworkProcess::dumpPrivateClickMeasurement): (WebKit::NetworkProcess::clearPrivateClickMeasurement): (WebKit::NetworkProcess::setPrivateClickMeasurementOverrideTimerForTesting): (WebKit::NetworkProcess::setPrivateClickMeasurementConversionURLForTesting): (WebKit::NetworkProcess::markPrivateClickMeasurementsAsExpiredForTesting): (WebKit::NetworkProcess::setAdClickAttributionDebugMode): Deleted. (WebKit::NetworkProcess::storeAdClickAttribution): Deleted. (WebKit::NetworkProcess::dumpAdClickAttribution): Deleted. (WebKit::NetworkProcess::clearAdClickAttribution): Deleted. (WebKit::NetworkProcess::setAdClickAttributionOverrideTimerForTesting): Deleted. (WebKit::NetworkProcess::setAdClickAttributionConversionURLForTesting): Deleted. (WebKit::NetworkProcess::markAdClickAttributionsAsExpiredForTesting): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRedirectedRequest): (WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest): * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::storePrivateClickMeasurement): (WebKit::NetworkSession::handlePrivateClickMeasurementConversion): (WebKit::NetworkSession::dumpPrivateClickMeasurement): (WebKit::NetworkSession::clearPrivateClickMeasurement): (WebKit::NetworkSession::clearPrivateClickMeasurementForRegistrableDomain): (WebKit::NetworkSession::setPrivateClickMeasurementOverrideTimerForTesting): (WebKit::NetworkSession::setPrivateClickMeasurementConversionURLForTesting): (WebKit::NetworkSession::markPrivateClickMeasurementsAsExpiredForTesting): (WebKit::NetworkSession::storeAdClickAttribution): Deleted. (WebKit::NetworkSession::handleAdClickAttributionConversion): Deleted. (WebKit::NetworkSession::dumpAdClickAttribution): Deleted. (WebKit::NetworkSession::clearAdClickAttribution): Deleted. (WebKit::NetworkSession::clearAdClickAttributionForRegistrableDomain): Deleted. (WebKit::NetworkSession::setAdClickAttributionOverrideTimerForTesting): Deleted. (WebKit::NetworkSession::setAdClickAttributionConversionURLForTesting): Deleted. (WebKit::NetworkSession::markAdClickAttributionsAsExpiredForTesting): Deleted. * NetworkProcess/NetworkSession.h: * NetworkProcess/PrivateClickMeasurementManager.cpp: Renamed from Source/WebKit/NetworkProcess/AdClickAttributionManager.cpp. (WebKit::PrivateClickMeasurementManager::storeUnconverted): (WebKit::PrivateClickMeasurementManager::handleConversion): (WebKit::PrivateClickMeasurementManager::startTimer): (WebKit::PrivateClickMeasurementManager::convert): (WebKit::PrivateClickMeasurementManager::fireConversionRequest): (WebKit::PrivateClickMeasurementManager::firePendingConversionRequests): (WebKit::PrivateClickMeasurementManager::clear): (WebKit::PrivateClickMeasurementManager::clearForRegistrableDomain): (WebKit::PrivateClickMeasurementManager::clearExpired): (WebKit::PrivateClickMeasurementManager::toString const): (WebKit::PrivateClickMeasurementManager::setConversionURLForTesting): (WebKit::PrivateClickMeasurementManager::markAllUnconvertedAsExpiredForTesting): (WebKit::PrivateClickMeasurementManager::debugModeEnabled const): * NetworkProcess/PrivateClickMeasurementManager.h: Renamed from Source/WebKit/NetworkProcess/AdClickAttributionManager.h. (WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager): (WebKit::PrivateClickMeasurementManager::m_sessionID): (WebKit::PrivateClickMeasurementManager::setPingLoadFunction): (WebKit::PrivateClickMeasurementManager::setOverrideTimerForTesting): * Platform/Logging.h: * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::encode const): (WebKit::NavigationActionData::decode): * Shared/NavigationActionData.h: * Shared/WebsiteData/WebsiteData.cpp: (WebKit::WebsiteData::ownerProcess): * Shared/WebsiteData/WebsiteDataType.h: * Sources.txt: * UIProcess/API/APINavigation.h: (API::Navigation::privateClickMeasurement const): (API::Navigation::adClickAttribution const): Deleted. * UIProcess/API/C/WKPage.cpp: (WKPageDumpPrivateClickMeasurement): (WKPageClearPrivateClickMeasurement): (WKPageSetPrivateClickMeasurementOverrideTimerForTesting): (WKPageSetPrivateClickMeasurementConversionURLForTesting): (WKPageMarkPrivateClickMeasurementsAsExpiredForTesting): (WKPageDumpAdClickAttribution): Deleted. (WKPageClearAdClickAttribution): Deleted. (WKPageSetAdClickAttributionOverrideTimerForTesting): Deleted. (WKPageSetAdClickAttributionConversionURLForTesting): Deleted. (WKPageMarkAdClickAttributionsAsExpiredForTesting): Deleted. * UIProcess/API/C/WKPagePrivate.h: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval): (WKWebsiteDataStoreClearAdClickAttributionsThroughWebsiteDataRemoval): Deleted. * UIProcess/API/C/WKWebsiteDataStoreRef.h: * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: (dataTypesToString): _WKWebsiteDataTypeAdClickAttributions still supported. _WKWebsiteDataTypePrivateClickMeasurements added. * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h: (WebKit::toWebsiteDataType): _WKWebsiteDataTypeAdClickAttributions still supported and mapped to WebsiteDataType::PrivateClickMeasurements. (WebKit::toWKWebsiteDataTypes): * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: _WKWebsiteDataTypeAdClickAttributions still supported. _WKWebsiteDataTypePrivateClickMeasurements added. * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: _WKWebsiteDataTypeAdClickAttributions still supported. _WKWebsiteDataTypePrivateClickMeasurements added. (+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::setDeveloperPreferenceOverride): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::setPrivateClickMeasurementDebugMode): (WebKit::NetworkProcessProxy::setAdClickAttributionDebugMode): Deleted. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::createNewPage): (WebKit::WebPageProxy::dumpPrivateClickMeasurement): (WebKit::WebPageProxy::clearPrivateClickMeasurement): (WebKit::WebPageProxy::setPrivateClickMeasurementOverrideTimerForTesting): (WebKit::WebPageProxy::setPrivateClickMeasurementConversionURLForTesting): (WebKit::WebPageProxy::markPrivateClickMeasurementsAsExpiredForTesting): (WebKit::WebPageProxy::dumpAdClickAttribution): Deleted. (WebKit::WebPageProxy::clearAdClickAttribution): Deleted. (WebKit::WebPageProxy::setAdClickAttributionOverrideTimerForTesting): Deleted. (WebKit::WebPageProxy::setAdClickAttributionConversionURLForTesting): Deleted. (WebKit::WebPageProxy::markAdClickAttributionsAsExpiredForTesting): Deleted. * UIProcess/WebPageProxy.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::setPrivateClickMeasurementDebugMode): (WebKit::WebsiteDataStore::setAdClickAttributionDebugMode): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Source/WebKitLegacy/mac: * WebCoreSupport/WebChromeClient.mm: (stringForMessageSource): * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences privateClickMeasurementEnabled]): (-[WebPreferences setPrivateClickMeasurementEnabled:]): (-[WebPreferences adClickAttributionEnabled]): Deleted. (-[WebPreferences setAdClickAttributionEnabled:]): Deleted. * WebView/WebPreferencesPrivate.h: Source/WTF: * Scripts/Preferences/WebPreferencesExperimental.yaml: Tools: * DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::defaults): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp: Removed. * TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: Added. (TestWebKitAPI::TEST): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::dumpPrivateClickMeasurement): (WTR::TestRunner::clearPrivateClickMeasurement): (WTR::TestRunner::clearPrivateClickMeasurementsThroughWebsiteDataRemoval): (WTR::TestRunner::setPrivateClickMeasurementOverrideTimerForTesting): (WTR::TestRunner::setPrivateClickMeasurementConversionURLForTesting): (WTR::TestRunner::markPrivateClickMeasurementsAsExpiredForTesting): (WTR::TestRunner::dumpAdClickAttribution): Deleted. (WTR::TestRunner::clearAdClickAttribution): Deleted. (WTR::TestRunner::clearAdClickAttributionsThroughWebsiteDataRemoval): Deleted. (WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting): Deleted. (WTR::TestRunner::setAdClickAttributionConversionURLForTesting): Deleted. (WTR::TestRunner::markAdClickAttributionsAsExpiredForTesting): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): (WTR::PrivateClickMeasurementStringResultCallbackContext::PrivateClickMeasurementStringResultCallbackContext): (WTR::privateClickMeasurementStringResultCallback): (WTR::TestController::dumpPrivateClickMeasurement): (WTR::PrivateClickMeasurementVoidCallbackContext::PrivateClickMeasurementVoidCallbackContext): (WTR::privateClickMeasurementVoidCallback): (WTR::TestController::clearPrivateClickMeasurement): (WTR::TestController::clearPrivateClickMeasurementsThroughWebsiteDataRemoval): (WTR::TestController::setPrivateClickMeasurementOverrideTimerForTesting): (WTR::TestController::setPrivateClickMeasurementConversionURLForTesting): (WTR::TestController::markPrivateClickMeasurementsAsExpiredForTesting): (WTR::AdClickAttributionStringResultCallbackContext::AdClickAttributionStringResultCallbackContext): Deleted. (WTR::adClickAttributionStringResultCallback): Deleted. (WTR::TestController::dumpAdClickAttribution): Deleted. (WTR::AdClickAttributionVoidCallbackContext::AdClickAttributionVoidCallbackContext): Deleted. (WTR::adClickAttributionVoidCallback): Deleted. (WTR::TestController::clearAdClickAttribution): Deleted. (WTR::TestController::clearAdClickAttributionsThroughWebsiteDataRemoval): Deleted. (WTR::TestController::setAdClickAttributionOverrideTimerForTesting): Deleted. (WTR::TestController::setAdClickAttributionConversionURLForTesting): Deleted. (WTR::TestController::markAdClickAttributionsAsExpiredForTesting): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::dumpResults): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::dumpPrivateClickMeasurement): (WTR::TestInvocation::dumpAdClickAttribution): Deleted. * WebKitTestRunner/TestInvocation.h: LayoutTests: * TestExpectations: * http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect-expected.txt: Removed. * http/tests/adClickAttribution/expired-attributions-removed-expected.txt: Removed. * http/tests/adClickAttribution/resources/redirectToConversionOnIPAddress.php: Removed. * http/tests/adClickAttribution/store-ad-click-attribution-expected.txt: Removed. * http/tests/adClickAttribution/store-disabled-in-ephemeral-session-expected.txt: Removed. * http/tests/contentextensions/block-ad-click-attribution-expected.txt: Removed. * http/tests/contentextensions/block-private-click-measurement-expected.txt: Added. * http/tests/contentextensions/block-private-click-measurement.html: Renamed from LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html. * http/tests/contentextensions/block-private-click-measurement.html.json: Renamed from LayoutTests/http/tests/contentextensions/block-ad-click-attribution.html.json. * http/tests/privateClickMeasurement/anchor-tag-attributes-reflect-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect-expected.txt. * http/tests/privateClickMeasurement/anchor-tag-attributes-reflect.html: Renamed from LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-reflect.html. * http/tests/privateClickMeasurement/anchor-tag-attributes-validation-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt. * http/tests/privateClickMeasurement/anchor-tag-attributes-validation.html: Renamed from LayoutTests/http/tests/adClickAttribution/anchor-tag-attributes-validation.html. * http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect-expected.txt: Added. * http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect.html: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-cross-site-image-redirect.html. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window-expected.txt. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window.html: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-in-new-window.html. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority.html. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt. * http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority.html. * http/tests/privateClickMeasurement/clear-through-website-data-removal-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal-expected.txt. * http/tests/privateClickMeasurement/clear-through-website-data-removal.html: Renamed from LayoutTests/http/tests/adClickAttribution/clear-through-website-data-removal.html. * http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session-expected.txt. * http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session.html: Renamed from LayoutTests/http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html. * http/tests/privateClickMeasurement/expired-attributions-removed-expected.txt: Added. * http/tests/privateClickMeasurement/expired-attributions-removed.html: Renamed from LayoutTests/http/tests/adClickAttribution/expired-attributions-removed.html. * http/tests/privateClickMeasurement/resources/conversionFilePath.php: Renamed from LayoutTests/http/tests/adClickAttribution/resources/conversionFilePath.php. * http/tests/privateClickMeasurement/resources/conversionReport.php: Renamed from LayoutTests/http/tests/adClickAttribution/resources/conversionReport.php. * http/tests/privateClickMeasurement/resources/convertAndPostMessageBack.html: Renamed from LayoutTests/http/tests/adClickAttribution/resources/convertAndPostMessageBack.html. * http/tests/privateClickMeasurement/resources/getConversionData.php: Renamed from LayoutTests/http/tests/adClickAttribution/resources/getConversionData.php. * http/tests/privateClickMeasurement/resources/redirectToConversion.php: Renamed from LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php. * http/tests/privateClickMeasurement/resources/redirectToConversionOnIPAddress.php: Added. * http/tests/privateClickMeasurement/resources/util.js: Renamed from LayoutTests/http/tests/adClickAttribution/resources/util.js. (prepareTest): (tearDownAndFinish): * http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority-expected.txt. * http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-higher-priority.html. * http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority-expected.txt. * http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/second-attribution-converted-with-lower-priority.html. * http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority-expected.txt. * http/tests/privateClickMeasurement/second-conversion-with-higher-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/second-conversion-with-higher-priority.html. * http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority-expected.txt. * http/tests/privateClickMeasurement/second-conversion-with-lower-priority.html: Renamed from LayoutTests/http/tests/adClickAttribution/second-conversion-with-lower-priority.html. * http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt: Renamed from LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt. * http/tests/privateClickMeasurement/send-attribution-conversion-request.html: Renamed from LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html. * http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session-expected.txt: Added. * http/tests/privateClickMeasurement/store-disabled-in-ephemeral-session.html: Renamed from LayoutTests/http/tests/adClickAttribution/store-disabled-in-ephemeral-session.html. * http/tests/privateClickMeasurement/store-private-click-measurement-expected.txt: Added. * http/tests/privateClickMeasurement/store-private-click-measurement.html: Renamed from LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution.html. * inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled-expected.txt: Removed. * inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled-expected.txt: Added. * inspector/page/overrideSetting-PrivateClickMeasurementDebugModeEnabled.html: Renamed from LayoutTests/inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html. * platform/mac-wk2/TestExpectations: * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/231491@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-12 02:04:28 +00:00
NetworkProcess/PrivateClickMeasurementManager.cpp
PCM: Introduce PrivateClickMeasurementNetworkLoader https://bugs.webkit.org/show_bug.cgi?id=222217 <rdar://74817863> Reviewed by Youenn Fablet. Source/WebKit: This patch refactors PrivateClickMeasurementManager to use a newly introduced PrivateClickMeasurementNetworkLoader instead of the PingLoad to handle network traffics such that PCMM can receive and process response bodies. PrivateClickMeasurementNetworkLoader is a stripped down version of the ServiceWorkerSoftUpdateLoader, which is also a derived class of NetworkLoadClient. Covered by new test contents within existing test files. * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::addPrivateClickMeasurementNetworkLoader): (WebKit::NetworkSession::removePrivateClickMeasurementNetworkLoader): Modifies the PCMM to use PCMNL. And then introduces a hash table to manage the lifetime of each PCMNL. * NetworkProcess/PrivateClickMeasurementManager.cpp: (WebKit::PrivateClickMeasurementManager::PrivateClickMeasurementManager): (WebKit::generateNetworkLoadParameters): (WebKit::generateNetworkLoadParametersForHttpPost): (WebKit::generateNetworkLoadParametersForHttpGet): (WebKit::PrivateClickMeasurementManager::getTokenPublicKey): (WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken): (WebKit::PrivateClickMeasurementManager::fireConversionRequestImpl): (WebKit::generateNetworkResourceLoadParameters): Deleted. (WebKit::generateNetworkResourceLoadParametersForHttpPost): Deleted. (WebKit::generateNetworkResourceLoadParametersForHttpGet): Deleted. * NetworkProcess/PrivateClickMeasurementManager.h: (WebKit::PrivateClickMeasurementManager::setNetworkLoadFunction): (WebKit::PrivateClickMeasurementManager::setPingLoadFunction): Deleted. Modifies the PCMM to use PCMNL. Specifically, changes the token_public_key and unlinkable_token to be extracted from the JSON content of the response. * NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp: Added. (WebKit::PrivateClickMeasurementNetworkLoader::start): (WebKit::PrivateClickMeasurementNetworkLoader::PrivateClickMeasurementNetworkLoader): (WebKit::PrivateClickMeasurementNetworkLoader::fail): (WebKit::PrivateClickMeasurementNetworkLoader::willSendRedirectedRequest): (WebKit::PrivateClickMeasurementNetworkLoader::didReceiveResponse): (WebKit::PrivateClickMeasurementNetworkLoader::didReceiveBuffer): (WebKit::PrivateClickMeasurementNetworkLoader::didFinishLoading): (WebKit::PrivateClickMeasurementNetworkLoader::didFailLoading): (WebKit::PrivateClickMeasurementNetworkLoader::didComplete): * NetworkProcess/PrivateClickMeasurementNetworkLoader.h: Added. Introduces the PCMNL. * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h: Fixes an Unified Build issue. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Some paperwork. LayoutTests: * http/tests/privateClickMeasurement/resources/fraudPreventionTestURL.py: Changes the token_public_key and unlinkable_token to be returned via JSON contents. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275260 268f45cc-cd09-0410-ab3c-d52691b4dbfc Canonical link: https://commits.webkit.org/235947@main
2021-03-31 02:52:37 +00:00
NetworkProcess/PrivateClickMeasurementNetworkLoader.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/NetworkActivityTracker.cpp
Add initial support for BroadcastChannel behind a runtime flag https://bugs.webkit.org/show_bug.cgi?id=227924 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Rebaseline WPT tests now that more tests are running and we are passing more checks. * web-platform-tests/FileAPI/url/url-in-tags-revoke.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/require-corp.https-expected.txt: * web-platform-tests/html/dom/idlharness.worker-expected.txt: * web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.https-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/basics.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/interface.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt: Added. * web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub-expected.txt: * web-platform-tests/webstorage/storage_session_window_noopener.window-expected.txt: * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt: Source/WebCore: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. Tests: - fast/html/broadcast-channel-between-different-sessions.html - Rebaselined WPT tests * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/BroadcastChannel.cpp: Added. (WebCore::channelToContextIdentifier): (WebCore::BroadcastChannel::BroadcastChannel): (WebCore::BroadcastChannel::~BroadcastChannel): (WebCore::BroadcastChannel::postMessage): (WebCore::BroadcastChannel::close): (WebCore::BroadcastChannel::dispatchMessageTo): (WebCore::BroadcastChannel::dispatchMessage): (WebCore::BroadcastChannel::ensureOnMainThread): (WebCore::BroadcastChannel::activeDOMObjectName const): (WebCore::BroadcastChannel::eventListenersDidChange): (WebCore::BroadcastChannel::virtualHasPendingActivity const): * dom/BroadcastChannel.h: Added. (WebCore::BroadcastChannel::create): (WebCore::BroadcastChannel::identifier const): (WebCore::BroadcastChannel::name const): * dom/BroadcastChannel.idl: Added. * dom/BroadcastChannelIdentifier.h: Added. * dom/BroadcastChannelRegistry.h: Added. (WebCore::BroadcastChannelRegistry::~BroadcastChannelRegistry): * dom/DeviceOrientationAndMotionAccessController.h: * dom/DeviceOrientationEvent.cpp: * dom/DeviceOrientationEvent.h: * dom/EventTargetFactory.in: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setBroadcastChannelRegistry): * page/Page.h: (WebCore::Page::broadcastChannelRegistry): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: Source/WebKit: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/NetworkBroadcastChannelRegistry.cpp: Added. (WebKit::NetworkBroadcastChannelRegistry::registerChannel): (WebKit::NetworkBroadcastChannelRegistry::unregisterChannel): (WebKit::NetworkBroadcastChannelRegistry::postMessage): (WebKit::NetworkBroadcastChannelRegistry::removeConnection): * NetworkProcess/NetworkBroadcastChannelRegistry.h: Added. (WebKit::NetworkBroadcastChannelRegistry::GlobalBroadcastChannelIdentifier::operator== const): * NetworkProcess/NetworkBroadcastChannelRegistry.messages.in: Added. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didClose): * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::broadcastChannelRegistry): * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebKit::networkProcessConnection): (WebKit::WebBroadcastChannelRegistry::registerChannel): (WebKit::WebBroadcastChannelRegistry::unregisterChannel): (WebKit::WebBroadcastChannelRegistry::postMessage): (WebKit::WebBroadcastChannelRegistry::postMessageToRemote): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::broadcastChannelRegistry): Source/WebKitLegacy: Add BroadcastChannelRegistry implementation for WebKitLegacy. * Sources.txt: * WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebBroadcastChannelRegistry::getOrCreate): (WebBroadcastChannelRegistry::registerChannel): (WebBroadcastChannelRegistry::unregisterChannel): (WebBroadcastChannelRegistry::postMessage): * WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebKitLegacy.xcodeproj/project.pbxproj: Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Source/WTF: Add experimental feature flag for BroadcastChannel, off by default. * Scripts/Preferences/WebPreferencesExperimental.yaml: LayoutTests: * TestExpectations: * fast/html/broadcast-channel-between-different-sessions-expected.txt: Added. * fast/html/broadcast-channel-between-different-sessions.html: Added. * fast/html/resources/broadcast-channel-between-different-sessions-window.html: Added. Add layout test coverage to make sure that windows belonging to different session are unable to communicate via BroadcastChannel. * platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt. * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/TestExpectations: * platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: Added. * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: Added. * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/win/TestExpectations: * platform/wk2/TestExpectations: Update test expectations now that we support BroadcastChannel. Canonical link: https://commits.webkit.org/239714@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 00:36:39 +00:00
NetworkProcess/NetworkBroadcastChannelRegistry.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Implement visibility based resource load scheduling for low priority resources https://bugs.webkit.org/show_bug.cgi?id=220728 Reviewed by Geoff Garen. Source/WebCore: Track load scheduling mode during on per page basis. Add support for prioritizing resources based on their visibility. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * loader/LoaderStrategy.cpp: (WebCore::LoaderStrategy::setResourceLoadSchedulingMode): (WebCore::LoaderStrategy::prioritizeResourceLoads): * loader/LoaderStrategy.h: * page/Page.cpp: (WebCore::Page::didStartProvisionalLoad): (WebCore::Page::didFinishLoad): Sheduled modes is is disabled at latest when the load completes. (WebCore::Page::doAfterUpdateRendering): (WebCore::Page::prioritizeVisibleResources): After rendering update, if in scheduled mode, check the visibility status of images resources. Prioritize loads for visible resources. Move out of the shceduled mode if the document is fully parsed and all visibile loads are completed. (WebCore::Page::setLoadSchedulingMode): * page/Page.h: (WebCore::Page::loadSchedulingMode const): Source/WebKit: Add a simple network process side resource load scheduler. When active it limits the number of low priority resource loads (mostly images) that are passed to network layer. The current limit is 6 per host, reduced by any ongoing higher priority loads. This reduces impact of low priority loads to higher priority ones, espcially on HTTP/2. The scheduler also supports reprioritizing loads. This is used to let images currently in the viewport to skip the queue and start their loads faster. The feature is not enabled in this patch. * NetworkProcess/Downloads/Download.cpp: (WebKit::Download::cancel): (WebKit::Download::didReceiveData): (WebKit::Download::didFinish): (WebKit::Download::didFail): * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::clearPageSpecificData): (WebKit::NetworkConnectionToWebProcess::removeStorageAccessForFrame): (WebKit::NetworkConnectionToWebProcess::setResourceLoadSchedulingMode): (WebKit::NetworkConnectionToWebProcess::prioritizeResourceLoads): (WebKit::NetworkConnectionToWebProcess::clearPageSpecificDataForResourceLoadStatistics): Deleted. Rename to clearPageSpecificData and move out of #if. * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::start): (WebKit::NetworkLoad::startWithScheduling): (WebKit::NetworkLoad::~NetworkLoad): (WebKit::NetworkLoad::didCompleteWithError): * NetworkProcess/NetworkLoad.h: * NetworkProcess/NetworkLoadScheduler.cpp: Added. (WebKit::NetworkLoadScheduler::HostContext::schedule): (WebKit::NetworkLoadScheduler::HostContext::unschedule): (WebKit::NetworkLoadScheduler::HostContext::prioritize): (WebKit::NetworkLoadScheduler::HostContext::start): (WebKit::NetworkLoadScheduler::HostContext::~HostContext): (WebKit::NetworkLoadScheduler::schedule): (WebKit::NetworkLoadScheduler::unschedule): (WebKit::NetworkLoadScheduler::setResourceLoadSchedulingMode): (WebKit::NetworkLoadScheduler::prioritizeLoads): (WebKit::NetworkLoadScheduler::clearPageData): (WebKit::NetworkLoadScheduler::contextForLoad): * NetworkProcess/NetworkLoadScheduler.h: Copied from Source/WebCore/loader/LoaderStrategy.cpp. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad): * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::networkLoadScheduler): * NetworkProcess/NetworkSession.h: * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::setResourceLoadSchedulingMode): (WebKit::WebLoaderStrategy::prioritizeResourceLoads): * WebProcess/Network/WebLoaderStrategy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Source/WTF: * Scripts/Preferences/WebPreferencesInternal.yaml: Add an internal setting, default to off for now. Canonical link: https://commits.webkit.org/233392@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-27 12:39:27 +00:00
NetworkProcess/NetworkLoadScheduler.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/NetworkProcess.cpp
NetworkProcess/NetworkProcessCreationParameters.cpp
NetworkProcess/NetworkProcessPlatformStrategies.cpp
NetworkProcess/NetworkResourceLoadParameters.cpp
Take UnboundedNetworking assertion when a file upload is in progress. https://bugs.webkit.org/show_bug.cgi?id=195497 Reviewed by Geoff Garen. Source/WebCore: * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::hasUpload const): * platform/network/ResourceRequestBase.h: Source/WebKit: This patch implements whole bunch of bookkeeping in both the Networking and UI processes. The TLDR of that bookkeeping is: - Whenever any uploads are in progress, take an assertion for both Networking and UI processes. - Whenever a particular WebProcess has an upload in progress, take an assertion for it. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::setProcessIdentifier): (WebKit::NetworkConnectionToWebProcess::setConnectionHasUploads): (WebKit::NetworkConnectionToWebProcess::clearConnectionHasUploads): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkResourceLoadMap.cpp: Added. (WebKit::NetworkResourceLoadMap::add): (WebKit::NetworkResourceLoadMap::remove): (WebKit::NetworkResourceLoadMap::get const): * NetworkProcess/NetworkResourceLoadMap.h: Added. (WebKit::NetworkResourceLoadMap::NetworkResourceLoadMap): (WebKit::NetworkResourceLoadMap::isEmpty const): (WebKit::NetworkResourceLoadMap::contains const): (WebKit::NetworkResourceLoadMap::begin): (WebKit::NetworkResourceLoadMap::values): * NetworkProcess/NetworkSession.cpp: * Scripts/webkit/messages.py: * Sources.txt: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::takeUploadAssertion): (WebKit::NetworkProcessProxy::clearUploadAssertion): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::setWebProcessHasUploads): (WebKit::WebProcessPool::clearWebProcessHasUploads): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessPool.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureNetworkProcessConnection): Canonical link: https://commits.webkit.org/209982@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-13 17:57:57 +00:00
NetworkProcess/NetworkResourceLoadMap.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/NetworkResourceLoader.cpp
Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global https://bugs.webkit.org/show_bug.cgi?id=202891 Reviewed by Youenn Fablet. Source/WebCore: * platform/LegacySchemeRegistry.cpp: (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled): (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): (WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled): * platform/LegacySchemeRegistry.h: Source/WebKit: No change in behavior. Now the LegacySchemeRegistry is not used as much in the NetworkProcess, a step towards no use at all. This functionality is currently only available through the glib API webkit_security_manager_register_uri_scheme_as_cors_enabled but it has been requested in bug 201180 and bug 199064. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::loadPing): (WebKit::NetworkConnectionToWebProcess::registerURLSchemesAsCORSEnabled): * NetworkProcess/NetworkConnectionToWebProcess.h: (WebKit::NetworkConnectionToWebProcess::schemeRegistry): * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::NetworkLoadChecker): (WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const): * NetworkProcess/NetworkLoadChecker.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const): Deleted. * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::m_shouldCaptureExtraNetworkLoadMetrics): * NetworkProcess/NetworkSchemeRegistry.cpp: Added. (WebKit::NetworkSchemeRegistry::registerURLSchemeAsCORSEnabled): (WebKit::NetworkSchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): * NetworkProcess/NetworkSchemeRegistry.h: Added. (WebKit::NetworkSchemeRegistry::create): * NetworkProcess/PingLoad.cpp: (WebKit::PingLoad::PingLoad): Use nullptr, indicating that the PingLoad constructor that is used in ad click attribution should not check the custom scheme registry. This is Ok because ad click attribution is only used for HTTP family schemes. (WebKit::m_blobFiles): * NetworkProcess/PingLoad.h: * Sources.txt: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::registerURLSchemeAsCORSEnabled): (WebKit::WebProcess::ensureNetworkProcessConnection): (WebKit::WebProcess::registerURLSchemeAsCORSEnabled const): Deleted. * WebProcess/WebProcess.h: Canonical link: https://commits.webkit.org/216779@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-24 18:50:26 +00:00
NetworkProcess/NetworkSchemeRegistry.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/NetworkSession.cpp
Move loadThrottleLatency from NetworkProcessCreationParameters to NetworkSessionCreationParameters https://bugs.webkit.org/show_bug.cgi?id=192122 Reviewed by Dean Jackson. This is part of an effort to reduce global variables in the NetworkProcess. * NetworkProcess/NetworkLoad.cpp: (WebKit::NetworkLoad::NetworkLoad): (WebKit::NetworkLoad::didReceiveResponse): * NetworkProcess/NetworkLoad.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::loadThrottleLatency const): Deleted. * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::loadThrottleLatency const): * NetworkProcess/NetworkSessionCreationParameters.cpp: Added. (WebKit::NetworkSessionCreationParameters::privateSessionParameters): (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: (WebKit::NetworkSessionCreationParameters::encode const): Deleted. (WebKit::NetworkSessionCreationParameters::decode): Deleted. * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * Shared/WebsiteDataStoreParameters.cpp: (WebKit::WebsiteDataStoreParameters::privateSessionParameters): * Sources.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/206804@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-29 02:18:37 +00:00
NetworkProcess/NetworkSessionCreationParameters.cpp
Use NSURLSession for WebSocket https://bugs.webkit.org/show_bug.cgi?id=198568 Reviewed by Geoffrey Garen. Source/WebCore: Add a runtime flag to either choose the new WebSocket code path or the previously existing one. The switch is done at WebSocket channel API level which offers the necessary high level API to abstract the two code paths. By default, we continue using the current WebSocket implementation. Covered by manual testing on current WebSocket tests. * Modules/websockets/ThreadableWebSocketChannel.cpp: (WebCore::ThreadableWebSocketChannel::create): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::document): * Modules/websockets/WebSocketChannel.h: * WebCore.xcodeproj/project.pbxproj: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::isNSURLSessionWebSocketEnabled const): (WebCore::RuntimeEnabledFeatures::setIsNSURLSessionWebSocketEnabled): * page/SocketProvider.cpp: (WebCore::SocketProvider::createWebSocketChannel): * page/SocketProvider.h: Source/WebKit: Implement socket channel provider on WebProcess level by sending IPC to NetworkProcess. On NetworkProcess side, use NSURLSession API to implement the WebSocket functionality. This is a partial implementation: - inspector integration is not working. - some error cases are not well handled or are not producing the same error messages. - some features are not implemented (extensions, subprotocols, handshake authentication challenge, cookie handling...). * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::createSocketChannel): (WebKit::NetworkConnectionToWebProcess::removeSocketChannel): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::createWebSocketTask): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::removeWebSocketTask): (WebKit::NetworkSession::addWebSocketTask): * NetworkProcess/NetworkSocketChannel.cpp: Added. (WebKit::NetworkSocketChannel::create): (WebKit::NetworkSocketChannel::NetworkSocketChannel): (WebKit::NetworkSocketChannel::~NetworkSocketChannel): (WebKit::NetworkSocketChannel::sendString): (WebKit::NetworkSocketChannel::sendData): (WebKit::NetworkSocketChannel::finishClosingIfPossible): (WebKit::NetworkSocketChannel::close): (WebKit::NetworkSocketChannel::didConnect): (WebKit::NetworkSocketChannel::didReceiveText): (WebKit::NetworkSocketChannel::didReceiveBinaryData): (WebKit::NetworkSocketChannel::didClose): (WebKit::NetworkSocketChannel::messageSenderConnection const): * NetworkProcess/NetworkSocketChannel.h: Added. * NetworkProcess/NetworkSocketChannel.messages.in: Added. * NetworkProcess/NetworkSocketStream.messages.in: * NetworkProcess/WebSocketTask.h: Added. (WebKit::WebSocketTask::sendString): (WebKit::WebSocketTask::sendData): (WebKit::WebSocketTask::close): (WebKit::WebSocketTask::cancel): (WebKit::WebSocketTask::resume): * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate existingWebSocketTask:]): (-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]): (-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]): (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge): (WebKit::NetworkSessionCocoa::createWebSocketTask): (WebKit::NetworkSessionCocoa::addWebSocketTask): (WebKit::NetworkSessionCocoa::removeWebSocketTask): (WebKit::NetworkSessionCocoa::webSocketDataTaskForIdentifier): * NetworkProcess/cocoa/WebSocketTaskCocoa.h: Added. * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: Added. (WebKit::WebSocketTask::WebSocketTask): (WebKit::WebSocketTask::~WebSocketTask): (WebKit::WebSocketTask::readNextMessage): (WebKit::WebSocketTask::cancel): (WebKit::WebSocketTask::resume): (WebKit::WebSocketTask::didConnect): (WebKit::WebSocketTask::didClose): (WebKit::WebSocketTask::sendString): (WebKit::WebSocketTask::sendData): (WebKit::WebSocketTask::close): (WebKit::WebSocketTask::identifier const): * Shared/WebPreferences.yaml: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/Network/WebSocketChannel.cpp: Added. (WebKit::WebSocketChannel::create): (WebKit::WebSocketChannel::WebSocketChannel): (WebKit::WebSocketChannel::~WebSocketChannel): (WebKit::WebSocketChannel::messageSenderConnection const): (WebKit::WebSocketChannel::messageSenderDestinationID const): (WebKit::WebSocketChannel::subprotocol): (WebKit::WebSocketChannel::extensions): (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::send): (WebKit::WebSocketChannel::bufferedAmount const): (WebKit::WebSocketChannel::close): (WebKit::WebSocketChannel::fail): (WebKit::WebSocketChannel::disconnect): (WebKit::WebSocketChannel::didConnect): (WebKit::WebSocketChannel::didReceiveText): (WebKit::WebSocketChannel::didReceiveBinaryData): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::didFail): (WebKit::WebSocketChannel::networkProcessCrashed): * WebProcess/Network/WebSocketChannel.h: Added. * WebProcess/Network/WebSocketChannel.messages.in: Added. * WebProcess/Network/WebSocketChannelManager.cpp: Added. (WebKit::WebSocketChannelManager::createWebSocketChannel): (WebKit::WebSocketChannelManager::networkProcessCrashed): (WebKit::WebSocketChannelManager::didReceiveMessage): * WebProcess/Network/WebSocketChannelManager.h: Added. * WebProcess/Network/WebSocketProvider.cpp: (WebKit::WebSocketProvider::createWebSocketChannel): * WebProcess/Network/WebSocketProvider.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::webSocketChannelManager): Source/WTF: * wtf/Platform.h: Introduce compile flag for WebSocket NSURLSession Canonical link: https://commits.webkit.org/212790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-13 01:04:16 +00:00
NetworkProcess/NetworkSocketChannel.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/NetworkSocketStream.cpp
NetworkProcess/PingLoad.cpp
NetworkProcess/PreconnectTask.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use a SQLite database to hold the ResourceLoadStatistics data https://bugs.webkit.org/show_bug.cgi?id=194867 <rdar://problem/24240854> Reviewed by Chris Dumez. Source/WebCore: Add a new runtime feature flag to support use of an experimental database back-end. Also expose some SQLite function calls for use outside of WebCore. No change in functionality, so no new tests. * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setItpDatabaseModeEnabled): (WebCore::RuntimeEnabledFeatures::itpDatabaseModeEnabled const): * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteStatement.h: Source/WebKit: The ResourceLoadStatistics database plist is inefficient. It requires more memory use than it needs, and forces lots of looping and string comparisons to find information. This problem has already been solved in the form of relational databases. We use them elsewhere in WebKit, and should do so for this storage as well. This patch creates an optional SQLite database to handle ITP operations. 1. It adds a new internal experimental feature flag to activate it. It requires the user exit and restart the process to take effect. 2. It populates itself from the existing plist file (if it exists). 3. It stops using the plist in favor of the database. 4. It does queries and other operations using the database instead of the old hash table implementation. This patch refactors the exisiting ResourceLoadStatisticsMemoryStore class into a base ResourceLoadStatisticsStore class, which ResourceLoadStatisticsMemoryStore is based on. It adds a new ResourceLoadStatisticsDatabaseStore that is implemented in terms of SQL operations. These code changes should not have any impact on existing operations, and when enabled should produce the same test results. * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: Added. (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema): (WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements): (WebKit::ResourceLoadStatisticsDatabaseStore::insertObservedDomain): (WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const): (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationship): (WebKit::ResourceLoadStatisticsDatabaseStore::confirmDomainDoesNotExist const): (WebKit::ResourceLoadStatisticsDatabaseStore::domainIDFromString const): (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationships): (WebKit::ResourceLoadStatisticsDatabaseStore::databaseIsEmpty const): (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore): (WebKit::ResourceLoadStatisticsDatabaseStore::calculateAndSubmitTelemetry const): (WebKit::ResourceLoadStatisticsDatabaseStore::incrementRecordsDeletedCountForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain): (WebKit::buildList): (WebKit::ResourceLoadStatisticsDatabaseStore::markAsPrevalentIfHasRedirectedToPrevalent): (WebKit::listToString): (WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): (WebKit::ResourceLoadStatisticsDatabaseStore::reclassifyResources): (WebKit::ResourceLoadStatisticsDatabaseStore::classifyPrevalentResources): (WebKit::ResourceLoadStatisticsDatabaseStore::syncStorageIfNeeded): (WebKit::ResourceLoadStatisticsDatabaseStore::syncStorageImmediately): (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal): (WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode): (WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation): (WebKit::ResourceLoadStatisticsDatabaseStore::logSubresourceLoading): (WebKit::ResourceLoadStatisticsDatabaseStore::logSubresourceRedirect): (WebKit::ResourceLoadStatisticsDatabaseStore::setUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::setDomainsAsPrevalent): (WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics const): (WebKit::ResourceLoadStatisticsDatabaseStore::predicateValueForDomain const): (WebKit::ResourceLoadStatisticsDatabaseStore::isPrevalentResource const): (WebKit::ResourceLoadStatisticsDatabaseStore::isVeryPrevalentResource const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsSubresourceUnder const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsSubFrameUnder const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsRedirectingTo const): (WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered): (WebKit::ResourceLoadStatisticsDatabaseStore::isGrandfathered const): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubframeUnderTopFrameOrigin): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUnderTopFrameOrigin): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectTo): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectFrom): (WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectTo): (WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectFrom): (WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForPrimaryDomain): (WebKit::ResourceLoadStatisticsDatabaseStore::clear): (WebKit::ResourceLoadStatisticsDatabaseStore::cookieTreatmentForOrigin const): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt): (WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlock const): (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking): (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlockingForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::clearBlockingStateForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::processStatistics const): (WebKit::ResourceLoadStatisticsDatabaseStore::prevalentDomains const): (WebKit::ResourceLoadStatisticsDatabaseStore::findExpiredUserInteractions const): (WebKit::ResourceLoadStatisticsDatabaseStore::clearExpiredUserInteractions): (WebKit::ResourceLoadStatisticsDatabaseStore::clearGrandfathering): (WebKit::ResourceLoadStatisticsDatabaseStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor): (WebKit::ResourceLoadStatisticsDatabaseStore::pruneStatisticsIfNeeded): (WebKit::ResourceLoadStatisticsDatabaseStore::updateLastSeen): (WebKit::ResourceLoadStatisticsDatabaseStore::setLastSeen): (WebKit::ResourceLoadStatisticsDatabaseStore::setVeryPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::removeAllStorageAccess): * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: Added. (WebKit::ResourceLoadStatisticsDatabaseStore::isEmpty const): * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore): (WebKit::ResourceLoadStatisticsMemoryStore::incrementRecordsDeletedCountForDomains): (WebKit::ResourceLoadStatisticsMemoryStore::classifyPrevalentResources): (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageIfNeeded): (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageImmediately): (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherDataForDomains): (WebKit::domainsToString): Deleted. (WebKit::OperatingDate::fromWallTime): Deleted. (WebKit::OperatingDate::today): Deleted. (WebKit::OperatingDate::secondsSinceEpoch const): Deleted. (WebKit::OperatingDate::operator== const): Deleted. (WebKit::OperatingDate::operator< const): Deleted. (WebKit::OperatingDate::operator<= const): Deleted. (WebKit::OperatingDate::OperatingDate): Deleted. (WebKit::mergeOperatingDates): Deleted. (WebKit::computeImportance): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::~ResourceLoadStatisticsMemoryStore): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setNotifyPagesWhenDataRecordsWereScanned): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setShouldSubmitTelemetry): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::scheduleStatisticsProcessingRequestIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::cancelPendingStatisticsProcessingRequest): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setTimeToLiveUserInteraction): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setMinimumTimeBetweenDataRecordsRemoval): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setGrandfatheringTime): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setCacheMaxAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::updateCacheMaxAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setAgeCapForClientSideCookies): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveDataRecords const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setDataRecordsBeingRemoved): Deleted. (WebKit::debugLogDomainsInBatches): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::includeTodayAsOperatingDateIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::hasStatisticsExpired const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setMaxStatisticsEntries): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setPruneEntriesDownTo): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::resetParametersToDefaultValues): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::logTestingEvent): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::didCreateNetworkProcess): Deleted. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: (WebKit::ResourceLoadStatisticsMemoryStore::data const): (WebKit::ResourceLoadStatisticsMemoryStore::isDebugModeEnabled const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::store const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setStorageAccessPromptsEnabled): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setDebugLogggingEnabled): Deleted. (): Deleted. * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: Added. (WebKit::domainsToString): (WebKit::OperatingDate::fromWallTime): (WebKit::OperatingDate::today): (WebKit::OperatingDate::secondsSinceEpoch const): (WebKit::OperatingDate::operator== const): (WebKit::OperatingDate::operator< const): (WebKit::OperatingDate::operator<= const): (WebKit::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore): (WebKit::ResourceLoadStatisticsStore::~ResourceLoadStatisticsStore): (WebKit::ResourceLoadStatisticsStore::calculateAndSubmitTelemetry const): (WebKit::ResourceLoadStatisticsStore::computeImportance): (WebKit::ResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned): (WebKit::ResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): (WebKit::ResourceLoadStatisticsStore::setShouldSubmitTelemetry): (WebKit::ResourceLoadStatisticsStore::removeDataRecords): (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords): (WebKit::ResourceLoadStatisticsStore::grandfatherExistingWebsiteData): (WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode): (WebKit::ResourceLoadStatisticsStore::setPrevalentResourceForDebugMode): (WebKit::ResourceLoadStatisticsStore::scheduleStatisticsProcessingRequestIfNecessary): (WebKit::ResourceLoadStatisticsStore::cancelPendingStatisticsProcessingRequest): (WebKit::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction): (WebKit::ResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval): (WebKit::ResourceLoadStatisticsStore::setGrandfatheringTime): (WebKit::ResourceLoadStatisticsStore::setCacheMaxAgeCap): (WebKit::ResourceLoadStatisticsStore::updateCacheMaxAgeCap): (WebKit::ResourceLoadStatisticsStore::setAgeCapForClientSideCookies): (WebKit::ResourceLoadStatisticsStore::updateClientSideCookiesAgeCap): (WebKit::ResourceLoadStatisticsStore::shouldRemoveDataRecords const): (WebKit::ResourceLoadStatisticsStore::setDataRecordsBeingRemoved): (WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains): (WebKit::ResourceLoadStatisticsStore::clearBlockingStateForDomains): (WebKit::ResourceLoadStatisticsStore::processStatistics const): (WebKit::ResourceLoadStatisticsStore::statisticsEpirationTime const): (WebKit::ResourceLoadStatisticsStore::mergeOperatingDates): (WebKit::ResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary): (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const): (WebKit::ResourceLoadStatisticsStore::setMaxStatisticsEntries): (WebKit::ResourceLoadStatisticsStore::setPruneEntriesDownTo): (WebKit::ResourceLoadStatisticsStore::resetParametersToDefaultValues): (WebKit::ResourceLoadStatisticsStore::logTestingEvent): (WebKit::ResourceLoadStatisticsStore::removeAllStorageAccess): (WebKit::ResourceLoadStatisticsStore::didCreateNetworkProcess): (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches): * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: Copied from Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h. (WebKit::OperatingDate::OperatingDate): (WebKit::ResourceLoadStatisticsStore::isEmpty const): (WebKit::ResourceLoadStatisticsStore::data const): (WebKit::ResourceLoadStatisticsStore::isDebugModeEnabled const): (WebKit::ResourceLoadStatisticsStore::store const): (WebKit::ResourceLoadStatisticsStore::setStorageAccessPromptsEnabled): (WebKit::ResourceLoadStatisticsStore::setDebugLogggingEnabled): * NetworkProcess/Classifier/ResourceLoadStatisticsStoreCocoa.mm: Renamed from Source/WebKit/UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm. (WebKit::ResourceLoadStatisticsStore::registerUserDefaultsIfNeeded): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned): (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): (WebKit::WebResourceLoadStatisticsStore::setShouldSubmitTelemetry): (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore): (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode): (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode): (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing): (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess): (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener): (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): (WebKit::WebResourceLoadStatisticsStore::performDailyTasks): (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation): (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): (WebKit::WebResourceLoadStatisticsStore::logUserInteraction): (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction): (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction): (WebKit::WebResourceLoadStatisticsStore::setLastSeen): (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo): (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::setGrandfathered): (WebKit::WebResourceLoadStatisticsStore::isGrandfathered): (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom): (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo): (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom): (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdate): (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains): (WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains): (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction): (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval): (WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime): (WebKit::WebResourceLoadStatisticsStore::setMaxStatisticsEntries): (WebKit::WebResourceLoadStatisticsStore::setPruneEntriesDownTo): (WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * Platform/classifier/ResourceLoadStatisticsClassifier.cpp: (WebKit::ResourceLoadStatisticsClassifier::calculateResourcePrevalence): * Platform/classifier/ResourceLoadStatisticsClassifier.h: * Shared/WebPreferences.yaml: * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebProcessPool.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/209657@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-05 03:00:29 +00:00
NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp
Move ResourceLoadStatistics files from UIProcess to NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=193252 <rdar://problem/47125401> Reviewed by Alex Christensen. This patch is the first part of a refactoring to move the ResourceLoadStatistics logic from the UIProcess to the NetworkProcess. This patch moves code into different folders and adjusts necessary build files, but does not change where the code executes. These changes have no impact on behavior or test results. I also modified a few files to add missing include files uncovered by the unified build system. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.h. * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/Downloads/PendingDownload.h: * CMakeLists.txt: * PlatformMac.cmake: * PlatformWin.cmake: * Shared/PersistencyUtils.cpp: Renamed from Source/WebKit/UIProcess/PersistencyUtils.cpp. * Shared/PersistencyUtils.h: Renamed from Source/WebKit/UIProcess/PersistencyUtils.h. * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Add missing WebKit:: scope. * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Add missing include. * UIProcess/WebDataListSuggestionsDropdown.cpp: Ditto. * UIProcess/mac/DisplayLink.cpp: * UnifiedSources-input.xcfilelist: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/207759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-08 22:02:16 +00:00
NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
Use a SQLite database to hold the ResourceLoadStatistics data https://bugs.webkit.org/show_bug.cgi?id=194867 <rdar://problem/24240854> Reviewed by Chris Dumez. Source/WebCore: Add a new runtime feature flag to support use of an experimental database back-end. Also expose some SQLite function calls for use outside of WebCore. No change in functionality, so no new tests. * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setItpDatabaseModeEnabled): (WebCore::RuntimeEnabledFeatures::itpDatabaseModeEnabled const): * platform/sql/SQLiteDatabase.h: * platform/sql/SQLiteStatement.h: Source/WebKit: The ResourceLoadStatistics database plist is inefficient. It requires more memory use than it needs, and forces lots of looping and string comparisons to find information. This problem has already been solved in the form of relational databases. We use them elsewhere in WebKit, and should do so for this storage as well. This patch creates an optional SQLite database to handle ITP operations. 1. It adds a new internal experimental feature flag to activate it. It requires the user exit and restart the process to take effect. 2. It populates itself from the existing plist file (if it exists). 3. It stops using the plist in favor of the database. 4. It does queries and other operations using the database instead of the old hash table implementation. This patch refactors the exisiting ResourceLoadStatisticsMemoryStore class into a base ResourceLoadStatisticsStore class, which ResourceLoadStatisticsMemoryStore is based on. It adds a new ResourceLoadStatisticsDatabaseStore that is implemented in terms of SQL operations. These code changes should not have any impact on existing operations, and when enabled should produce the same test results. * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: Added. (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore): (WebKit::ResourceLoadStatisticsDatabaseStore::createSchema): (WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements): (WebKit::ResourceLoadStatisticsDatabaseStore::insertObservedDomain): (WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const): (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationship): (WebKit::ResourceLoadStatisticsDatabaseStore::confirmDomainDoesNotExist const): (WebKit::ResourceLoadStatisticsDatabaseStore::domainIDFromString const): (WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationships): (WebKit::ResourceLoadStatisticsDatabaseStore::databaseIsEmpty const): (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore): (WebKit::ResourceLoadStatisticsDatabaseStore::calculateAndSubmitTelemetry const): (WebKit::ResourceLoadStatisticsDatabaseStore::incrementRecordsDeletedCountForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain): (WebKit::buildList): (WebKit::ResourceLoadStatisticsDatabaseStore::markAsPrevalentIfHasRedirectedToPrevalent): (WebKit::listToString): (WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): (WebKit::ResourceLoadStatisticsDatabaseStore::reclassifyResources): (WebKit::ResourceLoadStatisticsDatabaseStore::classifyPrevalentResources): (WebKit::ResourceLoadStatisticsDatabaseStore::syncStorageIfNeeded): (WebKit::ResourceLoadStatisticsDatabaseStore::syncStorageImmediately): (WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess): (WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal): (WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode): (WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation): (WebKit::ResourceLoadStatisticsDatabaseStore::logSubresourceLoading): (WebKit::ResourceLoadStatisticsDatabaseStore::logSubresourceRedirect): (WebKit::ResourceLoadStatisticsDatabaseStore::setUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction): (WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::setDomainsAsPrevalent): (WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics const): (WebKit::ResourceLoadStatisticsDatabaseStore::predicateValueForDomain const): (WebKit::ResourceLoadStatisticsDatabaseStore::isPrevalentResource const): (WebKit::ResourceLoadStatisticsDatabaseStore::isVeryPrevalentResource const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsSubresourceUnder const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsSubFrameUnder const): (WebKit::ResourceLoadStatisticsDatabaseStore::isRegisteredAsRedirectingTo const): (WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered): (WebKit::ResourceLoadStatisticsDatabaseStore::isGrandfathered const): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubframeUnderTopFrameOrigin): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUnderTopFrameOrigin): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectTo): (WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectFrom): (WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectTo): (WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectFrom): (WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForPrimaryDomain): (WebKit::ResourceLoadStatisticsDatabaseStore::clear): (WebKit::ResourceLoadStatisticsDatabaseStore::cookieTreatmentForOrigin const): (WebKit::ResourceLoadStatisticsDatabaseStore::hasUserGrantedStorageAccessThroughPrompt): (WebKit::ResourceLoadStatisticsDatabaseStore::domainsToBlock const): (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlocking): (WebKit::ResourceLoadStatisticsDatabaseStore::updateCookieBlockingForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::clearBlockingStateForDomains): (WebKit::ResourceLoadStatisticsDatabaseStore::processStatistics const): (WebKit::ResourceLoadStatisticsDatabaseStore::prevalentDomains const): (WebKit::ResourceLoadStatisticsDatabaseStore::findExpiredUserInteractions const): (WebKit::ResourceLoadStatisticsDatabaseStore::clearExpiredUserInteractions): (WebKit::ResourceLoadStatisticsDatabaseStore::clearGrandfathering): (WebKit::ResourceLoadStatisticsDatabaseStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor): (WebKit::ResourceLoadStatisticsDatabaseStore::pruneStatisticsIfNeeded): (WebKit::ResourceLoadStatisticsDatabaseStore::updateLastSeen): (WebKit::ResourceLoadStatisticsDatabaseStore::setLastSeen): (WebKit::ResourceLoadStatisticsDatabaseStore::setVeryPrevalentResource): (WebKit::ResourceLoadStatisticsDatabaseStore::removeAllStorageAccess): * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h: Added. (WebKit::ResourceLoadStatisticsDatabaseStore::isEmpty const): * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore): (WebKit::ResourceLoadStatisticsMemoryStore::incrementRecordsDeletedCountForDomains): (WebKit::ResourceLoadStatisticsMemoryStore::classifyPrevalentResources): (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageIfNeeded): (WebKit::ResourceLoadStatisticsMemoryStore::syncStorageImmediately): (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherDataForDomains): (WebKit::domainsToString): Deleted. (WebKit::OperatingDate::fromWallTime): Deleted. (WebKit::OperatingDate::today): Deleted. (WebKit::OperatingDate::secondsSinceEpoch const): Deleted. (WebKit::OperatingDate::operator== const): Deleted. (WebKit::OperatingDate::operator< const): Deleted. (WebKit::OperatingDate::operator<= const): Deleted. (WebKit::OperatingDate::OperatingDate): Deleted. (WebKit::mergeOperatingDates): Deleted. (WebKit::computeImportance): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::~ResourceLoadStatisticsMemoryStore): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setNotifyPagesWhenDataRecordsWereScanned): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setShouldSubmitTelemetry): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::removeDataRecords): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::processStatisticsAndDataRecords): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::grandfatherExistingWebsiteData): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setResourceLoadStatisticsDebugMode): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setPrevalentResourceForDebugMode): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::scheduleStatisticsProcessingRequestIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::cancelPendingStatisticsProcessingRequest): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setTimeToLiveUserInteraction): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setMinimumTimeBetweenDataRecordsRemoval): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setGrandfatheringTime): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setCacheMaxAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::updateCacheMaxAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setAgeCapForClientSideCookies): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveDataRecords const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setDataRecordsBeingRemoved): Deleted. (WebKit::debugLogDomainsInBatches): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::includeTodayAsOperatingDateIfNecessary): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::hasStatisticsExpired const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setMaxStatisticsEntries): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setPruneEntriesDownTo): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::resetParametersToDefaultValues): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::logTestingEvent): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::didCreateNetworkProcess): Deleted. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: (WebKit::ResourceLoadStatisticsMemoryStore::data const): (WebKit::ResourceLoadStatisticsMemoryStore::isDebugModeEnabled const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::store const): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setStorageAccessPromptsEnabled): Deleted. (WebKit::ResourceLoadStatisticsMemoryStore::setDebugLogggingEnabled): Deleted. (): Deleted. * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp: Added. (WebKit::domainsToString): (WebKit::OperatingDate::fromWallTime): (WebKit::OperatingDate::today): (WebKit::OperatingDate::secondsSinceEpoch const): (WebKit::OperatingDate::operator== const): (WebKit::OperatingDate::operator< const): (WebKit::OperatingDate::operator<= const): (WebKit::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore): (WebKit::ResourceLoadStatisticsStore::~ResourceLoadStatisticsStore): (WebKit::ResourceLoadStatisticsStore::calculateAndSubmitTelemetry const): (WebKit::ResourceLoadStatisticsStore::computeImportance): (WebKit::ResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned): (WebKit::ResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): (WebKit::ResourceLoadStatisticsStore::setShouldSubmitTelemetry): (WebKit::ResourceLoadStatisticsStore::removeDataRecords): (WebKit::ResourceLoadStatisticsStore::processStatisticsAndDataRecords): (WebKit::ResourceLoadStatisticsStore::grandfatherExistingWebsiteData): (WebKit::ResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode): (WebKit::ResourceLoadStatisticsStore::setPrevalentResourceForDebugMode): (WebKit::ResourceLoadStatisticsStore::scheduleStatisticsProcessingRequestIfNecessary): (WebKit::ResourceLoadStatisticsStore::cancelPendingStatisticsProcessingRequest): (WebKit::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction): (WebKit::ResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval): (WebKit::ResourceLoadStatisticsStore::setGrandfatheringTime): (WebKit::ResourceLoadStatisticsStore::setCacheMaxAgeCap): (WebKit::ResourceLoadStatisticsStore::updateCacheMaxAgeCap): (WebKit::ResourceLoadStatisticsStore::setAgeCapForClientSideCookies): (WebKit::ResourceLoadStatisticsStore::updateClientSideCookiesAgeCap): (WebKit::ResourceLoadStatisticsStore::shouldRemoveDataRecords const): (WebKit::ResourceLoadStatisticsStore::setDataRecordsBeingRemoved): (WebKit::ResourceLoadStatisticsStore::updateCookieBlockingForDomains): (WebKit::ResourceLoadStatisticsStore::clearBlockingStateForDomains): (WebKit::ResourceLoadStatisticsStore::processStatistics const): (WebKit::ResourceLoadStatisticsStore::statisticsEpirationTime const): (WebKit::ResourceLoadStatisticsStore::mergeOperatingDates): (WebKit::ResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary): (WebKit::ResourceLoadStatisticsStore::hasStatisticsExpired const): (WebKit::ResourceLoadStatisticsStore::setMaxStatisticsEntries): (WebKit::ResourceLoadStatisticsStore::setPruneEntriesDownTo): (WebKit::ResourceLoadStatisticsStore::resetParametersToDefaultValues): (WebKit::ResourceLoadStatisticsStore::logTestingEvent): (WebKit::ResourceLoadStatisticsStore::removeAllStorageAccess): (WebKit::ResourceLoadStatisticsStore::didCreateNetworkProcess): (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches): * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: Copied from Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h. (WebKit::OperatingDate::OperatingDate): (WebKit::ResourceLoadStatisticsStore::isEmpty const): (WebKit::ResourceLoadStatisticsStore::data const): (WebKit::ResourceLoadStatisticsStore::isDebugModeEnabled const): (WebKit::ResourceLoadStatisticsStore::store const): (WebKit::ResourceLoadStatisticsStore::setStorageAccessPromptsEnabled): (WebKit::ResourceLoadStatisticsStore::setDebugLogggingEnabled): * NetworkProcess/Classifier/ResourceLoadStatisticsStoreCocoa.mm: Renamed from Source/WebKit/UIProcess/Cocoa/ResourceLoadStatisticsMemoryStoreCocoa.mm. (WebKit::ResourceLoadStatisticsStore::registerUserDefaultsIfNeeded): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: (WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned): (WebKit::WebResourceLoadStatisticsStore::setShouldClassifyResourcesBeforeDataRecordsRemoval): (WebKit::WebResourceLoadStatisticsStore::setShouldSubmitTelemetry): (WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): (WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore): (WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsDebugMode): (WebKit::WebResourceLoadStatisticsStore::setPrevalentResourceForDebugMode): (WebKit::WebResourceLoadStatisticsStore::scheduleStatisticsAndDataRecordsProcessing): (WebKit::WebResourceLoadStatisticsStore::hasStorageAccess): (WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): (WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener): (WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): (WebKit::WebResourceLoadStatisticsStore::performDailyTasks): (WebKit::WebResourceLoadStatisticsStore::logFrameNavigation): (WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): (WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): (WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): (WebKit::WebResourceLoadStatisticsStore::logUserInteraction): (WebKit::WebResourceLoadStatisticsStore::clearUserInteraction): (WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction): (WebKit::WebResourceLoadStatisticsStore::setLastSeen): (WebKit::WebResourceLoadStatisticsStore::setPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::setVeryPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isVeryPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubresourceUnder): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsSubFrameUnder): (WebKit::WebResourceLoadStatisticsStore::isRegisteredAsRedirectingTo): (WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource): (WebKit::WebResourceLoadStatisticsStore::setGrandfathered): (WebKit::WebResourceLoadStatisticsStore::isGrandfathered): (WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo): (WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectFrom): (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectTo): (WebKit::WebResourceLoadStatisticsStore::setTopFrameUniqueRedirectFrom): (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdate): (WebKit::WebResourceLoadStatisticsStore::scheduleCookieBlockingUpdateForDomains): (WebKit::WebResourceLoadStatisticsStore::scheduleClearBlockingStateForDomains): (WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent): (WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction): (WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval): (WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime): (WebKit::WebResourceLoadStatisticsStore::setMaxStatisticsEntries): (WebKit::WebResourceLoadStatisticsStore::setPruneEntriesDownTo): (WebKit::WebResourceLoadStatisticsStore::resetParametersToDefaultValues): * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * Platform/classifier/ResourceLoadStatisticsClassifier.cpp: (WebKit::ResourceLoadStatisticsClassifier::calculateResourcePrevalence): * Platform/classifier/ResourceLoadStatisticsClassifier.h: * Shared/WebPreferences.yaml: * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebProcessPool.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/209657@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-05 03:00:29 +00:00
NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp
Move ResourceLoadStatistics files from UIProcess to NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=193252 <rdar://problem/47125401> Reviewed by Alex Christensen. This patch is the first part of a refactoring to move the ResourceLoadStatistics logic from the UIProcess to the NetworkProcess. This patch moves code into different folders and adjusts necessary build files, but does not change where the code executes. These changes have no impact on behavior or test results. I also modified a few files to add missing include files uncovered by the unified build system. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.h. * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/Downloads/PendingDownload.h: * CMakeLists.txt: * PlatformMac.cmake: * PlatformWin.cmake: * Shared/PersistencyUtils.cpp: Renamed from Source/WebKit/UIProcess/PersistencyUtils.cpp. * Shared/PersistencyUtils.h: Renamed from Source/WebKit/UIProcess/PersistencyUtils.h. * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Add missing WebKit:: scope. * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Add missing include. * UIProcess/WebDataListSuggestionsDropdown.cpp: Ditto. * UIProcess/mac/DisplayLink.cpp: * UnifiedSources-input.xcfilelist: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/207759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-08 22:02:16 +00:00
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/Downloads/Download.cpp
NetworkProcess/Downloads/DownloadManager.cpp
NetworkProcess/Downloads/DownloadMap.cpp
Implement DownloadMonitor to prevent long-running slow downloads from background apps https://bugs.webkit.org/show_bug.cgi?id=195785 Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-18 Reviewed by Geoffrey Garen. Source/WebKit: This is similar to what was updated in <rdar://problem/42677685> but for WebKit Downloads. To test it I implemented a throttled TCP server, SPI to speed up DownloadMonitor's timer, and SPI to synthesize the application going into the background and foreground, which NSNotificationCenter does on iOS. * NetworkProcess/Downloads/Download.cpp: (WebKit::Download::didReceiveData): (WebKit::Download::didFinish): (WebKit::Download::didFail): (WebKit::Download::didCancel): * NetworkProcess/Downloads/Download.h: (WebKit::Download::applicationEnteredBackground): (WebKit::Download::applicationEnteredForeground): (WebKit::Download::manager const): * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::downloadFinished): (WebKit::DownloadManager::applicationDidEnterBackground): (WebKit::DownloadManager::applicationWillEnterForeground): * NetworkProcess/Downloads/DownloadManager.h: * NetworkProcess/Downloads/DownloadMap.cpp: (WebKit::DownloadMap::values): * NetworkProcess/Downloads/DownloadMap.h: * NetworkProcess/Downloads/DownloadMonitor.cpp: Added. (WebKit::operator _kbps): (WebKit::timeUntilNextInterval): (WebKit::DownloadMonitor::DownloadMonitor): (WebKit::DownloadMonitor::measuredThroughputRate const): (WebKit::DownloadMonitor::downloadReceivedBytes): (WebKit::DownloadMonitor::applicationEnteredForeground): (WebKit::DownloadMonitor::applicationEnteredBackground): (WebKit::DownloadMonitor::speedMultiplier const): (WebKit::DownloadMonitor::timerFired): * NetworkProcess/Downloads/DownloadMonitor.h: Added. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::applicationDidEnterBackground): (WebKit::NetworkProcess::applicationWillEnterForeground): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContext.cpp: (WKContextDownloadURLRequest): (WKContextResumeDownload): * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _synthesizeAppIsBackground:]): (-[WKProcessPool _downloadURLRequest:originatingWebView:]): * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration downloadMonitorSpeedMultiplier]): (-[_WKProcessPoolConfiguration setDownloadMonitorSpeedMultiplier:]): * UIProcess/Cocoa/DownloadProxyMapCocoa.mm: Added. (WebKit::DownloadProxyMap::platformCreate): (WebKit::DownloadProxyMap::platformDestroy): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didFinish): (WebKit::DownloadProxy::didFail): (WebKit::DownloadProxy::didCancel): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::DownloadProxyMap): (WebKit::DownloadProxyMap::~DownloadProxyMap): (WebKit::DownloadProxyMap::platformCreate): (WebKit::DownloadProxyMap::platformDestroy): (WebKit::DownloadProxyMap::applicationDidEnterBackground): (WebKit::DownloadProxyMap::applicationWillEnterForeground): (WebKit::DownloadProxyMap::createDownloadProxy): (WebKit::DownloadProxyMap::downloadFinished): * UIProcess/Downloads/DownloadProxyMap.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::synthesizeAppIsBackground): (WebKit::NetworkProcessProxy::createDownloadProxy): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::handleDownloadRequest): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::download): (WebKit::WebProcessPool::resumeDownload): (WebKit::WebProcessPool::createDownloadProxy): (WebKit::WebProcessPool::synthesizeAppIsBackground): * UIProcess/WebProcessPool.h: * UIProcess/ios/PageClientImplIOS.h: * UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::handleDownloadRequest): * UIProcess/mac/PageClientImplMac.h: * UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::handleDownloadRequest): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/TCPServer.cpp: Added. (TestWebKitAPI::TCPServer::TCPServer): (TestWebKitAPI::TCPServer::~TCPServer): (TestWebKitAPI::TCPServer::socketBindListen): (TestWebKitAPI::TCPServer::waitForAndReplyToRequests): * TestWebKitAPI/TCPServer.h: Added. (TestWebKitAPI::TCPServer::port const): * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (-[DownloadMonitorTestDelegate _downloadDidStart:]): (-[DownloadMonitorTestDelegate _downloadDidCancel:]): (-[DownloadMonitorTestDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]): (-[DownloadMonitorTestDelegate _download:didReceiveData:]): (TestWebKitAPI::respondSlowly): (TestWebKitAPI::webViewWithDownloadMonitorSpeedMultiplier): (TestWebKitAPI::downloadAtRate): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/210179@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-18 22:38:55 +00:00
NetworkProcess/Downloads/DownloadMonitor.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Move IndexedDB to Network Process https://bugs.webkit.org/show_bug.cgi?id=189415 <rdar://problem/44396973> Reviewed by Chris Dumez. Source/WebKit: We are going to eliminate storage process and move its functionality to network process. The reasons why we want to do this: 1. Lower resource usage of having an additional process for storage operations, especially memory. Single storage process takes about 5MB memory on macOS. 2. Reduce latency of Service Workers. After enabling Service Workers, we've seen regression in app launch. The launch time of storage process is partly attributed to this: Service Workers delay page loading until receiving response from storage process. 3. We choose network process because UI process may have broader access in file system that we don't want the storage operations to have. This patch is the first piece towards the goal. It mainly moves indexedDB from storage process to corresponding components of network process. Moving of Service Worker and stopping to launch storage process will be done in following patches. We expect to see the higher cpu and memory usage of network process as it is taking more work, but the overall gain in memory and latency after we completely remove storage process should be positive. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp. (WebKit::WebIDBConnectionToClient::create): (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient): (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient): (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess): (WebKit::WebIDBConnectionToClient::messageSenderConnection): (WebKit::WebIDBConnectionToClient::connectionToClient): (WebKit::WebIDBConnectionToClient::didDeleteDatabase): (WebKit::WebIDBConnectionToClient::didOpenDatabase): (WebKit::WebIDBConnectionToClient::didAbortTransaction): (WebKit::WebIDBConnectionToClient::didCommitTransaction): (WebKit::WebIDBConnectionToClient::didCreateObjectStore): (WebKit::WebIDBConnectionToClient::didDeleteObjectStore): (WebKit::WebIDBConnectionToClient::didRenameObjectStore): (WebKit::WebIDBConnectionToClient::didClearObjectStore): (WebKit::WebIDBConnectionToClient::didCreateIndex): (WebKit::WebIDBConnectionToClient::didDeleteIndex): (WebKit::WebIDBConnectionToClient::didRenameIndex): (WebKit::WebIDBConnectionToClient::didPutOrAdd): (WebKit::WebIDBConnectionToClient::handleGetResult): (WebKit::WebIDBConnectionToClient::didGetRecord): (WebKit::WebIDBConnectionToClient::didGetAllRecords): (WebKit::WebIDBConnectionToClient::didGetCount): (WebKit::WebIDBConnectionToClient::didDeleteRecord): (WebKit::WebIDBConnectionToClient::didOpenCursor): (WebKit::WebIDBConnectionToClient::didIterateCursor): (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent): (WebKit::WebIDBConnectionToClient::didStartTransaction): (WebKit::WebIDBConnectionToClient::didCloseFromServer): (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked): (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): (WebKit::WebIDBConnectionToClient::deleteDatabase): (WebKit::WebIDBConnectionToClient::openDatabase): (WebKit::WebIDBConnectionToClient::abortTransaction): (WebKit::WebIDBConnectionToClient::commitTransaction): (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction): (WebKit::WebIDBConnectionToClient::createObjectStore): (WebKit::WebIDBConnectionToClient::deleteObjectStore): (WebKit::WebIDBConnectionToClient::renameObjectStore): (WebKit::WebIDBConnectionToClient::clearObjectStore): (WebKit::WebIDBConnectionToClient::createIndex): (WebKit::WebIDBConnectionToClient::deleteIndex): (WebKit::WebIDBConnectionToClient::renameIndex): (WebKit::WebIDBConnectionToClient::putOrAdd): (WebKit::WebIDBConnectionToClient::getRecord): (WebKit::WebIDBConnectionToClient::getAllRecords): (WebKit::WebIDBConnectionToClient::getCount): (WebKit::WebIDBConnectionToClient::deleteRecord): (WebKit::WebIDBConnectionToClient::openCursor): (WebKit::WebIDBConnectionToClient::iterateCursor): (WebKit::WebIDBConnectionToClient::establishTransaction): (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose): (WebKit::WebIDBConnectionToClient::databaseConnectionClosed): (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded): (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent): (WebKit::WebIDBConnectionToClient::openDBRequestCancelled): (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer): (WebKit::WebIDBConnectionToClient::getAllDatabaseNames): * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): Code moved from StorageToWebProcessConnection::didReceiveMessage. (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): Network process receives and stores sandbox extension of temporary files for later indexedDB use. (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): (WebKit::generateIDBConnectionToServerIdentifier): (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer): (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::addWebsiteDataStore): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::idbServer): (WebKit::NetworkProcess::ensurePathExists): (WebKit::NetworkProcess::postStorageTask): (WebKit::NetworkProcess::performNextStorageTask): (WebKit::NetworkProcess::prepareForAccessToTemporaryFile): (WebKit::NetworkProcess::accessToTemporaryFileComplete): (WebKit::NetworkProcess::indexedDatabaseOrigins): (WebKit::NetworkProcess::addIndexedDatabaseSession): (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles): Instead of asking UI process to grant sandbox extension to storage process, now network process just asks for sandbox extension fot itself. (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles): (WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions): (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted. (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * Shared/Storage/StorageProcessCreationParameters.cpp: (WebKit::StorageProcessCreationParameters::encode const): (WebKit::StorageProcessCreationParameters::decode): * Shared/Storage/StorageProcessCreationParameters.h: * Shared/WebsiteDataStoreParameters.cpp: (WebKit::WebsiteDataStoreParameters::encode const): (WebKit::WebsiteDataStoreParameters::decode): (WebKit::WebsiteDataStoreParameters::privateSessionParameters): * Shared/WebsiteDataStoreParameters.h: * Sources.txt: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::fetchWebsiteData): (WebKit::StorageProcess::deleteWebsiteData): (WebKit::StorageProcess::deleteWebsiteDataForOrigins): (WebKit::StorageProcess::idbServer): Deleted. (WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted. (WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted. (WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted. (WebKit::StorageProcess::indexedDatabaseOrigins): Deleted. (WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted. (WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted. * StorageProcess/StorageProcess.h: (WebKit::StorageProcess::queue): Deleted. * StorageProcess/StorageProcess.messages.in: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::didReceiveMessage): (WebKit::StorageToWebProcessConnection::didClose): (WebKit::generateIDBConnectionToServerIdentifier): Deleted. (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted. (WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted. * StorageProcess/StorageToWebProcessConnection.h: * StorageProcess/StorageToWebProcessConnection.messages.in: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles): (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted. * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::computeNetworkProcessAccessTypeForDataRemoval): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::storageProcessParameters): (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer): (WebKit::WebIDBConnectionToServer::messageSenderConnection): * WebProcess/Databases/WebDatabaseProvider.cpp: (WebKit::WebDatabaseProvider::idbConnectionToServerForSession): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didClose): (WebKit::NetworkProcessConnection::idbConnectionToServerForSession): * WebProcess/Network/NetworkProcessConnection.h: (WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier const): * WebProcess/Storage/WebToStorageProcessConnection.cpp: (WebKit::WebToStorageProcessConnection::didReceiveMessage): (WebKit::WebToStorageProcessConnection::didClose): (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted. * WebProcess/Storage/WebToStorageProcessConnection.h: (WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::webToStorageProcessConnectionClosed): Tools: * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: (TEST): LayoutTests: * storage/indexeddb/modern/opendatabase-after-storage-crash.html: Canonical link: https://commits.webkit.org/204615@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-17 07:11:55 +00:00
NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp
IndexedDB: Introduce WebIDBServer class https://bugs.webkit.org/show_bug.cgi?id=205095 Reviewed by Alex Christensen. Source/WebCore: No behavior change. * Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::create): * Modules/indexeddb/server/IDBServer.h: Source/WebKit: Work towards <rdar://problem/56908496>. WebIDBServer currently is just a wrapper of WebCore::IDBServer. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: (WebKit::WebIDBConnectionToClient::idbServer): * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: * NetworkProcess/IndexedDB/WebIDBServer.cpp: Added. (WebKit::WebIDBServer::create): (WebKit::WebIDBServer::WebIDBServer): (WebKit::WebIDBServer::registerConnection): (WebKit::WebIDBServer::unregisterConnection): (WebKit::WebIDBServer::closeAndDeleteDatabasesModifiedSince): (WebKit::WebIDBServer::closeAndDeleteDatabasesForOrigins): (WebKit::WebIDBServer::suspend): (WebKit::WebIDBServer::resume): (WebKit::WebIDBServer::openDatabase): (WebKit::WebIDBServer::deleteDatabase): (WebKit::WebIDBServer::abortTransaction): (WebKit::WebIDBServer::commitTransaction): (WebKit::WebIDBServer::didFinishHandlingVersionChangeTransaction): (WebKit::WebIDBServer::createObjectStore): (WebKit::WebIDBServer::deleteObjectStore): (WebKit::WebIDBServer::renameObjectStore): (WebKit::WebIDBServer::clearObjectStore): (WebKit::WebIDBServer::createIndex): (WebKit::WebIDBServer::deleteIndex): (WebKit::WebIDBServer::renameIndex): (WebKit::WebIDBServer::putOrAdd): (WebKit::WebIDBServer::getRecord): (WebKit::WebIDBServer::getAllRecords): (WebKit::WebIDBServer::getCount): (WebKit::WebIDBServer::deleteRecord): (WebKit::WebIDBServer::openCursor): (WebKit::WebIDBServer::iterateCursor): (WebKit::WebIDBServer::establishTransaction): (WebKit::WebIDBServer::databaseConnectionPendingClose): (WebKit::WebIDBServer::databaseConnectionClosed): (WebKit::WebIDBServer::abortOpenAndUpgradeNeeded): (WebKit::WebIDBServer::didFireVersionChangeEvent): (WebKit::WebIDBServer::openDBRequestCancelled): (WebKit::WebIDBServer::getAllDatabaseNames): (WebKit::WebIDBServer::confirmDidCloseFromServer): * NetworkProcess/IndexedDB/WebIDBServer.h: Added. * NetworkProcess/NetworkProcess.cpp: replace WebCore::IDBServer with WebIDBServer. (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): (WebKit::NetworkProcess::prepareToSuspend): (WebKit::NetworkProcess::resume): (WebKit::NetworkProcess::createWebIDBServer): (WebKit::NetworkProcess::webIDBServer): (WebKit::NetworkProcess::createIDBServer): Deleted. (WebKit::NetworkProcess::idbServer): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::requestSpace): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Source/WebKitLegacy: * Storage/InProcessIDBServer.cpp: (InProcessIDBServer::create): Canonical link: https://commits.webkit.org/218329@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-11 21:47:39 +00:00
NetworkProcess/IndexedDB/WebIDBServer.cpp
Move IndexedDB to Network Process https://bugs.webkit.org/show_bug.cgi?id=189415 <rdar://problem/44396973> Reviewed by Chris Dumez. Source/WebKit: We are going to eliminate storage process and move its functionality to network process. The reasons why we want to do this: 1. Lower resource usage of having an additional process for storage operations, especially memory. Single storage process takes about 5MB memory on macOS. 2. Reduce latency of Service Workers. After enabling Service Workers, we've seen regression in app launch. The launch time of storage process is partly attributed to this: Service Workers delay page loading until receiving response from storage process. 3. We choose network process because UI process may have broader access in file system that we don't want the storage operations to have. This patch is the first piece towards the goal. It mainly moves indexedDB from storage process to corresponding components of network process. Moving of Service Worker and stopping to launch storage process will be done in following patches. We expect to see the higher cpu and memory usage of network process as it is taking more work, but the overall gain in memory and latency after we completely remove storage process should be positive. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp. (WebKit::WebIDBConnectionToClient::create): (WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient): (WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient): (WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess): (WebKit::WebIDBConnectionToClient::messageSenderConnection): (WebKit::WebIDBConnectionToClient::connectionToClient): (WebKit::WebIDBConnectionToClient::didDeleteDatabase): (WebKit::WebIDBConnectionToClient::didOpenDatabase): (WebKit::WebIDBConnectionToClient::didAbortTransaction): (WebKit::WebIDBConnectionToClient::didCommitTransaction): (WebKit::WebIDBConnectionToClient::didCreateObjectStore): (WebKit::WebIDBConnectionToClient::didDeleteObjectStore): (WebKit::WebIDBConnectionToClient::didRenameObjectStore): (WebKit::WebIDBConnectionToClient::didClearObjectStore): (WebKit::WebIDBConnectionToClient::didCreateIndex): (WebKit::WebIDBConnectionToClient::didDeleteIndex): (WebKit::WebIDBConnectionToClient::didRenameIndex): (WebKit::WebIDBConnectionToClient::didPutOrAdd): (WebKit::WebIDBConnectionToClient::handleGetResult): (WebKit::WebIDBConnectionToClient::didGetRecord): (WebKit::WebIDBConnectionToClient::didGetAllRecords): (WebKit::WebIDBConnectionToClient::didGetCount): (WebKit::WebIDBConnectionToClient::didDeleteRecord): (WebKit::WebIDBConnectionToClient::didOpenCursor): (WebKit::WebIDBConnectionToClient::didIterateCursor): (WebKit::WebIDBConnectionToClient::fireVersionChangeEvent): (WebKit::WebIDBConnectionToClient::didStartTransaction): (WebKit::WebIDBConnectionToClient::didCloseFromServer): (WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked): (WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames): (WebKit::WebIDBConnectionToClient::deleteDatabase): (WebKit::WebIDBConnectionToClient::openDatabase): (WebKit::WebIDBConnectionToClient::abortTransaction): (WebKit::WebIDBConnectionToClient::commitTransaction): (WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction): (WebKit::WebIDBConnectionToClient::createObjectStore): (WebKit::WebIDBConnectionToClient::deleteObjectStore): (WebKit::WebIDBConnectionToClient::renameObjectStore): (WebKit::WebIDBConnectionToClient::clearObjectStore): (WebKit::WebIDBConnectionToClient::createIndex): (WebKit::WebIDBConnectionToClient::deleteIndex): (WebKit::WebIDBConnectionToClient::renameIndex): (WebKit::WebIDBConnectionToClient::putOrAdd): (WebKit::WebIDBConnectionToClient::getRecord): (WebKit::WebIDBConnectionToClient::getAllRecords): (WebKit::WebIDBConnectionToClient::getCount): (WebKit::WebIDBConnectionToClient::deleteRecord): (WebKit::WebIDBConnectionToClient::openCursor): (WebKit::WebIDBConnectionToClient::iterateCursor): (WebKit::WebIDBConnectionToClient::establishTransaction): (WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose): (WebKit::WebIDBConnectionToClient::databaseConnectionClosed): (WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded): (WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent): (WebKit::WebIDBConnectionToClient::openDBRequestCancelled): (WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer): (WebKit::WebIDBConnectionToClient::getAllDatabaseNames): * NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h. * NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): Code moved from StorageToWebProcessConnection::didReceiveMessage. (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): Network process receives and stores sandbox extension of temporary files for later indexedDB use. (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles): (WebKit::generateIDBConnectionToServerIdentifier): (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer): (WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::addWebsiteDataStore): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::idbServer): (WebKit::NetworkProcess::ensurePathExists): (WebKit::NetworkProcess::postStorageTask): (WebKit::NetworkProcess::performNextStorageTask): (WebKit::NetworkProcess::prepareForAccessToTemporaryFile): (WebKit::NetworkProcess::accessToTemporaryFileComplete): (WebKit::NetworkProcess::indexedDatabaseOrigins): (WebKit::NetworkProcess::addIndexedDatabaseSession): (WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles): Instead of asking UI process to grant sandbox extension to storage process, now network process just asks for sandbox extension fot itself. (WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles): (WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions): (WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted. (WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * Shared/Storage/StorageProcessCreationParameters.cpp: (WebKit::StorageProcessCreationParameters::encode const): (WebKit::StorageProcessCreationParameters::decode): * Shared/Storage/StorageProcessCreationParameters.h: * Shared/WebsiteDataStoreParameters.cpp: (WebKit::WebsiteDataStoreParameters::encode const): (WebKit::WebsiteDataStoreParameters::decode): (WebKit::WebsiteDataStoreParameters::privateSessionParameters): * Shared/WebsiteDataStoreParameters.h: * Sources.txt: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::fetchWebsiteData): (WebKit::StorageProcess::deleteWebsiteData): (WebKit::StorageProcess::deleteWebsiteDataForOrigins): (WebKit::StorageProcess::idbServer): Deleted. (WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted. (WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted. (WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted. (WebKit::StorageProcess::indexedDatabaseOrigins): Deleted. (WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted. (WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted. * StorageProcess/StorageProcess.h: (WebKit::StorageProcess::queue): Deleted. * StorageProcess/StorageProcess.messages.in: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::didReceiveMessage): (WebKit::StorageToWebProcessConnection::didClose): (WebKit::generateIDBConnectionToServerIdentifier): Deleted. (WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted. (WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted. * StorageProcess/StorageToWebProcessConnection.h: * StorageProcess/StorageToWebProcessConnection.messages.in: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles): (WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted. * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::computeNetworkProcessAccessTypeForDataRemoval): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::storageProcessParameters): (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): (WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer): (WebKit::WebIDBConnectionToServer::messageSenderConnection): * WebProcess/Databases/WebDatabaseProvider.cpp: (WebKit::WebDatabaseProvider::idbConnectionToServerForSession): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didClose): (WebKit::NetworkProcessConnection::idbConnectionToServerForSession): * WebProcess/Network/NetworkProcessConnection.h: (WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier const): * WebProcess/Storage/WebToStorageProcessConnection.cpp: (WebKit::WebToStorageProcessConnection::didReceiveMessage): (WebKit::WebToStorageProcessConnection::didClose): (WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted. * WebProcess/Storage/WebToStorageProcessConnection.h: (WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::webToStorageProcessConnectionClosed): Tools: * TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm: (TEST): * TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: (TEST): LayoutTests: * storage/indexeddb/modern/opendatabase-after-storage-crash.html: Canonical link: https://commits.webkit.org/204615@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-17 07:11:55 +00:00
Introduce ServiceWorkerFetchTask https://bugs.webkit.org/show_bug.cgi?id=195130 Reviewed by Chris Dumez. ServiceWorkerFetchTask is added to represent NetworkProcess side of an ongoing fetch intercepted by service worker. This patch should not change existing behavior. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didFailFetch): Deleted. (WebKit::NetworkProcess::didNotHandleFetch): Deleted. (WebKit::NetworkProcess::didReceiveFetchRedirectResponse): Deleted. (WebKit::NetworkProcess::didReceiveFetchResponse): Deleted. (WebKit::NetworkProcess::didReceiveFetchData): Deleted. (WebKit::NetworkProcess::didReceiveFetchFormData): Deleted. (WebKit::NetworkProcess::didFinishFetch): Deleted. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::cancelFetch): (WebKit::WebSWServerConnection::continueDidReceiveFetchResponse): (WebKit::WebSWServerConnection::startFetch): (WebKit::WebSWServerConnection::didReceiveFetchRedirectResponse): Deleted. (WebKit::WebSWServerConnection::didReceiveFetchResponse): Deleted. (WebKit::WebSWServerConnection::didReceiveFetchData): Deleted. (WebKit::WebSWServerConnection::didReceiveFetchFormData): Deleted. (WebKit::WebSWServerConnection::didFinishFetch): Deleted. (WebKit::WebSWServerConnection::didFailFetch): Deleted. (WebKit::WebSWServerConnection::didNotHandleFetch): Deleted. * NetworkProcess/ServiceWorker/WebSWServerConnection.h: * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp: (WebKit::WebSWServerToContextConnection::connectionClosed): (WebKit::WebSWServerToContextConnection::startFetch): (WebKit::WebSWServerToContextConnection::cancelFetch): (WebKit::WebSWServerToContextConnection::continueDidReceiveFetchResponse): (WebKit::WebSWServerToContextConnection::didReceiveFetchTaskMessage): * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::startFetch): * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: (WebKit::WebServiceWorkerFetchTaskClient::didReceiveRedirection): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormDataAndFinish): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk): (WebKit::WebServiceWorkerFetchTaskClient::didFail): (WebKit::WebServiceWorkerFetchTaskClient::didFinish): (WebKit::WebServiceWorkerFetchTaskClient::didNotHandle): * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: Added. (WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse): (WebKit::ServiceWorkerFetchTask::didReceiveResponse): (WebKit::ServiceWorkerFetchTask::didReceiveData): (WebKit::ServiceWorkerFetchTask::didReceiveFormData): (WebKit::ServiceWorkerFetchTask::didFinish): (WebKit::ServiceWorkerFetchTask::didFail): (WebKit::ServiceWorkerFetchTask::didNotHandle): * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: Added. (WebKit::ServiceWorkerFetchTask::create): (WebKit::ServiceWorkerFetchTask::Identifier::hash const): (WebKit::ServiceWorkerFetchTask::identifier const): (WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask): (WebKit::operator==): (WTF::ServiceWorkerFetchTaskIdentifierHash::hash): (WTF::ServiceWorkerFetchTaskIdentifierHash::equal): (WTF::HashTraits<WebKit::ServiceWorkerFetchTask::Identifier>::emptyValue): (WTF::HashTraits<WebKit::ServiceWorkerFetchTask::Identifier>::constructDeletedValue): (WTF::HashTraits<WebKit::ServiceWorkerFetchTask::Identifier>::isDeletedValue): * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in: Added. Canonical link: https://commits.webkit.org/209676@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-05 21:49:28 +00:00
NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp @no-unify
Move soft update handling to network process https://bugs.webkit.org/show_bug.cgi?id=204678 Reviewed by Chris Dumez. Source/WebCore: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::validateResponse): (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoader.h: * workers/service/ServiceWorkerJobData.cpp: (WebCore::ServiceWorkerJobData::isEquivalent const): * workers/service/ServiceWorkerJobData.h: * workers/service/ServiceWorkerRegistration.cpp: (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration): * workers/service/ServiceWorkerRegistration.h: * workers/service/context/SWContextManager.cpp: * workers/service/context/SWContextManager.h: * workers/service/context/ServiceWorkerFetch.cpp: (WebCore::ServiceWorkerFetch::dispatchFetchEvent): * workers/service/context/ServiceWorkerThread.cpp: * workers/service/context/ServiceWorkerThread.h: * workers/service/server/SWServer.cpp: (WebCore::SWServer::Connection::didResolveRegistrationPromise): (WebCore::SWServer::SWServer): (WebCore::SWServer::scheduleJob): (WebCore::SWServer::resolveRegistrationJob): (WebCore::originURL): (WebCore::SWServer::startScriptFetch): (WebCore::SWServer::scriptFetchFinished): (WebCore::SWServer::didResolveRegistrationPromise): (WebCore::SWServer::softUpdate): * workers/service/server/SWServer.h: (WebCore::SWServer::getRegistration): * workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::runUpdateJob): * workers/service/server/SWServerJobQueue.h: (WebCore::SWServerJobQueue::enqueueJob): * workers/service/server/SWServerRegistration.cpp: (WebCore::SWServerRegistration::SWServerRegistration): (WebCore::SWServerRegistration::setUpdateViaCache): (WebCore::SWServerRegistration::softUpdate): (WebCore::SWServerRegistration::scheduleSoftUpdate): * workers/service/server/SWServerRegistration.h: (WebCore::SWServerRegistration::scopeURLWithoutFragment const): (WebCore::SWServerRegistration::scriptURL const): * workers/service/server/SWServerToContextConnection.h: Source/WebKit: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::swServerForSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::addSoftUpdateLoader): (WebKit::NetworkSession::removeSoftUpdateLoader): * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: (WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask): (WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse): (WebKit::ServiceWorkerFetchTask::didReceiveResponse): (WebKit::ServiceWorkerFetchTask::didFail): (WebKit::ServiceWorkerFetchTask::didNotHandle): (WebKit::ServiceWorkerFetchTask::continueFetchTaskWith): (WebKit::ServiceWorkerFetchTask::timeoutTimerFired): (WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded): * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: * NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp: Added. (WebKit::ServiceWorkerSoftUpdateLoader::start): (WebKit::ServiceWorkerSoftUpdateLoader::ServiceWorkerSoftUpdateLoader): (WebKit::ServiceWorkerSoftUpdateLoader::~ServiceWorkerSoftUpdateLoader): (WebKit::ServiceWorkerSoftUpdateLoader::fail): (WebKit::ServiceWorkerSoftUpdateLoader::loadWithCacheEntry): (WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork): (WebKit::ServiceWorkerSoftUpdateLoader::willSendRedirectedRequest): (WebKit::ServiceWorkerSoftUpdateLoader::didReceiveResponse): (WebKit::ServiceWorkerSoftUpdateLoader::didReceiveBuffer): (WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading): (WebKit::ServiceWorkerSoftUpdateLoader::didFailLoading): (WebKit::ServiceWorkerSoftUpdateLoader::didComplete): * NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h: Added. * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: (WebKit::WebSWServerConnection::createFetchTask): * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp: * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h: * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Storage/WebSWContextManagerConnection.cpp: * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebSWContextManagerConnection.messages.in: Canonical link: https://commits.webkit.org/218064@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-04 13:47:49 +00:00
NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp
Move Service Worker Management from Storage Process to Network Process https://bugs.webkit.org/show_bug.cgi?id=189422 Reviewed by Youenn Fablet. Source/WebKit: After r236035, this is another piece to move functionality of storage process to network process. When we enable Service Workers, network process instead of storage process will be launched. This patch will not change the behavior of Service Worker. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::unregisterSWConnections): (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): (WebKit::NetworkProcess::addWebsiteDataStore): (WebKit::NetworkProcess::destroySession): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::NetworkProcess::connectionToContextProcessFromIPCConnection): (WebKit::NetworkProcess::connectionToContextProcessWasClosed): (WebKit::NetworkProcess::needsServerToContextConnectionForOrigin const): (WebKit::NetworkProcess::swServerForSession): (WebKit::NetworkProcess::swOriginStoreForSession): (WebKit::NetworkProcess::existingSWOriginStoreForSession const): (WebKit::NetworkProcess::serverToContextConnectionForOrigin): (WebKit::NetworkProcess::createServerToContextConnection): (WebKit::NetworkProcess::didFailFetch): (WebKit::NetworkProcess::didNotHandleFetch): (WebKit::NetworkProcess::didReceiveFetchResponse): (WebKit::NetworkProcess::didReceiveFetchData): (WebKit::NetworkProcess::didReceiveFetchFormData): (WebKit::NetworkProcess::didFinishFetch): (WebKit::NetworkProcess::postMessageToServiceWorkerClient): (WebKit::NetworkProcess::postMessageToServiceWorker): (WebKit::NetworkProcess::registerSWServerConnection): (WebKit::NetworkProcess::unregisterSWServerConnection): (WebKit::NetworkProcess::swContextConnectionMayNoLongerBeNeeded): (WebKit::NetworkProcess::disableServiceWorkerProcessTerminationDelay): (WebKit::NetworkProcess::addServiceWorkerSession): * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::parentProcessHasServiceWorkerEntitlement const): * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode const): (WebKit::NetworkProcessCreationParameters::decode): * NetworkProcess/NetworkProcessCreationParameters.h: * NetworkProcess/ServiceWorker/WebSWOriginStore.cpp: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWOriginStore.cpp. (WebKit::WebSWOriginStore::WebSWOriginStore): (WebKit::WebSWOriginStore::addToStore): (WebKit::WebSWOriginStore::removeFromStore): (WebKit::WebSWOriginStore::clearStore): (WebKit::WebSWOriginStore::importComplete): (WebKit::WebSWOriginStore::registerSWServerConnection): (WebKit::WebSWOriginStore::unregisterSWServerConnection): (WebKit::WebSWOriginStore::sendStoreHandle): (WebKit::WebSWOriginStore::didInvalidateSharedMemory): * NetworkProcess/ServiceWorker/WebSWOriginStore.h: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWOriginStore.h. * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp. (WebKit::WebSWServerConnection::WebSWServerConnection): (WebKit::WebSWServerConnection::~WebSWServerConnection): (WebKit::WebSWServerConnection::rejectJobInClient): (WebKit::WebSWServerConnection::resolveRegistrationJobInClient): (WebKit::WebSWServerConnection::resolveUnregistrationJobInClient): (WebKit::WebSWServerConnection::startScriptFetchInClient): (WebKit::WebSWServerConnection::updateRegistrationStateInClient): (WebKit::WebSWServerConnection::fireUpdateFoundEvent): (WebKit::WebSWServerConnection::setRegistrationLastUpdateTime): (WebKit::WebSWServerConnection::setRegistrationUpdateViaCache): (WebKit::WebSWServerConnection::notifyClientsOfControllerChange): (WebKit::WebSWServerConnection::updateWorkerStateInClient): (WebKit::WebSWServerConnection::cancelFetch): (WebKit::WebSWServerConnection::startFetch): (WebKit::WebSWServerConnection::postMessageToServiceWorker): (WebKit::WebSWServerConnection::scheduleJobInServer): (WebKit::WebSWServerConnection::didReceiveFetchResponse): (WebKit::WebSWServerConnection::didReceiveFetchData): (WebKit::WebSWServerConnection::didReceiveFetchFormData): (WebKit::WebSWServerConnection::didFinishFetch): (WebKit::WebSWServerConnection::didFailFetch): (WebKit::WebSWServerConnection::didNotHandleFetch): (WebKit::WebSWServerConnection::postMessageToServiceWorkerClient): (WebKit::WebSWServerConnection::matchRegistration): (WebKit::WebSWServerConnection::registrationReady): (WebKit::WebSWServerConnection::getRegistrations): (WebKit::WebSWServerConnection::registerServiceWorkerClient): (WebKit::WebSWServerConnection::unregisterServiceWorkerClient): (WebKit::WebSWServerConnection::sendToContextProcess): * NetworkProcess/ServiceWorker/WebSWServerConnection.h: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h. (WebKit::WebSWServerConnection::ipcConnection const): (WebKit::WebSWServerConnection::sessionID const): * NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in. * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.cpp. (WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection): (WebKit::WebSWServerToContextConnection::messageSenderConnection): (WebKit::WebSWServerToContextConnection::messageSenderDestinationID): (WebKit::WebSWServerToContextConnection::connectionClosed): (WebKit::WebSWServerToContextConnection::installServiceWorkerContext): (WebKit::WebSWServerToContextConnection::fireInstallEvent): (WebKit::WebSWServerToContextConnection::fireActivateEvent): (WebKit::WebSWServerToContextConnection::terminateWorker): (WebKit::WebSWServerToContextConnection::syncTerminateWorker): (WebKit::WebSWServerToContextConnection::findClientByIdentifierCompleted): (WebKit::WebSWServerToContextConnection::matchAllCompleted): (WebKit::WebSWServerToContextConnection::claimCompleted): (WebKit::WebSWServerToContextConnection::didFinishSkipWaiting): (WebKit::WebSWServerToContextConnection::connectionMayNoLongerBeNeeded): (WebKit::WebSWServerToContextConnection::terminate): * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.h. (WebKit::WebSWServerToContextConnection::create): (WebKit::WebSWServerToContextConnection::ipcConnection const): * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in: Renamed from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in. * NetworkProcess/ios/NetworkProcessIOS.mm: (WebKit::NetworkProcess::parentProcessHasServiceWorkerEntitlement const): * Shared/Storage/StorageProcessCreationParameters.cpp: (WebKit::StorageProcessCreationParameters::encode const): (WebKit::StorageProcessCreationParameters::decode): * Shared/Storage/StorageProcessCreationParameters.h: (): Deleted. * Shared/WebsiteDataStoreParameters.cpp: (WebKit::WebsiteDataStoreParameters::encode const): (WebKit::WebsiteDataStoreParameters::decode): (WebKit::WebsiteDataStoreParameters::privateSessionParameters): * Shared/WebsiteDataStoreParameters.h: * Sources.txt: * StorageProcess/StorageProcess.cpp: (WebKit::StorageProcess::didReceiveMessage): (WebKit::StorageProcess::initializeWebsiteDataStore): (WebKit::StorageProcess::createStorageToWebProcessConnection): (WebKit::StorageProcess::destroySession): (WebKit::StorageProcess::fetchWebsiteData): (WebKit::StorageProcess::deleteWebsiteData): (WebKit::StorageProcess::deleteWebsiteDataForOrigins): (WebKit::StorageProcess::connectionToContextProcessFromIPCConnection): Deleted. (WebKit::StorageProcess::connectionToContextProcessWasClosed): Deleted. (WebKit::StorageProcess::needsServerToContextConnectionForOrigin const): Deleted. (WebKit::StorageProcess::swServerForSession): Deleted. (WebKit::StorageProcess::swOriginStoreForSession): Deleted. (WebKit::StorageProcess::existingSWOriginStoreForSession const): Deleted. (WebKit::StorageProcess::serverToContextConnectionForOrigin): Deleted. (WebKit::StorageProcess::createServerToContextConnection): Deleted. (WebKit::StorageProcess::didFailFetch): Deleted. (WebKit::StorageProcess::didNotHandleFetch): Deleted. (WebKit::StorageProcess::didReceiveFetchResponse): Deleted. (WebKit::StorageProcess::didReceiveFetchData): Deleted. (WebKit::StorageProcess::didReceiveFetchFormData): Deleted. (WebKit::StorageProcess::didFinishFetch): Deleted. (WebKit::StorageProcess::postMessageToServiceWorkerClient): Deleted. (WebKit::StorageProcess::postMessageToServiceWorker): Deleted. (WebKit::StorageProcess::registerSWServerConnection): Deleted. (WebKit::StorageProcess::unregisterSWServerConnection): Deleted. (WebKit::StorageProcess::swContextConnectionMayNoLongerBeNeeded): Deleted. (WebKit::StorageProcess::disableServiceWorkerProcessTerminationDelay): Deleted. * StorageProcess/StorageProcess.h: (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Deleted. (): Deleted. * StorageProcess/StorageProcess.messages.in: * StorageProcess/StorageToWebProcessConnection.cpp: (WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): (WebKit::StorageToWebProcessConnection::didReceiveMessage): (WebKit::StorageToWebProcessConnection::didReceiveSyncMessage): (WebKit::StorageToWebProcessConnection::didClose): (WebKit::StorageToWebProcessConnection::unregisterSWConnections): Deleted. (WebKit::StorageToWebProcessConnection::establishSWServerConnection): Deleted. * StorageProcess/StorageToWebProcessConnection.h: * StorageProcess/StorageToWebProcessConnection.messages.in: * StorageProcess/ios/StorageProcessIOS.mm: (WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Deleted. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::getNetworkProcessConnection): (WebKit::NetworkProcessProxy::networkProcessCrashed): (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess): (WebKit::NetworkProcessProxy::didFinishLaunching): (WebKit::NetworkProcessProxy::establishWorkerContextConnectionToNetworkProcess): (WebKit::NetworkProcessProxy::establishWorkerContextConnectionToNetworkProcessForExplicitSession): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/ServiceWorkerProcessProxy.cpp: (WebKit::ServiceWorkerProcessProxy::start): * UIProcess/Storage/StorageProcessProxy.cpp: (WebKit::StorageProcessProxy::getStorageProcessConnection): (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcess): Deleted. (WebKit::StorageProcessProxy::establishWorkerContextConnectionToStorageProcessForExplicitSession): Deleted. * UIProcess/Storage/StorageProcessProxy.h: * UIProcess/Storage/StorageProcessProxy.messages.in: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::networkProcessCrashed): (WebKit::WebProcessPool::getNetworkProcessConnection): (WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore): (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess): (WebKit::WebProcessPool::disableServiceWorkerProcessTerminationDelay): (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore): (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle): (WebKit::WebProcessPool::postMessageToServiceWorkerClient): (WebKit::WebProcessPool::postMessageToServiceWorker): (WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess): Deleted. * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getNetworkProcessConnection): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::computeNetworkProcessAccessTypeForDataRemoval): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::storageProcessParameters): (WebKit::WebsiteDataStore::parameters): * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didReceiveSyncMessage): (WebKit::NetworkProcessConnection::didClose): (WebKit::NetworkProcessConnection::serviceWorkerConnectionForSession): * WebProcess/Network/NetworkProcessConnection.h: (WebKit::NetworkProcessConnection::existingServiceWorkerConnectionForSession): * WebProcess/Storage/WebSWClientConnection.cpp: (WebKit::WebSWClientConnection::WebSWClientConnection): * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection): (WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage): (WebKit::WebSWContextManagerConnection::startFetch): (WebKit::WebSWContextManagerConnection::didFinishInstall): (WebKit::WebSWContextManagerConnection::didFinishActivation): (WebKit::WebSWContextManagerConnection::setServiceWorkerHasPendingEvents): (WebKit::WebSWContextManagerConnection::skipWaiting): (WebKit::WebSWContextManagerConnection::setScriptResource): (WebKit::WebSWContextManagerConnection::workerTerminated): (WebKit::WebSWContextManagerConnection::findClientByIdentifier): (WebKit::WebSWContextManagerConnection::matchAll): (WebKit::WebSWContextManagerConnection::claim): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: (WebKit::WebServiceWorkerFetchTaskClient::didReceiveResponse): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveData): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormDataAndFinish): (WebKit::WebServiceWorkerFetchTaskClient::didReceiveBlobChunk): (WebKit::WebServiceWorkerFetchTaskClient::didFail): (WebKit::WebServiceWorkerFetchTaskClient::didFinish): (WebKit::WebServiceWorkerFetchTaskClient::didNotHandle): * WebProcess/Storage/WebServiceWorkerProvider.cpp: (WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession): (WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession): (WebKit::WebServiceWorkerProvider::handleFetch): * WebProcess/Storage/WebToStorageProcessConnection.cpp: (WebKit::WebToStorageProcessConnection::didReceiveMessage): (WebKit::WebToStorageProcessConnection::didReceiveSyncMessage): (WebKit::WebToStorageProcessConnection::didClose): (WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession): Deleted. * WebProcess/Storage/WebToStorageProcessConnection.h: (WebKit::WebToStorageProcessConnection::existingServiceWorkerConnectionForSession): Deleted. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::webToStorageProcessConnectionClosed): (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): (WebKit::WebProcess::establishWorkerContextConnectionToStorageProcess): Deleted. * WebProcess/WebProcess.h: (WebKit::WebProcess::existingNetworkProcessConnection): (WebKit::WebProcess::existingWebToStorageProcessConnection): Deleted. * WebProcess/WebProcess.messages.in: Tools: Change a check in ServiceWorkers.HasServiceWorkerRegistrationBit as storage process is not launched during service worker operations now. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: Canonical link: https://commits.webkit.org/204927@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Move Web Storage to Network Process https://bugs.webkit.org/show_bug.cgi?id=197636 Source/WebKit: Reviewed by Youenn Fablet. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::webPageWasAdded): (WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): (WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::networkSessionByConnection const): (WebKit::NetworkProcess::hasLocalStorage): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::filterForRegistrableDomains): (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): (WebKit::NetworkProcess::webPageWasAdded): (WebKit::NetworkProcess::webPageWasRemoved): (WebKit::NetworkProcess::webProcessWasDisconnected): (WebKit::NetworkProcess::webProcessSessionChanged): (WebKit::NetworkProcess::getLocalStorageOriginDetails): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::~NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::storageManager): * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::privateSessionParameters): (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.cpp. (WebKit::LocalStorageDatabase::create): (WebKit::LocalStorageDatabase::LocalStorageDatabase): (WebKit::LocalStorageDatabase::~LocalStorageDatabase): (WebKit::LocalStorageDatabase::openDatabase): (WebKit::LocalStorageDatabase::tryToOpenDatabase): (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded): (WebKit::LocalStorageDatabase::importItems): (WebKit::LocalStorageDatabase::setItem): (WebKit::LocalStorageDatabase::removeItem): (WebKit::LocalStorageDatabase::clear): (WebKit::LocalStorageDatabase::close): (WebKit::LocalStorageDatabase::itemDidChange): (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): (WebKit::LocalStorageDatabase::updateDatabase): (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems): (WebKit::LocalStorageDatabase::databaseIsEmpty): * NetworkProcess/WebStorage/LocalStorageDatabase.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.h. * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp. (WebKit::LocalStorageDatabaseTracker::create): (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::databasePath const): (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases): (WebKit::LocalStorageDatabaseTracker::databasesModifiedSince): (WebKit::LocalStorageDatabaseTracker::origins const): (WebKit::LocalStorageDatabaseTracker::originDetails): * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.h. * NetworkProcess/WebStorage/StorageManager.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.cpp. (WebKit::StorageManager::StorageArea::securityOrigin const): (WebKit::StorageManager::StorageArea::isSessionStorage const): (WebKit::StorageManager::LocalStorageNamespace::storageManager const): (WebKit::StorageManager::TransientLocalStorageNamespace::create): (WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace): (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::TransientLocalStorageNamespace::origins const): (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (WebKit::StorageManager::StorageArea::~StorageArea): (WebKit::StorageManager::StorageArea::addListener): (WebKit::StorageManager::StorageArea::removeListener): (WebKit::StorageManager::StorageArea::hasListener const): (WebKit::StorageManager::StorageArea::clone const): (WebKit::StorageManager::StorageArea::setItem): (WebKit::StorageManager::StorageArea::removeItem): (WebKit::StorageManager::StorageArea::clear): (WebKit::StorageManager::StorageArea::items const): (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const): (WebKit::StorageManager::StorageArea::dispatchEvents const): (WebKit::StorageManager::LocalStorageNamespace::create): (WebKit::StorageManager::LocalStorageNamespace::LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea): (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::isEmpty const): (WebKit::StorageManager::SessionStorageNamespace::allowedConnections const): (WebKit::StorageManager::SessionStorageNamespace::origins const): (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::addAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::removeAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::SessionStorageNamespace::cloneTo): (WebKit::StorageManager::create): (WebKit::StorageManager::StorageManager): (WebKit::StorageManager::~StorageManager): (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::destroySessionStorageNamespace): (WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::cloneSessionStorageNamespace): (WebKit::StorageManager::processWillOpenConnection): (WebKit::StorageManager::processDidCloseConnection): (WebKit::StorageManager::getSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins): (WebKit::StorageManager::getLocalStorageOrigins): (WebKit::StorageManager::getLocalStorageOriginDetails): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins): (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::createTransientLocalStorageMap): (WebKit::StorageManager::createSessionStorageMap): (WebKit::StorageManager::destroyStorageMap): (WebKit::StorageManager::getValues): (WebKit::StorageManager::setItem): (WebKit::StorageManager::removeItem): (WebKit::StorageManager::clear): (WebKit::StorageManager::applicationWillTerminate): (WebKit::StorageManager::findStorageArea const): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): * NetworkProcess/WebStorage/StorageManager.h: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.h. * NetworkProcess/WebStorage/StorageManager.messages.in: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.messages.in. * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm. (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * NetworkProcess/curl/NetworkSessionCurl.cpp: (WebKit::NetworkSessionCurl::NetworkSessionCurl): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): * PlatformMac.cmake: * PlatformWin.cmake: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/WebsiteData/WebsiteData.cpp: (WebKit::WebsiteData::ownerProcess): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/C/WKKeyValueStorageManager.cpp: (WKKeyValueStorageManagerGetKeyValueStorageOrigins): (WKKeyValueStorageManagerGetStorageDetailsByOrigin): (WKKeyValueStorageManagerDeleteEntriesForOrigin): (WKKeyValueStorageManagerDeleteAllEntries): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::hasLocalStorage): (WebKit::NetworkProcessProxy::getLocalStorageDetails): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createNewPage): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::platformInitialize): (WebKit::WebsiteDataStore::platformDestroy): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::hasLocalStorageForTesting const): (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::getLocalStorageDetails): (WebKit::m_client): Deleted. (WebKit::WebsiteDataStore::cloneSessionData): Deleted. (WebKit::WebsiteDataStore::webPageWasAdded): Deleted. (WebKit::WebsiteDataStore::webPageWasInvalidated): Deleted. (WebKit::WebsiteDataStore::webProcessWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageDidCloseConnection): Deleted. (WebKit::WebsiteDataStore::webProcessDidCloseConnection): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::resolvedLocalStorageDirectory const): (WebKit::WebsiteDataStore::storageManager): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::createWebPage): (WebKit::WebProcess::removeWebPage): (WebKit::WebProcess::ensureNetworkProcessConnection): (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::registerStorageAreaMap): (WebKit::WebProcess::unregisterStorageAreaMap): (WebKit::WebProcess::storageAreaMap const): (WebKit::WebProcess::enablePrivateBrowsingForTesting): * WebProcess/WebProcess.h: * WebProcess/WebStorage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): (WebKit::StorageAreaMap::~StorageAreaMap): (WebKit::StorageAreaMap::setItem): (WebKit::StorageAreaMap::removeItem): (WebKit::StorageAreaMap::clear): (WebKit::StorageAreaMap::loadValuesIfNeeded): (WebKit::StorageAreaMap::connect): (WebKit::StorageAreaMap::disconnect): * WebProcess/WebStorage/StorageAreaMap.h: (WebKit::StorageAreaMap::identifier const): Tools: Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: Remove the wait for database file update. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Add a test for network process crash recovery. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Fix a typo and add a test case to cover it. * TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-crashes.html: Added. Canonical link: https://commits.webkit.org/212148@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-21 00:07:39 +00:00
NetworkProcess/WebStorage/LocalStorageDatabase.cpp
NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp
Move classes declared inside StorageManager.cpp into their own headers https://bugs.webkit.org/show_bug.cgi?id=200527 Reviewed by Alex Christensen. Move classes declared inside StorageManager.cpp into their own headers for clarity. StorageManager.cpp was getting really big. * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: Added. (WebKit::LocalStorageNamespace::LocalStorageNamespace): (WebKit::LocalStorageNamespace::~LocalStorageNamespace): (WebKit::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::LocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::LocalStorageNamespace::clearAllStorageAreas): (WebKit::LocalStorageNamespace::ephemeralOrigins const): (WebKit::LocalStorageNamespace::cloneTo): * NetworkProcess/WebStorage/LocalStorageNamespace.h: Added. (WebKit::LocalStorageNamespace::create): (WebKit::LocalStorageNamespace::storageManager const): * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: Added. (WebKit::SessionStorageNamespace::SessionStorageNamespace): (WebKit::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::SessionStorageNamespace::addAllowedConnection): (WebKit::SessionStorageNamespace::removeAllowedConnection): (WebKit::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::SessionStorageNamespace::cloneTo): (WebKit::SessionStorageNamespace::origins const): (WebKit::SessionStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::SessionStorageNamespace::clearAllStorageAreas): * NetworkProcess/WebStorage/SessionStorageNamespace.h: Added. (WebKit::SessionStorageNamespace::create): (WebKit::SessionStorageNamespace::isEmpty const): (WebKit::SessionStorageNamespace::allowedConnections const): * NetworkProcess/WebStorage/StorageArea.cpp: Added. (WebKit::StorageArea::StorageArea): (WebKit::StorageArea::~StorageArea): (WebKit::StorageArea::addListener): (WebKit::StorageArea::removeListener): (WebKit::StorageArea::hasListener const): (WebKit::StorageArea::clone const): (WebKit::StorageArea::setItem): (WebKit::StorageArea::setItems): (WebKit::StorageArea::removeItem): (WebKit::StorageArea::clear): (WebKit::StorageArea::items const): (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const): (WebKit::StorageArea::dispatchEvents const): * NetworkProcess/WebStorage/StorageArea.h: Added. (WebKit::StorageArea::create): (WebKit::StorageArea::securityOrigin const): (WebKit::StorageArea::isEphemeral const): * NetworkProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::findStorageArea const): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): * NetworkProcess/WebStorage/StorageManager.h: (WebKit::StorageManager::create): (WebKit::StorageManager::localStorageDatabaseTracker const): (WebKit::StorageManager::workQueue const): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: Added. (WebKit::TransientLocalStorageNamespace::TransientLocalStorageNamespace): (WebKit::TransientLocalStorageNamespace::~TransientLocalStorageNamespace): (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::TransientLocalStorageNamespace::origins const): (WebKit::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::TransientLocalStorageNamespace::clearAllStorageAreas): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h: Added. (WebKit::TransientLocalStorageNamespace::create): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::canRequestUseSpeculativeRevalidation): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/214309@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-08 16:46:57 +00:00
NetworkProcess/WebStorage/LocalStorageNamespace.cpp
NetworkProcess/WebStorage/SessionStorageNamespace.cpp
NetworkProcess/WebStorage/StorageArea.cpp
Move Web Storage to Network Process https://bugs.webkit.org/show_bug.cgi?id=197636 Source/WebKit: Reviewed by Youenn Fablet. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::webPageWasAdded): (WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): (WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::networkSessionByConnection const): (WebKit::NetworkProcess::hasLocalStorage): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::filterForRegistrableDomains): (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): (WebKit::NetworkProcess::webPageWasAdded): (WebKit::NetworkProcess::webPageWasRemoved): (WebKit::NetworkProcess::webProcessWasDisconnected): (WebKit::NetworkProcess::webProcessSessionChanged): (WebKit::NetworkProcess::getLocalStorageOriginDetails): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::~NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::storageManager): * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::privateSessionParameters): (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.cpp. (WebKit::LocalStorageDatabase::create): (WebKit::LocalStorageDatabase::LocalStorageDatabase): (WebKit::LocalStorageDatabase::~LocalStorageDatabase): (WebKit::LocalStorageDatabase::openDatabase): (WebKit::LocalStorageDatabase::tryToOpenDatabase): (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded): (WebKit::LocalStorageDatabase::importItems): (WebKit::LocalStorageDatabase::setItem): (WebKit::LocalStorageDatabase::removeItem): (WebKit::LocalStorageDatabase::clear): (WebKit::LocalStorageDatabase::close): (WebKit::LocalStorageDatabase::itemDidChange): (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): (WebKit::LocalStorageDatabase::updateDatabase): (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems): (WebKit::LocalStorageDatabase::databaseIsEmpty): * NetworkProcess/WebStorage/LocalStorageDatabase.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.h. * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp. (WebKit::LocalStorageDatabaseTracker::create): (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::databasePath const): (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases): (WebKit::LocalStorageDatabaseTracker::databasesModifiedSince): (WebKit::LocalStorageDatabaseTracker::origins const): (WebKit::LocalStorageDatabaseTracker::originDetails): * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.h. * NetworkProcess/WebStorage/StorageManager.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.cpp. (WebKit::StorageManager::StorageArea::securityOrigin const): (WebKit::StorageManager::StorageArea::isSessionStorage const): (WebKit::StorageManager::LocalStorageNamespace::storageManager const): (WebKit::StorageManager::TransientLocalStorageNamespace::create): (WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace): (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::TransientLocalStorageNamespace::origins const): (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (WebKit::StorageManager::StorageArea::~StorageArea): (WebKit::StorageManager::StorageArea::addListener): (WebKit::StorageManager::StorageArea::removeListener): (WebKit::StorageManager::StorageArea::hasListener const): (WebKit::StorageManager::StorageArea::clone const): (WebKit::StorageManager::StorageArea::setItem): (WebKit::StorageManager::StorageArea::removeItem): (WebKit::StorageManager::StorageArea::clear): (WebKit::StorageManager::StorageArea::items const): (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const): (WebKit::StorageManager::StorageArea::dispatchEvents const): (WebKit::StorageManager::LocalStorageNamespace::create): (WebKit::StorageManager::LocalStorageNamespace::LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea): (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::isEmpty const): (WebKit::StorageManager::SessionStorageNamespace::allowedConnections const): (WebKit::StorageManager::SessionStorageNamespace::origins const): (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::addAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::removeAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::SessionStorageNamespace::cloneTo): (WebKit::StorageManager::create): (WebKit::StorageManager::StorageManager): (WebKit::StorageManager::~StorageManager): (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::destroySessionStorageNamespace): (WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::cloneSessionStorageNamespace): (WebKit::StorageManager::processWillOpenConnection): (WebKit::StorageManager::processDidCloseConnection): (WebKit::StorageManager::getSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins): (WebKit::StorageManager::getLocalStorageOrigins): (WebKit::StorageManager::getLocalStorageOriginDetails): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins): (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::createTransientLocalStorageMap): (WebKit::StorageManager::createSessionStorageMap): (WebKit::StorageManager::destroyStorageMap): (WebKit::StorageManager::getValues): (WebKit::StorageManager::setItem): (WebKit::StorageManager::removeItem): (WebKit::StorageManager::clear): (WebKit::StorageManager::applicationWillTerminate): (WebKit::StorageManager::findStorageArea const): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): * NetworkProcess/WebStorage/StorageManager.h: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.h. * NetworkProcess/WebStorage/StorageManager.messages.in: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.messages.in. * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm. (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * NetworkProcess/curl/NetworkSessionCurl.cpp: (WebKit::NetworkSessionCurl::NetworkSessionCurl): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): * PlatformMac.cmake: * PlatformWin.cmake: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/WebsiteData/WebsiteData.cpp: (WebKit::WebsiteData::ownerProcess): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/C/WKKeyValueStorageManager.cpp: (WKKeyValueStorageManagerGetKeyValueStorageOrigins): (WKKeyValueStorageManagerGetStorageDetailsByOrigin): (WKKeyValueStorageManagerDeleteEntriesForOrigin): (WKKeyValueStorageManagerDeleteAllEntries): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::hasLocalStorage): (WebKit::NetworkProcessProxy::getLocalStorageDetails): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createNewPage): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::platformInitialize): (WebKit::WebsiteDataStore::platformDestroy): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::hasLocalStorageForTesting const): (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::getLocalStorageDetails): (WebKit::m_client): Deleted. (WebKit::WebsiteDataStore::cloneSessionData): Deleted. (WebKit::WebsiteDataStore::webPageWasAdded): Deleted. (WebKit::WebsiteDataStore::webPageWasInvalidated): Deleted. (WebKit::WebsiteDataStore::webProcessWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageDidCloseConnection): Deleted. (WebKit::WebsiteDataStore::webProcessDidCloseConnection): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::resolvedLocalStorageDirectory const): (WebKit::WebsiteDataStore::storageManager): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::createWebPage): (WebKit::WebProcess::removeWebPage): (WebKit::WebProcess::ensureNetworkProcessConnection): (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::registerStorageAreaMap): (WebKit::WebProcess::unregisterStorageAreaMap): (WebKit::WebProcess::storageAreaMap const): (WebKit::WebProcess::enablePrivateBrowsingForTesting): * WebProcess/WebProcess.h: * WebProcess/WebStorage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): (WebKit::StorageAreaMap::~StorageAreaMap): (WebKit::StorageAreaMap::setItem): (WebKit::StorageAreaMap::removeItem): (WebKit::StorageAreaMap::clear): (WebKit::StorageAreaMap::loadValuesIfNeeded): (WebKit::StorageAreaMap::connect): (WebKit::StorageAreaMap::disconnect): * WebProcess/WebStorage/StorageAreaMap.h: (WebKit::StorageAreaMap::identifier const): Tools: Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: Remove the wait for database file update. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Add a test for network process crash recovery. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Fix a typo and add a test case to cover it. * TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-crashes.html: Added. Canonical link: https://commits.webkit.org/212148@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Move classes declared inside StorageManager.cpp into their own headers https://bugs.webkit.org/show_bug.cgi?id=200527 Reviewed by Alex Christensen. Move classes declared inside StorageManager.cpp into their own headers for clarity. StorageManager.cpp was getting really big. * NetworkProcess/WebStorage/LocalStorageNamespace.cpp: Added. (WebKit::LocalStorageNamespace::LocalStorageNamespace): (WebKit::LocalStorageNamespace::~LocalStorageNamespace): (WebKit::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::LocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::LocalStorageNamespace::clearAllStorageAreas): (WebKit::LocalStorageNamespace::ephemeralOrigins const): (WebKit::LocalStorageNamespace::cloneTo): * NetworkProcess/WebStorage/LocalStorageNamespace.h: Added. (WebKit::LocalStorageNamespace::create): (WebKit::LocalStorageNamespace::storageManager const): * NetworkProcess/WebStorage/SessionStorageNamespace.cpp: Added. (WebKit::SessionStorageNamespace::SessionStorageNamespace): (WebKit::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::SessionStorageNamespace::addAllowedConnection): (WebKit::SessionStorageNamespace::removeAllowedConnection): (WebKit::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::SessionStorageNamespace::cloneTo): (WebKit::SessionStorageNamespace::origins const): (WebKit::SessionStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::SessionStorageNamespace::clearAllStorageAreas): * NetworkProcess/WebStorage/SessionStorageNamespace.h: Added. (WebKit::SessionStorageNamespace::create): (WebKit::SessionStorageNamespace::isEmpty const): (WebKit::SessionStorageNamespace::allowedConnections const): * NetworkProcess/WebStorage/StorageArea.cpp: Added. (WebKit::StorageArea::StorageArea): (WebKit::StorageArea::~StorageArea): (WebKit::StorageArea::addListener): (WebKit::StorageArea::removeListener): (WebKit::StorageArea::hasListener const): (WebKit::StorageArea::clone const): (WebKit::StorageArea::setItem): (WebKit::StorageArea::setItems): (WebKit::StorageArea::removeItem): (WebKit::StorageArea::clear): (WebKit::StorageArea::items const): (WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const): (WebKit::StorageArea::dispatchEvents const): * NetworkProcess/WebStorage/StorageArea.h: Added. (WebKit::StorageArea::create): (WebKit::StorageArea::securityOrigin const): (WebKit::StorageArea::isEphemeral const): * NetworkProcess/WebStorage/StorageManager.cpp: (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::findStorageArea const): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): * NetworkProcess/WebStorage/StorageManager.h: (WebKit::StorageManager::create): (WebKit::StorageManager::localStorageDatabaseTracker const): (WebKit::StorageManager::workQueue const): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp: Added. (WebKit::TransientLocalStorageNamespace::TransientLocalStorageNamespace): (WebKit::TransientLocalStorageNamespace::~TransientLocalStorageNamespace): (WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::TransientLocalStorageNamespace::origins const): (WebKit::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::TransientLocalStorageNamespace::clearAllStorageAreas): * NetworkProcess/WebStorage/TransientLocalStorageNamespace.h: Added. (WebKit::TransientLocalStorageNamespace::create): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::canRequestUseSpeculativeRevalidation): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/214309@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-08 16:46:57 +00:00
NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp
Move Web Storage to Network Process https://bugs.webkit.org/show_bug.cgi?id=197636 Source/WebKit: Reviewed by Youenn Fablet. * CMakeLists.txt: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::webPageWasAdded): (WebKit::NetworkConnectionToWebProcess::webPageWasRemoved): (WebKit::NetworkConnectionToWebProcess::webProcessSessionChanged): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::networkSessionByConnection const): (WebKit::NetworkProcess::hasLocalStorage): (WebKit::NetworkProcess::fetchWebsiteData): (WebKit::NetworkProcess::deleteWebsiteData): (WebKit::NetworkProcess::deleteWebsiteDataForOrigins): (WebKit::filterForRegistrableDomains): (WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains): (WebKit::NetworkProcess::webPageWasAdded): (WebKit::NetworkProcess::webPageWasRemoved): (WebKit::NetworkProcess::webProcessWasDisconnected): (WebKit::NetworkProcess::webProcessSessionChanged): (WebKit::NetworkProcess::getLocalStorageOriginDetails): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): (WebKit::NetworkSession::~NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::storageManager): * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::privateSessionParameters): (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/WebStorage/LocalStorageDatabase.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.cpp. (WebKit::LocalStorageDatabase::create): (WebKit::LocalStorageDatabase::LocalStorageDatabase): (WebKit::LocalStorageDatabase::~LocalStorageDatabase): (WebKit::LocalStorageDatabase::openDatabase): (WebKit::LocalStorageDatabase::tryToOpenDatabase): (WebKit::LocalStorageDatabase::migrateItemTableIfNeeded): (WebKit::LocalStorageDatabase::importItems): (WebKit::LocalStorageDatabase::setItem): (WebKit::LocalStorageDatabase::removeItem): (WebKit::LocalStorageDatabase::clear): (WebKit::LocalStorageDatabase::close): (WebKit::LocalStorageDatabase::itemDidChange): (WebKit::LocalStorageDatabase::scheduleDatabaseUpdate): (WebKit::LocalStorageDatabase::updateDatabase): (WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems): (WebKit::LocalStorageDatabase::databaseIsEmpty): * NetworkProcess/WebStorage/LocalStorageDatabase.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabase.h. * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp. (WebKit::LocalStorageDatabaseTracker::create): (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker): (WebKit::LocalStorageDatabaseTracker::databasePath const): (WebKit::LocalStorageDatabaseTracker::didOpenDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin): (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases): (WebKit::LocalStorageDatabaseTracker::databasesModifiedSince): (WebKit::LocalStorageDatabaseTracker::origins const): (WebKit::LocalStorageDatabaseTracker::originDetails): * NetworkProcess/WebStorage/LocalStorageDatabaseTracker.h: Renamed from Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.h. * NetworkProcess/WebStorage/StorageManager.cpp: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.cpp. (WebKit::StorageManager::StorageArea::securityOrigin const): (WebKit::StorageManager::StorageArea::isSessionStorage const): (WebKit::StorageManager::LocalStorageNamespace::storageManager const): (WebKit::StorageManager::TransientLocalStorageNamespace::create): (WebKit::StorageManager::TransientLocalStorageNamespace::~TransientLocalStorageNamespace): (WebKit::StorageManager::TransientLocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::TransientLocalStorageNamespace::origins const): (WebKit::StorageManager::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::TransientLocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::TransientLocalStorageNamespace::TransientLocalStorageNamespace): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (WebKit::StorageManager::StorageArea::~StorageArea): (WebKit::StorageManager::StorageArea::addListener): (WebKit::StorageManager::StorageArea::removeListener): (WebKit::StorageManager::StorageArea::hasListener const): (WebKit::StorageManager::StorageArea::clone const): (WebKit::StorageManager::StorageArea::setItem): (WebKit::StorageManager::StorageArea::removeItem): (WebKit::StorageManager::StorageArea::clear): (WebKit::StorageManager::StorageArea::items const): (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded const): (WebKit::StorageManager::StorageArea::dispatchEvents const): (WebKit::StorageManager::LocalStorageNamespace::create): (WebKit::StorageManager::LocalStorageNamespace::LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::~LocalStorageNamespace): (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea): (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::isEmpty const): (WebKit::StorageManager::SessionStorageNamespace::allowedConnections const): (WebKit::StorageManager::SessionStorageNamespace::origins const): (WebKit::StorageManager::SessionStorageNamespace::clearStorageAreasMatchingOrigin): (WebKit::StorageManager::SessionStorageNamespace::clearAllStorageAreas): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::addAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::removeAllowedConnection): (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::SessionStorageNamespace::cloneTo): (WebKit::StorageManager::create): (WebKit::StorageManager::StorageManager): (WebKit::StorageManager::~StorageManager): (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::destroySessionStorageNamespace): (WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection): (WebKit::StorageManager::cloneSessionStorageNamespace): (WebKit::StorageManager::processWillOpenConnection): (WebKit::StorageManager::processDidCloseConnection): (WebKit::StorageManager::getSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageOrigins): (WebKit::StorageManager::deleteSessionStorageEntriesForOrigins): (WebKit::StorageManager::getLocalStorageOrigins): (WebKit::StorageManager::getLocalStorageOriginDetails): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigin): (WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince): (WebKit::StorageManager::deleteLocalStorageEntriesForOrigins): (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::createTransientLocalStorageMap): (WebKit::StorageManager::createSessionStorageMap): (WebKit::StorageManager::destroyStorageMap): (WebKit::StorageManager::getValues): (WebKit::StorageManager::setItem): (WebKit::StorageManager::removeItem): (WebKit::StorageManager::clear): (WebKit::StorageManager::applicationWillTerminate): (WebKit::StorageManager::findStorageArea const): (WebKit::StorageManager::getOrCreateLocalStorageNamespace): (WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace): * NetworkProcess/WebStorage/StorageManager.h: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.h. * NetworkProcess/WebStorage/StorageManager.messages.in: Renamed from Source/WebKit/UIProcess/WebStorage/StorageManager.messages.in. * NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm. (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const): * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * NetworkProcess/curl/NetworkSessionCurl.cpp: (WebKit::NetworkSessionCurl::NetworkSessionCurl): * NetworkProcess/soup/NetworkSessionSoup.cpp: (WebKit::NetworkSessionSoup::NetworkSessionSoup): * PlatformMac.cmake: * PlatformWin.cmake: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/WebsiteData/WebsiteData.cpp: (WebKit::WebsiteData::ownerProcess): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/C/WKKeyValueStorageManager.cpp: (WKKeyValueStorageManagerGetKeyValueStorageOrigins): (WKKeyValueStorageManagerGetStorageDetailsByOrigin): (WKKeyValueStorageManagerDeleteEntriesForOrigin): (WKKeyValueStorageManagerDeleteAllEntries): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::hasLocalStorage): (WebKit::NetworkProcessProxy::getLocalStorageDetails): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createNewPage): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::platformInitialize): (WebKit::WebsiteDataStore::platformDestroy): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::computeNetworkProcessAccessTypeForDataFetch): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::hasLocalStorageForTesting const): (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::getLocalStorageDetails): (WebKit::m_client): Deleted. (WebKit::WebsiteDataStore::cloneSessionData): Deleted. (WebKit::WebsiteDataStore::webPageWasAdded): Deleted. (WebKit::WebsiteDataStore::webPageWasInvalidated): Deleted. (WebKit::WebsiteDataStore::webProcessWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageWillOpenConnection): Deleted. (WebKit::WebsiteDataStore::webPageDidCloseConnection): Deleted. (WebKit::WebsiteDataStore::webProcessDidCloseConnection): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::resolvedLocalStorageDirectory const): (WebKit::WebsiteDataStore::storageManager): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::createWebPage): (WebKit::WebProcess::removeWebPage): (WebKit::WebProcess::ensureNetworkProcessConnection): (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::registerStorageAreaMap): (WebKit::WebProcess::unregisterStorageAreaMap): (WebKit::WebProcess::storageAreaMap const): (WebKit::WebProcess::enablePrivateBrowsingForTesting): * WebProcess/WebProcess.h: * WebProcess/WebStorage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): (WebKit::StorageAreaMap::~StorageAreaMap): (WebKit::StorageAreaMap::setItem): (WebKit::StorageAreaMap::removeItem): (WebKit::StorageAreaMap::clear): (WebKit::StorageAreaMap::loadValuesIfNeeded): (WebKit::StorageAreaMap::connect): (WebKit::StorageAreaMap::disconnect): * WebProcess/WebStorage/StorageAreaMap.h: (WebKit::StorageAreaMap::identifier const): Tools: Reviewed by Youenn Fablet. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: Remove the wait for database file update. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Add a test for network process crash recovery. (TEST): * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Fix a typo and add a test case to cover it. * TestWebKitAPI/Tests/WebKitCocoa/local-storage-process-crashes.html: Added. Canonical link: https://commits.webkit.org/212148@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-21 00:07:39 +00:00
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/cache/CacheStorageEngine.cpp
NetworkProcess/cache/CacheStorageEngineCache.cpp
NetworkProcess/cache/CacheStorageEngineCaches.cpp
NetworkProcess/cache/CacheStorageEngineConnection.cpp
Support stale-while-revalidate cache strategy https://bugs.webkit.org/show_bug.cgi?id=201461 Patch by Rob Buis <rbuis@igalia.com> on 2019-11-13 Reviewed by Youenn Fablet. LayoutTests/imported/w3c: Import stale-while-revalidate WPT tests. * resources/import-expectations.json: * web-platform-tests/fetch/stale-while-revalidate/fetch-expected.txt: Added. * web-platform-tests/fetch/stale-while-revalidate/fetch-sw.https-expected.txt: Added. * web-platform-tests/fetch/stale-while-revalidate/fetch-sw.https.html: Added. * web-platform-tests/fetch/stale-while-revalidate/fetch.html: Added. * web-platform-tests/fetch/stale-while-revalidate/resources/stale-css.py: Added. (main): * web-platform-tests/fetch/stale-while-revalidate/resources/stale-image.py: Added. (main): * web-platform-tests/fetch/stale-while-revalidate/resources/stale-script.py: Added. (id_token): (main): * web-platform-tests/fetch/stale-while-revalidate/resources/w3c-import.log: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-css-expected.txt: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-css.html: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-image-expected.txt: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-image.html: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-script-expected.txt: Added. * web-platform-tests/fetch/stale-while-revalidate/stale-script.html: Added. * web-platform-tests/fetch/stale-while-revalidate/sw-intercept.js: Added. (async.broadcast): * web-platform-tests/fetch/stale-while-revalidate/w3c-import.log: Added. Source/WebCore: Start parsing the stale-while-revalidate Cache-Control directive and expose it on ResourceResponse. Tests: imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch-sw.https.html imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch.html imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-css.html imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-image.html imported/w3c/web-platform-tests/fetch/stale-while-revalidate/stale-script.html * platform/network/CacheValidation.cpp: (WebCore::parseCacheControlDirectives): * platform/network/CacheValidation.h: * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::cacheControlStaleWhileRevalidate const): * platform/network/ResourceResponseBase.h: Source/WebKit: Add a new UseDecision value AsyncRevalidate for async revalidation. This is used when the retrieved cache entry is a stale-while-revalidate response [1]. In case of AsyncRevalidate, a check is made to see if there is a current async revalidation ongoing for the entry, if not one is started. Regardless, the stale entry is returned, until either the async revalidation ends successfully or at the moment when the response expires for real. [1] https://fetch.spec.whatwg.org/#concept-stale-while-revalidate-response * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::isStaleWhileRevalidateEnabled const): * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/cache/AsyncRevalidation.cpp: Added. (WebKit::NetworkCache::constructRevalidationRequest): (WebKit::NetworkCache::AsyncRevalidation::staleWhileRevalidateEnding): (WebKit::NetworkCache::AsyncRevalidation::AsyncRevalidation): * NetworkProcess/cache/AsyncRevalidation.h: Added. (WebKit::NetworkCache::AsyncRevalidation::load const): * NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::responseNeedsRevalidation): (WebKit::NetworkCache::makeUseDecision): (WebKit::NetworkCache::makeStoreDecision): (WebKit::NetworkCache::Cache::startAsyncRevalidationIfNeeded): (WebKit::NetworkCache::Cache::retrieve): (WebKit::NetworkCache::responseHasExpired): Deleted. * NetworkProcess/cache/NetworkCache.h: * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp: (WebKit::NetworkCache::dumpHTTPHeadersDiff): (WebKit::NetworkCache::requestsHeadersMatch): * NetworkProcess/cache/NetworkCacheSpeculativeLoad.h: * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: (WebKit::NetworkCache::dumpHTTPHeadersDiff): Deleted. (WebKit::NetworkCache::requestsHeadersMatch): Deleted. * Sources.txt: * UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp: (WKWebsiteDataStoreConfigurationGetStaleWhileRevalidateEnabled): (WKWebsiteDataStoreConfigurationSetStaleWhileRevalidateEnabled): * UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h: * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const): * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::staleWhileRevalidateEnabled const): (WebKit::WebsiteDataStoreConfiguration::setStaleWhileRevalidateEnabled): * WebKit.xcodeproj/project.pbxproj: Tools: Enable stale-while-revalidate for the test runner. * WebKitTestRunner/TestController.cpp: (WTR::TestController::websiteDataStore): LayoutTests: Skip newly imported tests for WK1. * platform/ios-wk1/TestExpectations: * platform/mac-wk1/TestExpectations: Canonical link: https://commits.webkit.org/217442@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-13 10:22:04 +00:00
NetworkProcess/cache/AsyncRevalidation.cpp
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Link prefetch not useful for top-level navigation https://bugs.webkit.org/show_bug.cgi?id=195623 Patch by Rob Buis <rbuis@igalia.com> on 2019-05-08 Reviewed by Youenn Fablet. Source/WebCore: Cache cross-domain top-level prefetches in a dedicated cache and not in the memory cache. Tests: http/tests/cache/link-prefetch-main-resource-iframe.html http/tests/cache/link-prefetch-main-resource.html http/tests/contentextensions/prefetch-blocked.html * loader/LinkLoader.cpp: (WebCore::LinkLoader::prefetchIfNeeded): * loader/ResourceLoadInfo.cpp: (WebCore::toResourceType): Source/WebKit: Cache cross-domain top-level prefetches in a dedicated cache. When a navigation to the same url is done within a threshold (5 seconds), reuse the prefetch cache entry, move it to the disk cache and navigate to the url, meaning no extra network trip is needed. When not used within the threshold period, the prefetch entry will be erased using a timer. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::lowMemoryHandler): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::retrieveCacheEntry): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didReceiveBuffer): (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): (WebKit::NetworkResourceLoader::isCrossOriginPrefetch const): * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::prefetchCache): (WebKit::NetworkSession::clearPrefetchCache): * NetworkProcess/cache/PrefetchCache.cpp: Added. (WebKit::PrefetchCache::Entry::Entry): (WebKit::PrefetchCache::PrefetchCache): (WebKit::PrefetchCache::~PrefetchCache): (WebKit::PrefetchCache::clear): (WebKit::PrefetchCache::take): (WebKit::PrefetchCache::store): (WebKit::PrefetchCache::clearExpiredEntries): * NetworkProcess/cache/PrefetchCache.h: Added. (WebKit::PrefetchCache::Entry::releaseBuffer): * Shared/WebPreferences.yaml: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: LayoutTests: Verify that prefetching a cross-domain top-level main resource is cached in the prefetch cache and only loaded once, and that non top-level prefetches keep the old behavior. * http/tests/cache/link-prefetch-main-resource-expected.txt: Added. * http/tests/cache/link-prefetch-main-resource-iframe-expected.txt: Added. * http/tests/cache/link-prefetch-main-resource-iframe.html: Added. * http/tests/cache/link-prefetch-main-resource.html: Added. * http/tests/cache/resources/prefetched-main-resource-iframe.php: Added. * http/tests/cache/resources/prefetched-main-resource.php: Added. * http/tests/contentextensions/prefetch-blocked-expected.txt: Added. * http/tests/contentextensions/prefetch-blocked.html: Added. * http/tests/contentextensions/prefetch-blocked.html.json: Added. * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/211832@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-08 12:40:10 +00:00
NetworkProcess/cache/PrefetchCache.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=185011 Reviewed by Alex Christensen. * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: * NetworkProcess/NetworkCORSPreflightChecker.cpp: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkContentRuleListManager.cpp: * NetworkProcess/NetworkDataTask.cpp: * NetworkProcess/NetworkDataTaskBlob.cpp: * NetworkProcess/NetworkLoadChecker.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkResourceLoadParameters.cpp: * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkSession.cpp: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/PingLoad.cpp: * NetworkProcess/cache/CacheStorageEngine.cpp: * NetworkProcess/cache/CacheStorageEngineCache.cpp: * NetworkProcess/cache/CacheStorageEngineCaches.cpp: * NetworkProcess/cache/CacheStorageEngineConnection.cpp: * NetworkProcess/cache/NetworkCache.cpp: * NetworkProcess/capture/NetworkCaptureEvent.cpp: * NetworkProcess/capture/NetworkCaptureManager.cpp: * NetworkProcess/capture/NetworkCaptureRecorder.cpp: * NetworkProcess/capture/NetworkCaptureReplayer.cpp: * NetworkProcess/capture/NetworkDataTaskReplay.cpp: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::platformCancelNetworkLoad): * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]): (-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]): Fix the build with unified sources. * Sources.txt: Un-@no-unify NetworkProcess/*. * SourcesCocoa.txt: Un-@no-unify NetworkProcess/*. Canonical link: https://commits.webkit.org/203818@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-21 00:50:06 +00:00
NetworkProcess/webrtc/NetworkMDNSRegister.cpp
Implement RTCDataChannel transfer out of process https://bugs.webkit.org/show_bug.cgi?id=223443 Reviewed by Eric Carlson. Source/WebCore: Add support for serialization/deserialization of RTCDataChannel information so that it can be MessagePort transfered or transfered to out-of-process contexts like Window or Service Worker. Add infrastructure for remote sources (that allows to send data or close data channels) and remote handlers which receive messages from out-of-process data channels. Covered by API tests. * Modules/mediastream/DetachedRTCDataChannel.h: Added. (WebCore::DetachedRTCDataChannel::DetachedRTCDataChannel): (WebCore::DetachedRTCDataChannel::memoryCost const): (WebCore::DetachedRTCDataChannel::encode const): (WebCore::DetachedRTCDataChannel::decode): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::rtcDataChannelLocalMap): (WebCore::RTCDataChannel::handlerFromIdentifier): (WebCore::RTCDataChannel::create): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCDataChannelRemoteHandler.cpp: Added. (WebCore::RTCDataChannelRemoteHandler::create): (WebCore::RTCDataChannelRemoteHandler::RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::~RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::didChangeReadyState): (WebCore::RTCDataChannelRemoteHandler::didReceiveStringData): (WebCore::RTCDataChannelRemoteHandler::didReceiveRawData): (WebCore::RTCDataChannelRemoteHandler::didDetectError): (WebCore::RTCDataChannelRemoteHandler::bufferedAmountIsDecreasing): (WebCore::RTCDataChannelRemoteHandler::readyToSend): (WebCore::RTCDataChannelRemoteHandler::setClient): (WebCore::RTCDataChannelRemoteHandler::sendStringData): (WebCore::RTCDataChannelRemoteHandler::sendRawData): (WebCore::RTCDataChannelRemoteHandler::close): * Modules/mediastream/RTCDataChannelRemoteHandler.h: Added. * Modules/mediastream/RTCDataChannelRemoteSource.cpp: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelRemoteSource::RTCDataChannelRemoteSource): (WebCore::RTCDataChannelRemoteSource::~RTCDataChannelRemoteSource): * Modules/mediastream/RTCDataChannelRemoteSource.h: Added. (WebCore::RTCDataChannelRemoteSource::create): (WebCore::RTCDataChannelRemoteSource::sendStringData): (WebCore::RTCDataChannelRemoteSource::sendRawData): (WebCore::RTCDataChannelRemoteSource::close): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::postTask): * Modules/webaudio/AudioWorkletMessagingProxy.cpp: (WebCore::AudioWorkletMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * Modules/webaudio/AudioWorkletMessagingProxy.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::encode const): (WebCore::SerializedScriptValue::decode): * dom/Document.cpp: (WebCore::Document::createRTCDataChannelRemoteHandlerConnection): * dom/Document.h: * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::createRTCDataChannelRemoteHandlerConnection): * platform/ScriptExecutionContextIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelState.h. * platform/mediastream/RTCDataChannelHandler.h: (WebCore::RTCDataChannelInit::encode const): (WebCore::RTCDataChannelInit::decode): * platform/mediastream/RTCDataChannelIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelIdentifier::encode const): (WebCore::RTCDataChannelIdentifier::decode): * platform/mediastream/RTCDataChannelRemoteHandlerConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelRemoteSourceConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelState.h: * platform/mediastream/RTCPriorityType.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerGlobalScope.h: * workers/WorkerLoaderProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerMessagingProxy.h: * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::createRTCDataChannelRemoteHandlerConnection): * workers/service/context/ServiceWorkerThreadProxy.h: Source/WebKit: Add support for connecting remote sources to remote data channels. This is done by connection detached data channels to remote source that will send messages to network process. Network process then sends to the process in which was reattached the data channel. Pairing of data channels is done in main thread through connectToSource message. The data then flows in background threads, network process being the proxy between web processes. RTCDataChannelRemoteManagerProxy is the forwarding entity in NetworkProcess. RTCDataChannelRemoteManager is the entity in WebProcess doing the messaging from and to data channels. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::connectToRTCDataChannelRemoteSource): (WebKit::NetworkConnectionToWebProcess::registerToRTCDataChannelProxy): (WebKit::NetworkConnectionToWebProcess::unregisterToRTCDataChannelProxy): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::rtcDataChannelProxy): * NetworkProcess/NetworkProcess.h: * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp: Added. (WebKit::RTCDataChannelRemoteManagerProxy::RTCDataChannelRemoteManagerProxy): (WebKit::RTCDataChannelRemoteManagerProxy::registerConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::unregisterConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::sendData): (WebKit::RTCDataChannelRemoteManagerProxy::close): (WebKit::RTCDataChannelRemoteManagerProxy::changeReadyState): (WebKit::RTCDataChannelRemoteManagerProxy::receiveData): (WebKit::RTCDataChannelRemoteManagerProxy::detectError): (WebKit::RTCDataChannelRemoteManagerProxy::bufferedAmountIsDecreasing): * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h: Added. * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.messages.in: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::connectToRTCDataChannelRemoteSource): * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createRTCDataChannelRemoteHandlerConnection): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp: Added. (WebKit::RTCDataChannelRemoteManager::sharedManager): (WebKit::RTCDataChannelRemoteManager::RTCDataChannelRemoteManager): (WebKit::RTCDataChannelRemoteManager::setConnection): (WebKit::RTCDataChannelRemoteManager::connectToRemoteSource): (WebKit::RTCDataChannelRemoteManager::remoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::remoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::postTaskToHandler): (WebKit::RTCDataChannelRemoteManager::sourceFromIdentifier): (WebKit::RTCDataChannelRemoteManager::sendData): (WebKit::RTCDataChannelRemoteManager::close): (WebKit::RTCDataChannelRemoteManager::changeReadyState): (WebKit::RTCDataChannelRemoteManager::receiveData): (WebKit::RTCDataChannelRemoteManager::detectError): (WebKit::RTCDataChannelRemoteManager::bufferedAmountIsDecreasing): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::RemoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::connectToSource): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::sendData): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::close): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::RemoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didChangeReadyState): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveStringData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveRawData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didDetectError): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::bufferedAmountIsDecreasing): * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h: Added. * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.messages.in: Copied from Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in. * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/235572@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 18:29:36 +00:00
NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[Quick Look] Clean up LegacyPreviewLoaderClients https://bugs.webkit.org/show_bug.cgi?id=203472 Reviewed by Brady Eidson. Source/WebCore: * loader/ios/LegacyPreviewLoader.mm: (WebCore::LegacyPreviewLoader::didReceiveBuffer): * platform/network/ios/LegacyPreviewLoaderClient.h: (WebCore::LegacyPreviewLoaderClient::didReceiveBuffer): (WebCore::LegacyPreviewLoaderClient::didReceiveDataArray): Deleted. Source/WebKit: Replaced QuickLookDocumentData with ShareableResource. Removed messages WebPageProxy::DidRequestPasswordForQuickLookDocumentInMainFrame and WebPage::DidReceivePasswordForQuickLookDocument, replacing them with async message WebPageProxy::RequestPasswordForQuickLookDocumentInMainFrame. * Shared/ios/QuickLookDocumentData.cpp: Removed. * Shared/ios/QuickLookDocumentData.h: Removed. * SourcesCocoa.txt: * UIProcess/API/APILoaderClient.h: * UIProcess/API/APINavigationClient.h: (API::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame): * UIProcess/Cocoa/NavigationState.h: * UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame): * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::requestPasswordForQuickLookDocumentInMainFrame): (WebKit::ProvisionalPageProxy::didReceiveMessage): (WebKit::ProvisionalPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame): Deleted. * UIProcess/ProvisionalPageProxy.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame): (WebKit::WebPageProxy::requestPasswordForQuickLookDocumentInMainFrame): (WebKit::WebPageProxy::requestPasswordForQuickLookDocumentInMainFrameShared): (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame): Deleted. (WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrameShared): Deleted. * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp: (WebKit::WebPreviewLoaderClient::WebPreviewLoaderClient): (WebKit::WebPreviewLoaderClient::didReceiveBuffer): (WebKit::WebPreviewLoaderClient::didFinishLoading): (WebKit::WebPreviewLoaderClient::didFail): (WebKit::WebPreviewLoaderClient::didRequestPassword): (WebKit::passwordCallbacks): Deleted. (WebKit::WebPreviewLoaderClient::~WebPreviewLoaderClient): Deleted. (WebKit::WebPreviewLoaderClient::didReceiveDataArray): Deleted. (WebKit::WebPreviewLoaderClient::didReceivePassword): Deleted. * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::didStartLoadForQuickLookDocumentInMainFrame): (WebKit::WebPage::didFinishLoadForQuickLookDocumentInMainFrame): (WebKit::WebPage::requestPasswordForQuickLookDocumentInMainFrame): (WebKit::WebPage::didReceivePasswordForQuickLookDocument): Deleted. Source/WebKitLegacy/mac: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createPreviewLoaderClient): Tools: Updated API tests to compare data received in -_webView:didFinishLoadForQuickLookDocumentInMainFrame: with expected data. * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm: (readFile): (-[QuickLookDelegate initWithExpectedFileURL:responsePolicy:]): (-[QuickLookDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]): (-[QuickLookDelegate verifyDownload]): (TEST): Canonical link: https://commits.webkit.org/216969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Move function definitions in JSIPCBinding.h into cpp file https://bugs.webkit.org/show_bug.cgi?id=218065 Reviewed by Wenson Hsieh. Added JSIPCBinding.cpp and moved the code from JSIPCBinding.h to JSIPCBinding.cpp. No new tests since there is no behavior change. * Platform/IPC/JSIPCBinding.cpp: Added. (IPC::jsValueForDecodedStringArgumentValue): Moved from .h. (IPC::jsValueForDecodedArgumentValue<String>): Ditto. (IPC::jsValueForDecodedArgumentValue<URL>): Ditto. (IPC::jsValueForDecodedArgumentValue<RegistrableDomain>): Ditto. (IPC::jsValueForDecodedNumericArgumentValue): Ditto. (IPC::jsValueForDecodedArgumentValue<double>): Ditto. (IPC::jsValueForDecodedArgumentValue<float>): Ditto. (IPC::jsValueForDecodedArgumentValue<int8_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<int16_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<int32_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<int64_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<uint8_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<uint16_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<uint32_t>): Ditto. (IPC::jsValueForDecodedArgumentValue<uint64_t>): Ditto. (IPC::jsValueForDecodedArgumentRect): Ditto. (IPC::jsValueForDecodedArgumentValue<IntRect>): Ditto. (IPC::jsValueForDecodedArgumentValue<FloatRect>): Ditto. * Platform/IPC/JSIPCBinding.h: (IPC::jsValueForDecodedArgumentValue): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/230782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-22 05:24:58 +00:00
Platform/IPC/JSIPCBinding.cpp @no-unify
Connection clients should be able to obtain the messages as data instead of embedded in function references https://bugs.webkit.org/show_bug.cgi?id=221560 Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-02-16 Reviewed by Chris Dumez. Add IPC::MessageReceiveQueue, an interface which obtains messages from the message receive thread and forwards them to caller as data. This is important in order to be able to skip messages that are stale or originating from a sender which is incorrect. Before, the client could only get the messages as Function references, and those cannot be skipped as it would be undefined what not executing a function means. IPC::MessageReceiveQueue is a generalization and simplification of current IPC::Connection::ThreadMessageReceiverRefCounted and IPC::Connection::WorkQueueMessageReceiver. It has different ref-count semantics, in the way that client controls the life-time with add and remove. IPC::MessageReceiveQueue fixes message reordering bug with WorkQueueMessageReceiver and ThreadMessageReceiver where first few messages that are routed to main thread message queue can come later than some other message that gets handled from message receive thread. * Platform/IPC/Connection.cpp: (IPC::Connection::addMessageReceiveQueue): Add plain raw MessageReceiveQueue, to be used in WebGL IPC implementation. Implement ThreadMessageReceiver and WorkQueueMessageReceiver with the above. (IPC::Connection::removeMessageReceiveQueue): (IPC::Connection::dispatchMessageReceiverMessage): (IPC::Connection::processIncomingMessage): (IPC::Connection::enqueueIncomingMessage): (IPC::Connection::dispatchMessage): * Platform/IPC/Connection.h: * Platform/IPC/MessageReceiveQueue.h: Copied from Source/WTF/wtf/FunctionDispatcher.h. * Platform/IPC/MessageReceiveQueues.h: Added. * Platform/IPC/MessageReceiveQueueMap.cpp: Added. (IPC::MessageReceiveQueueMap::addImpl): (IPC::MessageReceiveQueueMap::remove): (IPC::MessageReceiveQueueMap::get const): * Platform/IPC/MessageReceiveQueueMap.h: Copied from Source/WTF/wtf/FunctionDispatcher.h. (IPC::MessageReceiveQueueMap::isValidMessage): (IPC::MessageReceiveQueueMap::add): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/234149@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
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
Rename ChildProcess to AuxiliaryProcess https://bugs.webkit.org/show_bug.cgi?id=193943 Reviewed by Andy Estes. "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp: * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * NetworkProcess/NetworkProcess.cpp: (WebKit::callExitSoon): (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::initializeConnection): (WebKit::NetworkProcess::terminate): (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcessSupplement.h: * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::deleteOldVersions): * NetworkProcess/ios/NetworkProcessIOS.mm: (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/soup/NetworkProcessMainSoup.cpp: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::NetworkProcessMainUnix): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * NetworkProcess/watchos/NetworkProximityManager.h: * NetworkProcess/watchos/NetworkProximityManager.mm: (WebKit::NetworkProximityManager::NetworkProximityManager): * NetworkProcess/win/NetworkProcessMainWin.cpp: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::NetworkProcessMainWin): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeProcess): (WebKit::PluginProcess::initializeConnection): (WebKit::PluginProcess::didReceiveMessage): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): (WebKit::PluginProcess::stopRunLoop): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * PluginProcess/unix/PluginProcessUnix.cpp: (WebKit::PluginProcess::platformInitializeProcess): * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): * Shared/Authentication/AuthenticationManager.h: * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp. (WebKit::AuxiliaryProcess::AuxiliaryProcess): (WebKit::AuxiliaryProcess::~AuxiliaryProcess): (WebKit::AuxiliaryProcess::didClose): (WebKit::AuxiliaryProcess::initialize): (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled): (WebKit::AuxiliaryProcess::initializeProcess): (WebKit::AuxiliaryProcess::initializeProcessName): (WebKit::AuxiliaryProcess::initializeConnection): (WebKit::AuxiliaryProcess::addMessageReceiver): (WebKit::AuxiliaryProcess::removeMessageReceiver): (WebKit::AuxiliaryProcess::disableTermination): (WebKit::AuxiliaryProcess::enableTermination): (WebKit::AuxiliaryProcess::messageSenderConnection): (WebKit::AuxiliaryProcess::messageSenderDestinationID): (WebKit::AuxiliaryProcess::terminationTimerFired): (WebKit::AuxiliaryProcess::stopRunLoop): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::AuxiliaryProcess::terminate): (WebKit::AuxiliaryProcess::shutDown): (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const): (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent): (WebKit::ChildProcess::ChildProcess): Deleted. (WebKit::ChildProcess::~ChildProcess): Deleted. (WebKit::ChildProcess::didClose): Deleted. (WebKit::ChildProcess::initialize): Deleted. (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted. (WebKit::ChildProcess::initializeProcess): Deleted. (WebKit::ChildProcess::initializeProcessName): Deleted. (WebKit::ChildProcess::initializeConnection): Deleted. (WebKit::ChildProcess::addMessageReceiver): Deleted. (WebKit::ChildProcess::removeMessageReceiver): Deleted. (WebKit::ChildProcess::disableTermination): Deleted. (WebKit::ChildProcess::enableTermination): Deleted. (WebKit::ChildProcess::messageSenderConnection): Deleted. (WebKit::ChildProcess::messageSenderDestinationID): Deleted. (WebKit::ChildProcess::terminationTimerFired): Deleted. (WebKit::ChildProcess::stopRunLoop): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. (WebKit::ChildProcess::terminate): Deleted. (WebKit::ChildProcess::shutDown): Deleted. (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted. (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted. * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h. (WebKit::ChildProcess::parentProcessConnection const): Deleted. (WebKit::ChildProcess::messageReceiverMap): Deleted. (WebKit::ChildProcess::setTerminationTimeout): Deleted. (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted. * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in. * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h. (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement): (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted. (WebKit::ChildProcessSupplement::initializeConnection): Deleted. * Shared/ChildProcess.cpp: Removed. * Shared/ChildProcess.h: Removed. * Shared/ChildProcess.messages.in: Removed. * Shared/ChildProcessSupplement.h: Removed. * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm. (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. * Shared/Cocoa/ChildProcessCocoa.mm: Removed. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: (WebKit::initializeAuxiliaryProcess): (WebKit::XPCServiceInitializer): (WebKit::initializeChildProcess): Deleted. * Shared/WebSQLiteDatabaseTracker.cpp: (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated): (WebKit::m_childProcessType): Deleted. * Shared/WebSQLiteDatabaseTracker.h: * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm. (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::setQOS): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::setQOS): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. * Shared/ios/ChildProcessIOS.mm: Removed. * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm. (WebKit::SandboxInfo::SandboxInfo): (WebKit::AuxiliaryProcess::launchServicesCheckIn): (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::processStorageClass): (WebKit::sandboxDirectory): (WebKit::applySandbox): (WebKit::initializeSandboxParameters): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::stopNSAppRunLoop): (WebKit::AuxiliaryProcess::stopNSRunLoop): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::AuxiliaryProcess::setQOS): (WebKit::AuxiliaryProcess::isSystemWebKit): (WebKit::ChildProcess::launchServicesCheckIn): Deleted. (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::stopNSAppRunLoop): Deleted. (WebKit::ChildProcess::stopNSRunLoop): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. (WebKit::ChildProcess::setQOS): Deleted. (WebKit::ChildProcess::isSystemWebKit): Deleted. * Shared/mac/ChildProcessMac.mm: Removed. * Shared/mac/SecItemShim.cpp: (WebKit::globalNetworkProcess): (WebKit::sendSecItemRequest): (WebKit::initializeSecItemShim): * Shared/mac/SecItemShim.h: * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp. (WebKit::AuxiliaryProcessMainBase::parseCommandLine): (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h. (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters): (WebKit::initializeAuxiliaryProcess): (WebKit::AuxiliaryProcessMain): (WebKit::ChildProcessMainBase::platformInitialize): Deleted. (WebKit::ChildProcessMainBase::platformFinalize): Deleted. (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted. (WebKit::initializeChildProcess): Deleted. (WebKit::ChildProcessMain): Deleted. * Shared/unix/ChildProcessMain.cpp: Removed. * Shared/unix/ChildProcessMain.h: Removed. * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp. (WebKit::AuxiliaryProcessMainBase::parseCommandLine): (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. * Shared/win/ChildProcessMainWin.cpp: Removed. * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: * UIProcess/Authentication/AuthenticationChallengeProxy.h: * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp. (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy): (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy): (WebKit::AuxiliaryProcessProxy::getLaunchOptions): (WebKit::AuxiliaryProcessProxy::connect): (WebKit::AuxiliaryProcessProxy::terminate): (WebKit::AuxiliaryProcessProxy::state const): (WebKit::AuxiliaryProcessProxy::sendMessage): (WebKit::AuxiliaryProcessProxy::addMessageReceiver): (WebKit::AuxiliaryProcessProxy::removeMessageReceiver): (WebKit::AuxiliaryProcessProxy::dispatchMessage): (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage): (WebKit::AuxiliaryProcessProxy::didFinishLaunching): (WebKit::AuxiliaryProcessProxy::shutDownProcess): (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled): (WebKit::AuxiliaryProcessProxy::connectionWillOpen): (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted. (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted. (WebKit::ChildProcessProxy::getLaunchOptions): Deleted. (WebKit::ChildProcessProxy::connect): Deleted. (WebKit::ChildProcessProxy::terminate): Deleted. (WebKit::ChildProcessProxy::state const): Deleted. (WebKit::ChildProcessProxy::sendMessage): Deleted. (WebKit::ChildProcessProxy::addMessageReceiver): Deleted. (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted. (WebKit::ChildProcessProxy::dispatchMessage): Deleted. (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted. (WebKit::ChildProcessProxy::didFinishLaunching): Deleted. (WebKit::ChildProcessProxy::shutDownProcess): Deleted. (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted. (WebKit::ChildProcessProxy::connectionWillOpen): Deleted. * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h. (WebKit::AuxiliaryProcessProxy::send): (WebKit::AuxiliaryProcessProxy::sendSync): (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): (WebKit::ChildProcessProxy::send): Deleted. (WebKit::ChildProcessProxy::sendSync): Deleted. (WebKit::ChildProcessProxy::connection const): Deleted. (WebKit::ChildProcessProxy::hasConnection const): Deleted. (WebKit::ChildProcessProxy::processIdentifier const): Deleted. (WebKit::ChildProcessProxy::canSendMessage const): Deleted. (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted. (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted. (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted. * UIProcess/ChildProcessProxy.cpp: Removed. * UIProcess/ChildProcessProxy.h: Removed. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::DownloadProxyMap): * UIProcess/Downloads/DownloadProxyMap.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getLaunchOptions): (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::getLaunchOptions): (WebKit::PluginProcessProxy::sendMemoryPressureEvent): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/ServiceWorkerProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::finishAttachingToWebProcess): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::sendMemoryPressureEvent): (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): (WebKit::WebProcessProxy::getLaunchOptions): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::maybeShutDown): (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess): (WebKit::WebProcessProxy::shouldTerminate): (WebKit::WebProcessProxy::requestTermination): (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted. * UIProcess/WebProcessProxy.h: * UnifiedSources-input.xcfilelist: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess): (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::terminate): (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::initializeSandbox): (WebKit::WebProcess::platformInitializeProcess): * WebProcess/WebProcess.h: * WebProcess/WebProcessSupplement.h: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::platformInitializeProcess): (WebKit::WebProcess::stopRunLoop): (WebKit::WebProcess::initializeSandbox): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainUnix): * WebProcess/win/WebProcessMainWin.cpp: (WebKit::WebProcessMainWin): * WebProcess/wpe/WebProcessMainWPE.cpp: (WebKit::WebProcessMainUnix): Canonical link: https://commits.webkit.org/208478@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/CacheModel.cpp
Shared/ContextMenuContextData.cpp
Web Inspector: add InspectedTargetTypes diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=205174 <rdar://problem/57887953> Reviewed by Devin Rousso. Source/WebCore: Expose debuggable information via InspectorFrontendHost. * WebCore.xcodeproj/project.pbxproj: Add new files. * inspector/InspectorFrontendClient.h: Add new methods. * testing/Internals.cpp: Implement new methods. * inspector/InspectorFrontendHost.idl: * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.cpp: (WebCore::debuggableTypeToString): (WebCore::InspectorFrontendHost::debuggableInfo const): (WebCore::InspectorFrontendHost::debuggableType): Deleted. Expose a `DebuggableInfo` dictionary via the .debuggableInfo getter. Source/WebInspectorUI: This change adds a new diagnostic recorder that reports information about inspected targets and their type / version information. * UserInterface/Base/DebuggableType.js: (WI.DebuggableType.fromString): Move the static parsing factory method to DebuggableType class. * UserInterface/Main.html: Add new files. * UserInterface/Base/Main.js: (WI.contentLoaded): Add new diagnostic recorder. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass.prototype.activateDomain): Adapt to InspectorFrontendHost changes. * UserInterface/Test/TestAppController.js: (WI.TestAppController): * UserInterface/Controllers/AppController.js: (WI.AppController): Adapt to InspectorFrontendHost changes. Source/WebKit: This change supplies Web Inspector with information about the debuggable that it is connected to. This is used for diagnostics and to customize the UI based on the target type being inspected. For remote Web Inspector, WebKit clients can populate an instance of _WKInspectorDebuggableInfo and use it when calling into -[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:]. For local Web Inspector, WebInspectorProxy fills in information for the local debuggable by consulting SystemVersion.plist (on Mac port). The new enum _WKInspectorDebuggableType replaces _WKRemoteWebInspectorDebuggableType. Its WebCore equivalent is Inspector::DebuggableType. The type and other information are carried around in a _WKInspectorDebuggableInfo class. The equivalents for this class are API::DebuggableInfo and DebuggableInfoData (for sending over IPC). The DebuggableInfoData is sent as part of the initial message from UIProcess to an Inspector WebProcess, similar to how a debuggableType string was sent before. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Add new files. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Add new object type. * Shared/WebCoreArgumentCoders.h: Add EnumTraits for Inspector::DebuggableType. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (legacyDebuggableTypeToModernDebuggableType): (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): (-[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:]): (debuggableTypeString): Deleted. Use the new enum in a new method that clients can switch over to. The old method can be removed when it is no longer being used. * UIProcess/RemoteWebInspectorProxy.h: * UIProcess/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::RemoteWebInspectorProxy): (WebKit::RemoteWebInspectorProxy::load): (WebKit::RemoteWebInspectorProxy::reopen): Send DebuggableInfoData struct to RemoteWebInspectorUI. * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::openLocalInspectorFrontend): (WebKit::WebInspectorProxy::infoForLocalDebuggable): Send DebuggableInfoData struct to WebInspectorUI. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::systemVersionPlist): (WebKit::WebInspectorProxy::infoForLocalDebuggable): Add Mac implementation for local debuggables. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): * UIProcess/wpe/WebInspectorProxyWPE.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): Add stubs for other platforms. * UIProcess/glib/RemoteInspectorClient.cpp: * UIProcess/socket/RemoteInspectorClient.h: * UIProcess/socket/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): (WebKit::debuggableTypeToString): (WebKit::RemoteInspectorClient::setTargetList): Use Inspector::DebuggableType instead of String for debuggable type. * WebProcess/WebPage/RemoteWebInspectorUI.messages.in: * WebProcess/WebPage/RemoteWebInspectorUI.h: * WebProcess/WebPage/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::initialize): (WebKit::RemoteWebInspectorUI::debuggableType const): (WebKit::RemoteWebInspectorUI::targetPlatformName const): (WebKit::RemoteWebInspectorUI::targetBuildVersion const): (WebKit::RemoteWebInspectorUI::targetProductVersion const): (WebKit::RemoteWebInspectorUI::targetIsSimulator const): Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost. * WebProcess/WebPage/WebInspectorUI.messages.in: * WebProcess/WebPage/WebInspectorUI.h: * WebProcess/WebPage/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): (WebKit::WebInspectorUI::targetPlatformName const): (WebKit::WebInspectorUI::targetBuildVersion const): (WebKit::WebInspectorUI::targetProductVersion const): Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost. Source/WebKitLegacy/win: * WebCoreSupport/WebInspectorClient.h: Canonical link: https://commits.webkit.org/218748@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-22 04:19:53 +00:00
Shared/DebuggableInfoData.cpp
Shared/EditingRange.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/EditorState.cpp
Shared/FontInfo.cpp
Shared/FrameInfoData.cpp
[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing https://bugs.webkit.org/show_bug.cgi?id=217783 <rdar://problem/69968787> Reviewed by Devin Rousso. Source/WebCore: * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: In order for WebInspectorUIExtensionController to work with remote and local inspectors, it stores a weak pointer the inspector's InspectorFrontendClient. Expose the frontend's page so that the frontend API dispatcher can dispatch to it. Source/WebInspectorUI: * UserInterface/Main.html: Add new files. * UserInterface/Controllers/AppControllerBase.js: (WI.AppControllerBase): (WI.AppControllerBase.prototype.get extensionController): Hang the extension controller off of the global singleton, as there can only be one. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype.registerExtension): (WI.WebInspectorExtensionController.prototype.unregisterExtension): Added. For now, just keep the UUIDs in a map and log the result. * UserInterface/Models/WebInspectorExtension.js: (WI.WebInspectorExtension): (WI.WebInspectorExtension.prototype.get extensionID): (WI.WebInspectorExtension.prototype.get displayName): Added. This is a data object for now. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.loadCompleted): (InspectorFrontendAPI.registerExtension): (InspectorFrontendAPI.unregisterExtension): Added. Forward invocations to the extension controller. Source/WebKit: _WKInspectorExtension is new SPI that represents a Web Extension that uses the 'devtools' API to interact with Web Inspector. An extension is associated with its _WKInspectorExtensionHost. A WebKit client that supports Web Extensions can use this class to implement 'devtools' extension APIs. Add _WKInspectorExtensionHost methods to register and unregister an extension. Add plumbing so that the extension in registered in the frontend with WI.InspectorExtensionController. Later patches will flesh out the needed functionality to implement rest of the 'devtools' API. * Sources.txt: * SourcesCocoa.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * WebKit.xcodeproj/project.pbxproj: Add new files. * Scripts/webkit/messages.py: If a message includes InspectorExtensionError, then generate an include for InspectorExtensionTypes.h where it is declared. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): New API object type. * Shared/InspectorExtensionTypes.h: Added error code enum and useful type aliases. * Shared/InspectorExtensionTypes.cpp: (WebKit::inspectorExtensionErrorToString): * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::create): (API::InspectorExtension::InspectorExtension): (API::InspectorExtension::~InspectorExtension): Added. This is a placeholder object that's used for the wrapper system, since we don't have single C++ objects for each extension to back the API object. * UIProcess/API/Cocoa/_WKInspector.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): (-[_WKInspector unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension initWithIdentifier:]): (-[_WKInspectorExtension dealloc]): (-[_WKInspectorExtension _apiObject]): (-[_WKInspectorExtension extensionID]): Added. This is a data object that's also used as a token to unregister the extension. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Add new SPI. * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): (-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Add FrontendLoaded. (WebKit::RemoteWebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::frontendLoaded): (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow): Set up the extension controller object after the frontend has been created. Hook up the FrontendLoaded event sent from Inspector web process so that the extension controller can be notified of when it's safe to message the frontend. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createFrontendPage): (WebKit::WebInspectorProxy::closeFrontendPageAndWindow): (WebKit::WebInspectorProxy::frontendLoaded): Set up the extension controller object after the frontend has been created. * UIProcess/Inspector/WebInspectorProxy.h: (WebKit::WebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: Added. (WebKit::WebInspectorUIExtensionControllerProxy::WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::whenFrontendHasLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): Added. Forward API requests to the Web Inspector's web process to be evaluated in the frontend. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand): Add a more generic way to encode values to be passed as arguments to InspectorFrontendAPI.dispatch. * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): (WebKit::WebInspectorUI::closeWindow): * WebProcess/Inspector/WebInspectorUI.h: (WebKit::WebInspectorUI::frontendPage const): Added. (WebKit::WebInspectorUI::frontendAPIDispatcher): Added. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Added. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: Added. (WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::registerExtension): (WebKit::WebInspectorUIExtensionController::unregisterExtension): (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult): Handle incoming messages by forwarding the associated command to WI.WebExtensionController via InspectorFrontendAPI evaluations. * UIProcess/API/Cocoa/_WKUserStyleSheet.h: * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Fallout from unified build chunking shifts. * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticatorInternal::getExistingCredentials): (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): Fallout from unified build chunking shifts, but more. Tools: Add API tests to exercise new methods of the _WKInspectorExtensionHost protocol. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: New test file. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: Added. (resetGlobalState): (-[UIDelegateForTestingInspectorExtensionHost _webView:didAttachLocalInspector:]): (TEST): Canonical link: https://commits.webkit.org/231480@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-11 21:44:38 +00:00
Shared/InspectorExtensionTypes.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/LayerTreeContext.cpp
Shared/LoadParameters.cpp
Shared/NavigationActionData.cpp
Move ResourceLoadStatistics files from UIProcess to NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=193252 <rdar://problem/47125401> Reviewed by Alex Christensen. This patch is the first part of a refactoring to move the ResourceLoadStatistics logic from the UIProcess to the NetworkProcess. This patch moves code into different folders and adjusts necessary build files, but does not change where the code executes. These changes have no impact on behavior or test results. I also modified a few files to add missing include files uncovered by the unified build system. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp. * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp. * NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.h. * NetworkProcess/Downloads/PendingDownload.cpp: * NetworkProcess/Downloads/PendingDownload.h: * CMakeLists.txt: * PlatformMac.cmake: * PlatformWin.cmake: * Shared/PersistencyUtils.cpp: Renamed from Source/WebKit/UIProcess/PersistencyUtils.cpp. * Shared/PersistencyUtils.h: Renamed from Source/WebKit/UIProcess/PersistencyUtils.h. * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Add missing WebKit:: scope. * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Add missing include. * UIProcess/WebDataListSuggestionsDropdown.cpp: Ditto. * UIProcess/mac/DisplayLink.cpp: * UnifiedSources-input.xcfilelist: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/207759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-08 22:02:16 +00:00
Shared/PersistencyUtils.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/PlatformPopupMenuData.cpp
Shared/PrintInfo.cpp
Shared/RTCNetwork.cpp
Shared/RTCPacketOptions.cpp
WKContentRuleLists should block requests from service workers https://bugs.webkit.org/show_bug.cgi?id=201980 <rdar://problem/55516735> Reviewed by Chris Dumez. Source/WebKit: Test: http/tests/contentextensions/service-worker.https.html Also covered by an API test. * Shared/ServiceWorkerInitializationData.cpp: Added. (WebKit::ServiceWorkerInitializationData::encode const): (WebKit::ServiceWorkerInitializationData::decode): * Shared/ServiceWorkerInitializationData.h: Added. * Sources.txt: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::addProcess): (WebKit::WebUserContentControllerProxy::contentRuleListData): * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess): (WebKit::WebProcessPool::createWebPage): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createForServiceWorkers): (WebKit::WebProcessProxy::establishServiceWorkerContext): (WebKit::contentRuleListsFromIdentifier): (WebKit::WebProcessProxy::enableServiceWorkers): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection): (WebKit::m_userAgent): (WebKit::WebSWContextManagerConnection::installServiceWorker): * WebProcess/Storage/WebSWContextManagerConnection.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Tools: NSString initWithContentsOfURL doesn't work with https URLs with certificates without a trusted root, so I use an ephemeral NSURLSession instead so I can tell it to accept any connection, even our WebKit httpd server. I also added an API test. * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * WebKitTestRunner/mac/TestControllerMac.mm: (-[WKTRSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): (WTR::TestController::configureContentExtensionForTest): LayoutTests: * http/tests/contentextensions/resources/fetch-worker.js: Added. (event.fetch.string_appeared_here.then): (event.catch): * http/tests/contentextensions/resources/serviceworkertest.js: Added. (testServiceWorker): (test): * http/tests/contentextensions/service-worker.https-expected.txt: Added. * http/tests/contentextensions/service-worker.https.html: Added. * http/tests/contentextensions/service-worker.https.html.json: Added. Canonical link: https://commits.webkit.org/217007@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-30 22:39:31 +00:00
Shared/ServiceWorkerInitializationData.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/UserData.cpp
Add SPI WKWebpagePreferences._userContentController https://bugs.webkit.org/show_bug.cgi?id=209795 Reviewed by Tim Hatcher. Source/WebKit: This will allow us to switch which WKUserContentController we are using at decidePolicyForNavigationAction time like we do WKWebsiteDataStores. This is only allowed with main frame navigations. To do this I moved UserContentControllerParameters into their own struct. I remove unused WebsitePoliciesData.websiteDataStoreParameters. I pass an API::WebsitePolicies* further down the chain instead of switching to Optional<WebsitePoliciesData>, which allows us to access the WebUserContentControllerProxy* from the former in WebPageProxy::creationParameters. I removed an unused WebsitePolicies constructor. I added a missing copied member variable in WebsitePolicies::copy. * NetworkProcess/NetworkSession.cpp: * Shared/UserContentControllerParameters.cpp: Added. (WebKit::UserContentControllerParameters::encode const): (WebKit::UserContentControllerParameters::decode): * Shared/UserContentControllerParameters.h: Added. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::encode const): (WebKit::WebsitePoliciesData::decode): * Shared/WebsitePoliciesData.h: * Sources.txt: * UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::copy const): (API::WebsitePolicies::setUserContentController): (API::WebsitePolicies::data): (API::WebsitePolicies::WebsitePolicies): Deleted. * UIProcess/API/APIWebsitePolicies.h: * UIProcess/API/C/WKPage.cpp: (WKPageUpdateWebsitePolicies): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _updateWebpagePreferences:]): * UIProcess/API/Cocoa/WKWebpagePreferences.mm: (-[WKWebpagePreferences _userContentController]): (-[WKWebpagePreferences _setUserContentController:]): * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: * UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): * UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::initializeWebPage): (WebKit::ProvisionalPageProxy::goToBackForwardItem): * UIProcess/ProvisionalPageProxy.h: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: (WebKit::WebUserContentControllerProxy::addProcess): (WebKit::WebUserContentControllerProxy::parameters const): (WebKit::WebUserContentControllerProxy::contentRuleListData const): (WebKit::WebUserContentControllerProxy::contentRuleListData): Deleted. * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::receivedNavigationPolicyDecision): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::continueNavigationInNewProcess): (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForResponseShared): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::addWebUserContentControllerProxy): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_processDisplayName): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): Tools: * TestWebKitAPI/SourcesCocoa.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: (-[TestUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Deleted. * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: * TestWebKitAPI/cocoa/TestUIDelegate.h: Added. * TestWebKitAPI/cocoa/TestUIDelegate.mm: Added. (-[TestUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (-[TestUIDelegate waitForAlert]): Canonical link: https://commits.webkit.org/222742@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-31 20:13:48 +00:00
Shared/UserContentControllerParameters.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/WebPageCreationParameters.cpp
Shared/WebPageGroupData.cpp
Make attributedBundleIdendifier a property for WKWebViewConfiguration instead of _WKWebsiteDataStoreConfiguration https://bugs.webkit.org/show_bug.cgi?id=226548 Source/WebKit: <rdar://78737547> Reviewed by Brady Eidson. We have been putting properties to go into the NSURLSessionConfiguration on the _WKWebsiteDataStoreConfiguration. This has been ok so far, but now we have an application that needs to run networking attributed to different applications but sharing the data storage in the same process. We now do what we should've done long ago: put these non-storage-related properties on the WKWebViewConfiguration. I introduce WebPageNetworkParameters which currently has only one member, but will soon have more. I made it so that if multiple WKWebViews with the same data store have the same attributedBundleIdendifier, they share an NSURLSession. Otherwise, they get their own NSURLSession in a different SessionSet. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::addWebPageNetworkParameters): (WebKit::NetworkProcess::removeWebPageNetworkParameters): (WebKit::NetworkProcess::countNonDefaultSessionSets): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::addWebPageNetworkParameters): (WebKit::NetworkSession::removeWebPageNetworkParameters): (WebKit::NetworkSession::countNonDefaultSessionSets const): * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): (WebKit::NetworkSessionCocoa::initializeNSURLSessionsInSet): (WebKit::NetworkSessionCocoa::SessionSet::initializeEphemeralStatelessSessionIfNeeded): (WebKit::NetworkSessionCocoa::addWebPageNetworkParameters): (WebKit::NetworkSessionCocoa::removeWebPageNetworkParameters): (WebKit::NetworkSessionCocoa::countNonDefaultSessionSets const): (WebKit::NetworkSessionCocoa::attributedBundleIdentifier const): Deleted. (WebKit::NetworkSessionCocoa::initializeStandardSessionsInSet): Deleted. * Shared/WebPageNetworkParameters.cpp: Added. (WebKit::WebPageNetworkParameters::encode const): (WebKit::WebPageNetworkParameters::decode): * Shared/WebPageNetworkParameters.h: Added. (WebKit::WebPageNetworkParameters::WebPageNetworkParameters): (WebKit::WebPageNetworkParameters::isHashTableDeletedValue const): (WebKit::WebPageNetworkParameters::hash const): (WebKit::WebPageNetworkParameters::operator== const): (WebKit::WebPageNetworkParameters::attributedBundleIdentifier const): (WTF::DefaultHash<WebKit::WebPageNetworkParameters>::hash): (WTF::DefaultHash<WebKit::WebPageNetworkParameters>::equal): * Sources.txt: * UIProcess/API/APIPageConfiguration.cpp: (API::PageConfiguration::copy const): * UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::setAttributedBundleIdentifier): (API::PageConfiguration::attributedBundleIdentifier const): * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration _setAttributedBundleIdentifier:]): (-[WKWebViewConfiguration _attributedBundleIdentifier]): * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _countNonDefaultSessionSets:]): * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration setAttributedBundleIdentifier:]): Deleted. (-[_WKWebsiteDataStoreConfiguration attributedBundleIdentifier]): Deleted. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::~WebPageProxy): (WebKit::WebPageProxy::initializeWebPage): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::platformSetNetworkParameters): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::countNonDefaultSessionSets): * UIProcess/WebsiteData/WebsiteDataStore.h: * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const): * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier): (WebKit::WebsiteDataStoreConfiguration::attributedBundleIdentifier const): Deleted. (WebKit::WebsiteDataStoreConfiguration::setAttributedBundleIdentifier): Deleted. * WebKit.xcodeproj/project.pbxproj: Tools: Reviewed by Brady Eidson. * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/238493@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/WebPopupItem.cpp
Shared/WebPreferencesDefaultValues.cpp
Shared/WebPreferencesStore.cpp
Shared/WebProcessCreationParameters.cpp
REGRESSION (r264925): run-safari --debug no longer works https://bugs.webkit.org/show_bug.cgi?id=214947 <rdar://problem/66297850> Reviewed by Darin Adler. Removing these APIs in WebKit caused older versions of Safari to break. We should add back in empty functions to make this work. No new tests. Manually verified this fix. * Shared/API/c/WKRenderLayer.cpp: Added. (WKRenderLayerGetTypeID): (WKRenderLayerGetRenderer): (WKRenderLayerCopyRendererName): (WKRenderLayerCopyElementTagName): (WKRenderLayerCopyElementID): (WKRenderLayerGetElementClassNames): (WKRenderLayerGetAbsoluteBounds): (WKRenderLayerIsClipping): (WKRenderLayerIsClipped): (WKRenderLayerIsReflection): (WKRenderLayerGetCompositingLayerType): (WKRenderLayerGetBackingStoreMemoryEstimate): (WKRenderLayerGetNegativeZOrderList): (WKRenderLayerGetNormalFlowList): (WKRenderLayerGetPositiveZOrderList): (WKRenderLayerGetFrameContentsLayer): * Shared/API/c/WKRenderLayer.h: Added. * Shared/API/c/WKRenderObject.cpp: Added. (WKRenderObjectGetTypeID): (WKRenderObjectCopyName): (WKRenderObjectCopyTextSnippet): (WKRenderObjectGetTextLength): (WKRenderObjectCopyElementTagName): (WKRenderObjectCopyElementID): (WKRenderObjectGetElementClassNames): (WKRenderObjectGetAbsolutePosition): (WKRenderObjectGetFrameRect): (WKRenderObjectGetChildren): * Shared/API/c/WKRenderObject.h: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCopyRenderTree): (WKBundlePageCopyRenderLayerTree): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Canonical link: https://commits.webkit.org/227785@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Refactor wheel event coalescing into its own class https://bugs.webkit.org/show_bug.cgi?id=217523 Reviewed by Sam Weinig. Source/WebCore: Export the TextStream outputter. * platform/PlatformWheelEvent.h: Source/WebKit: WebPageProxy had some confusing code for coalescing wheel events, first added in r116466. To prepare this code for partial re-use in another place, factor it into its own class, WebWheelEventCoalescer. WebWheelEventCoalescer holds a queue of pending NativeWebWheelEvents, and a queue of sequences of NativeWebWheelEvents, where each sequence has been coalesced into a single WebWeelEvent which was sent to the Web Process. When the UI process receives a message back from the Web Process, it calls takeOldestEventBeingProcessed() which removes the first sequence from m_eventsBeingProcessed. This code has to track NativeWebWheelEvents, because we need to dig the NSEvent out of the NativeWebWheelEvent at this stage. * Platform/Logging.h: Add a WheelEvents log channel. * Shared/NativeWebWheelEvent.h: * Shared/WebWheelEventCoalescer.cpp: Added. (WebKit::operator<<): (WebKit::WebWheelEventCoalescer::canCoalesce): (WebKit::WebWheelEventCoalescer::coalesce): (WebKit::WebWheelEventCoalescer::shouldDispatchEventNow const): (WebKit::WebWheelEventCoalescer::nextEventToDispatch): (WebKit::WebWheelEventCoalescer::shouldDispatchEvent): (WebKit::WebWheelEventCoalescer::takeOldestEventBeingProcessed): (WebKit::WebWheelEventCoalescer::clear): * Shared/WebWheelEventCoalescer.h: Added. (WebKit::WebWheelEventCoalescer::hasEventsBeingProcessed const): * Sources.txt: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::wheelEventCoalescer): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::resetStateAfterProcessExited): (WebKit::canCoalesce): Deleted. (WebKit::coalesce): Deleted. (WebKit::coalescedWheelEvent): Deleted. (WebKit::WebPageProxy::processNextQueuedWheelEvent): Deleted. (WebKit::WebPageProxy::shouldProcessWheelEventNow const): Deleted. * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/230315@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Shared/WebsiteDataStoreParameters.cpp
Shared/WebsitePoliciesData.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Shared/API/APIPageGroupHandle.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Cross platform compilation of PlatformXRSystem and PlatformXRSystemProxy https://bugs.webkit.org/show_bug.cgi?id=226919 Reviewed by Dean Jackson. PlatformXRSystem and PlatformXRSystemProxy are only compiled in Cocoa platform while WPE uses OpenXR, which only has code in WebCore. In order to run WebKit based WebXR on non-cocoa VR Standalone devices we also need to split the code and IPC messages between UIProcess/WebProcess. The existing PlatformXRSystem/PlatformXRSystemProxy pattern fits very well to the VR standalone scenario. This patch ensures that the existing code can be used in more platforms other than Cocoa. Tested by WebXR WPT. * CMakeLists.txt: * DerivedSources.make: * PlatformMac.cmake: * Shared/XR/XRDeviceIdentifier.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceIdentifier.h. * Shared/XR/XRDeviceInfo.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm. * Shared/XR/XRDeviceInfo.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.h. * Shared/XR/XRDeviceProxy.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm. * Shared/XR/XRDeviceProxy.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.h. * Shared/mac/MediaFormatReader/MediaSampleCursor.cpp: Add include to fix compilation error * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/PlatformXRCoordinator.mm: Copied from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::resetState): * UIProcess/WebPageProxy.h: * UIProcess/XR/PlatformXRCoordinator.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h. * UIProcess/XR/PlatformXRSystem.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.mm. * UIProcess/XR/PlatformXRSystem.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.h. * UIProcess/XR/PlatformXRSystem.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::xrSystemProxy): * WebProcess/WebPage/WebPage.h: * WebProcess/XR/PlatformXRSystemProxy.cpp: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm. * WebProcess/XR/PlatformXRSystemProxy.h: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h. * WebProcess/XR/PlatformXRSystemProxy.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. Canonical link: https://commits.webkit.org/239583@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 09:30:56 +00:00
Shared/XR/XRDeviceInfo.cpp
Shared/XR/XRDeviceProxy.cpp
Rename ChildProcess to AuxiliaryProcess https://bugs.webkit.org/show_bug.cgi?id=193943 Reviewed by Andy Estes. "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Cookies/WebCookieManager.cpp: * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp: * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * NetworkProcess/NetworkProcess.cpp: (WebKit::callExitSoon): (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::initializeConnection): (WebKit::NetworkProcess::terminate): (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcessSupplement.h: * NetworkProcess/cache/NetworkCacheStorage.cpp: (WebKit::NetworkCache::Storage::deleteOldVersions): * NetworkProcess/ios/NetworkProcessIOS.mm: (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeProcess): (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/soup/NetworkProcessMainSoup.cpp: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::NetworkProcessMainUnix): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * NetworkProcess/watchos/NetworkProximityManager.h: * NetworkProcess/watchos/NetworkProximityManager.mm: (WebKit::NetworkProximityManager::NetworkProximityManager): * NetworkProcess/win/NetworkProcessMainWin.cpp: (WebKit::initializeAuxiliaryProcess<NetworkProcess>): (WebKit::NetworkProcessMainWin): (WebKit::initializeChildProcess<NetworkProcess>): Deleted. * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeProcess): (WebKit::PluginProcess::initializeConnection): (WebKit::PluginProcess::didReceiveMessage): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): (WebKit::PluginProcess::stopRunLoop): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * PluginProcess/unix/PluginProcessUnix.cpp: (WebKit::PluginProcess::platformInitializeProcess): * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): * Shared/Authentication/AuthenticationManager.h: * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp. (WebKit::AuxiliaryProcess::AuxiliaryProcess): (WebKit::AuxiliaryProcess::~AuxiliaryProcess): (WebKit::AuxiliaryProcess::didClose): (WebKit::AuxiliaryProcess::initialize): (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled): (WebKit::AuxiliaryProcess::initializeProcess): (WebKit::AuxiliaryProcess::initializeProcessName): (WebKit::AuxiliaryProcess::initializeConnection): (WebKit::AuxiliaryProcess::addMessageReceiver): (WebKit::AuxiliaryProcess::removeMessageReceiver): (WebKit::AuxiliaryProcess::disableTermination): (WebKit::AuxiliaryProcess::enableTermination): (WebKit::AuxiliaryProcess::messageSenderConnection): (WebKit::AuxiliaryProcess::messageSenderDestinationID): (WebKit::AuxiliaryProcess::terminationTimerFired): (WebKit::AuxiliaryProcess::stopRunLoop): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::AuxiliaryProcess::terminate): (WebKit::AuxiliaryProcess::shutDown): (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const): (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent): (WebKit::ChildProcess::ChildProcess): Deleted. (WebKit::ChildProcess::~ChildProcess): Deleted. (WebKit::ChildProcess::didClose): Deleted. (WebKit::ChildProcess::initialize): Deleted. (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted. (WebKit::ChildProcess::initializeProcess): Deleted. (WebKit::ChildProcess::initializeProcessName): Deleted. (WebKit::ChildProcess::initializeConnection): Deleted. (WebKit::ChildProcess::addMessageReceiver): Deleted. (WebKit::ChildProcess::removeMessageReceiver): Deleted. (WebKit::ChildProcess::disableTermination): Deleted. (WebKit::ChildProcess::enableTermination): Deleted. (WebKit::ChildProcess::messageSenderConnection): Deleted. (WebKit::ChildProcess::messageSenderDestinationID): Deleted. (WebKit::ChildProcess::terminationTimerFired): Deleted. (WebKit::ChildProcess::stopRunLoop): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. (WebKit::ChildProcess::terminate): Deleted. (WebKit::ChildProcess::shutDown): Deleted. (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted. (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted. * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h. (WebKit::ChildProcess::parentProcessConnection const): Deleted. (WebKit::ChildProcess::messageReceiverMap): Deleted. (WebKit::ChildProcess::setTerminationTimeout): Deleted. (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted. * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in. * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h. (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement): (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted. (WebKit::ChildProcessSupplement::initializeConnection): Deleted. * Shared/ChildProcess.cpp: Removed. * Shared/ChildProcess.h: Removed. * Shared/ChildProcess.messages.in: Removed. * Shared/ChildProcessSupplement.h: Removed. * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm. (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. * Shared/Cocoa/ChildProcessCocoa.mm: Removed. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: (WebKit::initializeAuxiliaryProcess): (WebKit::XPCServiceInitializer): (WebKit::initializeChildProcess): Deleted. * Shared/WebSQLiteDatabaseTracker.cpp: (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated): (WebKit::m_childProcessType): Deleted. * Shared/WebSQLiteDatabaseTracker.h: * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm. (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::setQOS): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::setQOS): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. * Shared/ios/ChildProcessIOS.mm: Removed. * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm. (WebKit::SandboxInfo::SandboxInfo): (WebKit::AuxiliaryProcess::launchServicesCheckIn): (WebKit::AuxiliaryProcess::platformInitialize): (WebKit::processStorageClass): (WebKit::sandboxDirectory): (WebKit::applySandbox): (WebKit::initializeSandboxParameters): (WebKit::AuxiliaryProcess::initializeSandbox): (WebKit::AuxiliaryProcess::stopNSAppRunLoop): (WebKit::AuxiliaryProcess::stopNSRunLoop): (WebKit::AuxiliaryProcess::platformStopRunLoop): (WebKit::AuxiliaryProcess::setQOS): (WebKit::AuxiliaryProcess::isSystemWebKit): (WebKit::ChildProcess::launchServicesCheckIn): Deleted. (WebKit::ChildProcess::platformInitialize): Deleted. (WebKit::ChildProcess::initializeSandbox): Deleted. (WebKit::ChildProcess::stopNSAppRunLoop): Deleted. (WebKit::ChildProcess::stopNSRunLoop): Deleted. (WebKit::ChildProcess::platformStopRunLoop): Deleted. (WebKit::ChildProcess::setQOS): Deleted. (WebKit::ChildProcess::isSystemWebKit): Deleted. * Shared/mac/ChildProcessMac.mm: Removed. * Shared/mac/SecItemShim.cpp: (WebKit::globalNetworkProcess): (WebKit::sendSecItemRequest): (WebKit::initializeSecItemShim): * Shared/mac/SecItemShim.h: * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp. (WebKit::AuxiliaryProcessMainBase::parseCommandLine): (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h. (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters): (WebKit::initializeAuxiliaryProcess): (WebKit::AuxiliaryProcessMain): (WebKit::ChildProcessMainBase::platformInitialize): Deleted. (WebKit::ChildProcessMainBase::platformFinalize): Deleted. (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted. (WebKit::initializeChildProcess): Deleted. (WebKit::ChildProcessMain): Deleted. * Shared/unix/ChildProcessMain.cpp: Removed. * Shared/unix/ChildProcessMain.h: Removed. * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp. (WebKit::AuxiliaryProcessMainBase::parseCommandLine): (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. * Shared/win/ChildProcessMainWin.cpp: Removed. * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * SourcesWPE.txt: * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: * UIProcess/Authentication/AuthenticationChallengeProxy.h: * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp. (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy): (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy): (WebKit::AuxiliaryProcessProxy::getLaunchOptions): (WebKit::AuxiliaryProcessProxy::connect): (WebKit::AuxiliaryProcessProxy::terminate): (WebKit::AuxiliaryProcessProxy::state const): (WebKit::AuxiliaryProcessProxy::sendMessage): (WebKit::AuxiliaryProcessProxy::addMessageReceiver): (WebKit::AuxiliaryProcessProxy::removeMessageReceiver): (WebKit::AuxiliaryProcessProxy::dispatchMessage): (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage): (WebKit::AuxiliaryProcessProxy::didFinishLaunching): (WebKit::AuxiliaryProcessProxy::shutDownProcess): (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled): (WebKit::AuxiliaryProcessProxy::connectionWillOpen): (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted. (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted. (WebKit::ChildProcessProxy::getLaunchOptions): Deleted. (WebKit::ChildProcessProxy::connect): Deleted. (WebKit::ChildProcessProxy::terminate): Deleted. (WebKit::ChildProcessProxy::state const): Deleted. (WebKit::ChildProcessProxy::sendMessage): Deleted. (WebKit::ChildProcessProxy::addMessageReceiver): Deleted. (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted. (WebKit::ChildProcessProxy::dispatchMessage): Deleted. (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted. (WebKit::ChildProcessProxy::didFinishLaunching): Deleted. (WebKit::ChildProcessProxy::shutDownProcess): Deleted. (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted. (WebKit::ChildProcessProxy::connectionWillOpen): Deleted. * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h. (WebKit::AuxiliaryProcessProxy::send): (WebKit::AuxiliaryProcessProxy::sendSync): (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): (WebKit::ChildProcessProxy::send): Deleted. (WebKit::ChildProcessProxy::sendSync): Deleted. (WebKit::ChildProcessProxy::connection const): Deleted. (WebKit::ChildProcessProxy::hasConnection const): Deleted. (WebKit::ChildProcessProxy::processIdentifier const): Deleted. (WebKit::ChildProcessProxy::canSendMessage const): Deleted. (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted. (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted. (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted. * UIProcess/ChildProcessProxy.cpp: Removed. * UIProcess/ChildProcessProxy.h: Removed. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::DownloadProxyMap): * UIProcess/Downloads/DownloadProxyMap.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getLaunchOptions): (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::getLaunchOptions): (WebKit::PluginProcessProxy::sendMemoryPressureEvent): * UIProcess/Plugins/PluginProcessProxy.h: * UIProcess/ServiceWorkerProcessProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::finishAttachingToWebProcess): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::sendMemoryPressureEvent): (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): (WebKit::WebProcessProxy::getLaunchOptions): (WebKit::WebProcessProxy::didFinishLaunching): (WebKit::WebProcessProxy::maybeShutDown): (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess): (WebKit::WebProcessProxy::shouldTerminate): (WebKit::WebProcessProxy::requestTermination): (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted. * UIProcess/WebProcessProxy.h: * UnifiedSources-input.xcfilelist: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess): (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::terminate): (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::initializeSandbox): (WebKit::WebProcess::platformInitializeProcess): * WebProcess/WebProcess.h: * WebProcess/WebProcessSupplement.h: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::platformInitializeProcess): (WebKit::WebProcess::stopRunLoop): (WebKit::WebProcess::initializeSandbox): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainUnix): * WebProcess/win/WebProcessMainWin.cpp: (WebKit::WebProcessMainWin): * WebProcess/wpe/WebProcessMainWPE.cpp: (WebKit::WebProcessMainUnix): Canonical link: https://commits.webkit.org/208478@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-29 22:12:51 +00:00
UIProcess/AuxiliaryProcessProxy.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/DrawingAreaProxy.cpp
UIProcess/FrameLoadState.cpp
UIProcess/GeolocationPermissionRequestManagerProxy.cpp
UIProcess/GeolocationPermissionRequestProxy.cpp
Introduce LegacyGlobalSettings for settings the NetworkProcess needs from a WebProcessPool https://bugs.webkit.org/show_bug.cgi?id=201970 Reviewed by Geoff Garen. I'm starting by moving the cache model to this new abstraction. We were using it in tests to disable the page cache, which should be done with a boolean on the pool configuration, not by changing the cache model. We were also using it in WKContextSetCacheModel which has several clients that won't change quickly, so this abstraction is used to maintain existing behavior. I need this so I can make a NetworkProcess not depend on anything from a WebProcessPool when starting. * Sources.txt: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::copy): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/C/WKContext.cpp: (WKContextSetCacheModel): (WKContextGetCacheModel): * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration pageCacheEnabled]): (-[_WKProcessPoolConfiguration setPageCacheEnabled:]): * UIProcess/LegacyGlobalSettings.cpp: Added. (WebKit::LegacyGlobalSettings::singleton): (WebKit::LegacyGlobalSettings::setCacheModel): * UIProcess/LegacyGlobalSettings.h: Added. (WebKit::LegacyGlobalSettings::cacheModel const): * UIProcess/WebProcessCache.cpp: (WebKit::WebProcessCache::updateCapacity): * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::ensureNetworkProcess): (WebKit::WebProcessPool::initializeNewWebProcess): (WebKit::WebProcessPool::updateMaxSuspendedPageCount): (WebKit::WebProcessPool::setCacheModel): * UIProcess/WebProcessPool.h: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/215655@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-20 20:36:57 +00:00
UIProcess/LegacyGlobalSettings.cpp
Permission request API for MediaKeySystem access support https://bugs.webkit.org/show_bug.cgi?id=221187 Reviewed by Jer Noble. Source/WebCore: Support for user permission requesting when access to an EME MediaKeySystem is being requested by the page. This is similar to the mediaDevices access guards. Existing test media/encrypted-media/mock-MediaKeySystemAccess.html was updated to cover this new code path and WPE/GTK API tests as well. * CMakeLists.txt: * Headers.cmake: * Modules/encryptedmedia/MediaKeySystemClient.h: Added. * Modules/encryptedmedia/MediaKeySystemController.cpp: Added. (WebCore::MediaKeySystemController::supplementName): (WebCore::MediaKeySystemController::MediaKeySystemController): (WebCore::MediaKeySystemController::~MediaKeySystemController): (WebCore::provideMediaKeySystemTo): (WebCore::MediaKeySystemController::logRequestMediaKeySystemDenial): * Modules/encryptedmedia/MediaKeySystemController.h: Added. (WebCore::MediaKeySystemController::client const): (WebCore::MediaKeySystemController::from): (WebCore::MediaKeySystemController::requestMediaKeySystem): (WebCore::MediaKeySystemController::cancelMediaKeySystemRequest): * Modules/encryptedmedia/MediaKeySystemRequest.cpp: Added. (WebCore::MediaKeySystemRequest::create): (WebCore::MediaKeySystemRequest::MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::~MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const): (WebCore::MediaKeySystemRequest::start): (WebCore::MediaKeySystemRequest::allow): (WebCore::MediaKeySystemRequest::deny): (WebCore::MediaKeySystemRequest::stop): (WebCore::MediaKeySystemRequest::activeDOMObjectName const): (WebCore::MediaKeySystemRequest::document const): * Modules/encryptedmedia/MediaKeySystemRequest.h: Added. (WebCore::MediaKeySystemRequest::setAllowCallback): (WebCore::MediaKeySystemRequest::identifier const): (WebCore::MediaKeySystemRequest::keySystem const): * Modules/encryptedmedia/NavigatorEME.cpp: (WebCore::NavigatorEME::requestMediaKeySystemAccess): Source/WebKit: Add new IPC and C API exposing MediaKeySystem access permissions to the UIProcess. At least GTK/WPE would like to have API for asking permission to the user when EME's MediaKeyAccess is being requested by a page. On Apple platforms the permission is granted by default until a decision is made about supporting this in their APIUIClient. * CMakeLists.txt: * Headers.cmake: * Platform/Logging.h: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForMediaKeySystemPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp: Added. (WKMediaKeySystemPermissionCallbackGetTypeID): (WKMediaKeySystemPermissionCallbackComplete): * UIProcess/API/C/WKMediaKeySystemPermissionCallback.h: Added. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/MediaKeySystemPermissionRequest.h: Added. (WebKit::MediaKeySystemPermissionRequest::create): (WebKit::MediaKeySystemPermissionRequest::complete): (WebKit::MediaKeySystemPermissionRequest::keySystem const): (WebKit::MediaKeySystemPermissionRequest::MediaKeySystemPermissionRequest): (WebKit::MediaKeySystemPermissionCallback::create): (WebKit::MediaKeySystemPermissionCallback::complete): (WebKit::MediaKeySystemPermissionCallback::MediaKeySystemPermissionCallback): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::~MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::invalidatePendingRequests): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::grantRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::createRequestForFrame): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logChannel const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logger const): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::page const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): * UIProcess/MediaKeySystemPermissionRequestProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestProxy::MediaKeySystemPermissionRequestProxy): (WebKit::MediaKeySystemPermissionRequestProxy::allow): (WebKit::MediaKeySystemPermissionRequestProxy::deny): (WebKit::MediaKeySystemPermissionRequestProxy::invalidate): (WebKit::MediaKeySystemPermissionRequestProxy::doDefaultAction): * UIProcess/MediaKeySystemPermissionRequestProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestProxy::create): (WebKit::MediaKeySystemPermissionRequestProxy::isPending const): (WebKit::MediaKeySystemPermissionRequestProxy::mediaKeySystemID const): (WebKit::MediaKeySystemPermissionRequestProxy::mainFrameID const): (WebKit::MediaKeySystemPermissionRequestProxy::frameID const): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin const): (WebKit::MediaKeySystemPermissionRequestProxy::keySystem const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): (WebKit::WebPageProxy::mediaKeySystemPermissionRequestManager): (WebKit::WebPageProxy::requestMediaKeySystemPermissionByDefaultAction): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManager::MediaKeySystemPermissionRequestManager): (WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::sendMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasGranted): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasDenied): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: Added. * WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp: Added. (WebKit::WebMediaKeySystemClient::WebMediaKeySystemClient): (WebKit::WebMediaKeySystemClient::pageDestroyed): (WebKit::WebMediaKeySystemClient::requestMediaKeySystem): (WebKit::WebMediaKeySystemClient::cancelMediaKeySystemRequest): * WebProcess/WebCoreSupport/WebMediaKeySystemClient.h: Added. (WebKit::WebMediaKeySystemClient::~WebMediaKeySystemClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::mediaKeySystemWasGranted): (WebKit::WebPage::mediaKeySystemWasDenied): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::mediaKeySystemPermissionRequestManager): * WebProcess/WebPage/WebPage.messages.in: Tools: Add support for setting the permission request response from the TestRunner, for usage within layout tests. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsMediaKeySystemPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForMediaKeySystemPermissionRequest): (WTR::TestController::completeMediaKeySystemPermissionCheck): (WTR::TestController::setIsMediaKeySystemPermissionGranted): (WTR::TestController::createWebViewWithOptions): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Add basic coverage support for overriding the MediaKeySystem permission answer and thus have the promise rejection tested in this case. * media/encrypted-media/mock-MediaKeySystemAccess-expected.txt: * media/encrypted-media/mock-MediaKeySystemAccess.html: Canonical link: https://commits.webkit.org/233845@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-09 12:46:22 +00:00
UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp
UIProcess/MediaKeySystemPermissionRequestProxy.cpp
[Model] [iOS] Add support for displaying <model> in fullscreen https://bugs.webkit.org/show_bug.cgi?id=227443 <rdar://problem/79859937> Reviewed by Sam Weinig. Source/WebCore: Expose a new enterFullscreen() method on HTMLModelElement allowing to enter a fullscreen AR experience where the resource may be displayed in the user's environment. This differs from the existing Element.requestFullscreen() method since the experience is provided by the platform and we're not presenting the inline <model> element in a fullscreen window. From the WebProcess side, this requires obtaining a reference to the content layer for the <model> element and sending it in an IPC message to the UIProcess. * Modules/model-element/HTMLModelElement.cpp: (WebCore::HTMLModelElement::enterFullscreen): * Modules/model-element/HTMLModelElement.h: * Modules/model-element/HTMLModelElement.idl: * loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::takeModelElementFullscreen const): * loader/EmptyClients.h: * page/ChromeClient.h: (WebCore::ChromeClient::takeModelElementFullscreen const): * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::contentsLayerIDForModel const): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::contentsLayerIDForModel const): * platform/graphics/ca/GraphicsLayerCA.h: Source/WebCore/PAL: Declare additional ASVInlinePreview methods required for fullscreen support. * pal/spi/ios/SystemPreviewSPI.h: Source/WebKit: Displaying a model element in fullscreen requires making some calls on the ASVInlinePreview object created by a WKModelView. We send the content layer ID we receive through an IPC call from the WebProcess to the new ModelElementController. We then look at the remote layer tree for a node matching that ID and find its related UIView. If we find a WKModelView, as expected, we can carry on and call -[ASVInlinePreview createFullscreenInstanceWithInitialFrame:previewOptions:completionHandler:] to enter fullscreen using the presentingViewController provided by the UI client, and then observe when we exit fullscreen using -[ASVInlinePreview observeDismissFullscreenWithCompletionHandler:] to make sure the presenting view controller is removed. * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/ModelElementControllerCocoa.mm: Added. (WebKit::ModelElementController::takeModelElementFullscreen): * UIProcess/ModelElementController.cpp: Added. (WebKit::ModelElementController::ModelElementController): * UIProcess/ModelElementController.h: Added. (WebKit::ModelElementController::page): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::takeModelElementFullscreen): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::takeModelElementFullscreen const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::takeModelElementFullscreen): * WebProcess/WebPage/WebPage.h: Canonical link: https://commits.webkit.org/239281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-30 17:09:59 +00:00
UIProcess/ModelElementController.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/ResponsivenessTimer.cpp
Implement audio capture for SpeechRecognition on iOS https://bugs.webkit.org/show_bug.cgi?id=219371 <rdar://problem/71824049> Reviewed by Youenn Fablet. Source/WebCore: Add a way to set RealtimeMediaSource member of SpeechRecognitionCaptureSourceImpl. Test: fast/speechrecognition/ios/audio-capture.html * Headers.cmake: * Modules/speech/SpeechRecognitionCaptureSource.cpp: (WebCore::SpeechRecognitionCaptureSource::findCaptureDevice): (WebCore::SpeechRecognitionCaptureSource::createRealtimeMediaSource): (WebCore::SpeechRecognitionCaptureSource::SpeechRecognitionCaptureSource): * Modules/speech/SpeechRecognitionCaptureSource.h: * Modules/speech/SpeechRecognizer.cpp: (WebCore::SpeechRecognizer::reset): (WebCore::SpeechRecognizer::start): (WebCore::SpeechRecognizer::setSource): (WebCore::SpeechRecognizer::startInternal): Deleted. * Modules/speech/SpeechRecognizer.h: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: On iOS, audio capture is done in web process. For speech recognition, recognizer is in UI process. Therefore, UI process needs to ask web process to capture audio and send back data. To implement this, this patch added: - SpeechRecognitionRemoteRealtimeMediaSource: subclass WebCore::RealtimeMediaSource and connect to a remote WebCore::RealtimeMediaSource (owned by SpeechRecognitionRealtimeMediaSourceManager::Source) in web process. - SpeechRecognitionRemoteRealtimeMediaSourceManager: manage all RemoteRealtimeMediaSources. - SpeechRecognitionRealtimeMediaSourceManager: manage all SpeechRecognitionRemoteRealtimeMediaSource. - SpeechRecognitionRealtimeMediaSourceManager::Source: own and monitor a local WebCore::RealtimeMediaSource. This structure is very similar to how we implement media capture on macOS (RemoteRealtimeMediaSource, UserMediaCaptureManager and UserMediaCaptureManagerProxy), where we send data from UI process to web process instead. We should unify the architecture if possible. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::create): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::SpeechRecognitionRemoteRealtimeMediaSource): (WebKit::m_ringBuffer): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::~SpeechRecognitionRemoteRealtimeMediaSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::startProducingData): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::stopProducingData): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::setStorage): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteAudioSamplesAvailable): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteCaptureFailed): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteSourceStopped): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::identifier const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::SpeechRecognitionRemoteRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::addSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::removeSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteAudioSamplesAvailable): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteCaptureFailed): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteSourceStopped): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::messageSenderConnection const): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::messageSenderDestinationID const): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::setStorage): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.h: Added. * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.messages.in: Added. * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::handleRequest): * UIProcess/SpeechRecognitionServer.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createRealtimeMediaSourceForSpeechRecognition): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): (WebKit::WebProcessProxy::ensureSpeechRecognitionRemoteRealtimeMediaSourceManager): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: Added. (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::Source): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::~Source): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::start): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::stop): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::storage): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::SpeechRecognitionRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::~SpeechRecognitionRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::grantSandboxExtensions): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::revokeSandboxExtensions): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::createSource): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::deleteSource): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::start): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::stop): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::messageSenderConnection const): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::messageSenderDestinationID const): * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.h: Added. * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.messages.in: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: (WebKit::WebSpeechRecognitionConnection::WebSpeechRecognitionConnection): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureSpeechRecognitionRealtimeMediaSourceManager): * WebProcess/WebProcess.h: LayoutTests: * TestExpectations: * fast/speechrecognition/ios/audio-capture-expected.txt: Added. * fast/speechrecognition/ios/audio-capture.html: Added. * platform/ios-wk2/TestExpectations: Canonical link: https://commits.webkit.org/232245@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 08:28:16 +00:00
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp
Set up basic infrastructure for SpeechRecognition https://bugs.webkit.org/show_bug.cgi?id=218216 <rdar://problem/70703788> Reviewed by Youenn Fablet. Source/WebCore: Introduce SpeechRecognitionConnectionClient, SpeechRecognitionConnection and SpeechRecognitionServer. SpeechRecognition is a SpeechRecognitionConnectionClient that can send SpeechRecognitionRequest to SpeechRecognitionServer via SpeechRecognitionConnection. Currently we have one SpeechRecogntionConnection and one SpeechRecogntionServer per page. SpeechRecognitionServer will be responsible for handling SpeechRecognitionRequests, including audio capturing and hosting speech recognition engine, and that implementation is not included in this patch. Our current plan is put SpeechRecognitionServer in UI process (or GPU process when media code is all moved) and keep SpeechRecognitionConnectionClient in web process. Test: fast/speechrecognition/start-recognition-twice-exception.html * Headers.cmake: * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::create): (WebCore::SpeechRecognition::SpeechRecognition): (WebCore::SpeechRecognition::startRecognition): (WebCore::SpeechRecognition::stopRecognition): (WebCore::SpeechRecognition::abortRecognition): (WebCore::SpeechRecognition::didStart): (WebCore::SpeechRecognition::didStartCapturingAudio): (WebCore::SpeechRecognition::didStartCapturingSound): (WebCore::SpeechRecognition::didStartCapturingSpeech): (WebCore::SpeechRecognition::didStopCapturingSpeech): (WebCore::SpeechRecognition::didStopCapturingSound): (WebCore::SpeechRecognition::didStopCapturingAudio): (WebCore::SpeechRecognition::didFindNoMatch): (WebCore::SpeechRecognition::didReceiveResult): (WebCore::SpeechRecognition::didError): (WebCore::SpeechRecognition::didEnd): * Modules/speech/SpeechRecognition.h: * Modules/speech/SpeechRecognitionConnection.h: Added. (WebCore::SpeechRecognitionConnection::~SpeechRecognitionConnection): * Modules/speech/SpeechRecognitionConnectionClient.h: Added. (WebCore::SpeechRecognitionConnectionClient::SpeechRecognitionConnectionClient): (WebCore::SpeechRecognitionConnectionClient::identifier const): * Modules/speech/SpeechRecognitionConnectionClientIdentifier.h: Added. * Modules/speech/SpeechRecognitionError.h: Added. (WebCore::SpeechRecognitionError::encode const): (WebCore::SpeechRecognitionError::decode): * Modules/speech/SpeechRecognitionErrorCode.h: * Modules/speech/SpeechRecognitionRequest.cpp: Added. (WebCore::SpeechRecognitionRequest::create): (WebCore::SpeechRecognitionRequest::SpeechRecognitionRequest): * Modules/speech/SpeechRecognitionRequest.h: Added. (WebCore::SpeechRecognitionRequest::clientIdentifier const): (WebCore::SpeechRecognitionRequest::lang const): (WebCore::SpeechRecognitionRequest::continuous const): (WebCore::SpeechRecognitionRequest::interimResults const): (WebCore::SpeechRecognitionRequest::maxAlternatives const): * Modules/speech/SpeechRecognitionRequestInfo.h: Added. (WebCore::SpeechRecognitionRequestInfo::encode const): (WebCore::SpeechRecognitionRequestInfo::decode): * Modules/speech/SpeechRecognitionResultData.h: Added. (WebCore::SpeechRecognitionAlternativeData::encode const): (WebCore::SpeechRecognitionAlternativeData::decode): (WebCore::SpeechRecognitionResultData::encode const): (WebCore::SpeechRecognitionResultData::decode): * Modules/speech/SpeechRecognitionResultList.h: * Modules/speech/SpeechRecognitionUpdate.cpp: Added. (WebCore::convertEnumerationToString): (WebCore::SpeechRecognitionUpdate::create): (WebCore::SpeechRecognitionUpdate::createError): (WebCore::SpeechRecognitionUpdate::createResult): (WebCore::SpeechRecognitionUpdate::SpeechRecognitionUpdate): (WebCore::SpeechRecognitionUpdate::error const): (WebCore::SpeechRecognitionUpdate::result const): * Modules/speech/SpeechRecognitionUpdate.h: Added. (WebCore::SpeechRecognitionUpdate::clientIdentifier const): (WebCore::SpeechRecognitionUpdate::type const): (WebCore::SpeechRecognitionUpdate::encode const): (WebCore::SpeechRecognitionUpdate::decode): (WTF::LogArgument<WebCore::SpeechRecognitionUpdateType>::toString): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/TaskSource.h: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::speechRecognitionConnection): * page/Page.h: * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: * page/DummySpeechRecognitionProvider.h: Added. * page/SpeechRecognitionProvider.h: Added. Source/WebKit: * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Scripts/webkit/messages.py: * Sources.txt: * UIProcess/SpeechRecognitionServer.cpp: Added. (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::processNextPendingRequestIfNeeded): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::removePendingRequest): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::startPocessingRequest): (WebKit::SpeechRecognitionServer::stopProcessingRequest): (WebKit::SpeechRecognitionServer::messageSenderConnection const): (WebKit::SpeechRecognitionServer::messageSenderDestinationID const): * UIProcess/SpeechRecognitionServer.h: Added. * UIProcess/SpeechRecognitionServer.messages.in: Added. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): (WebKit::WebProcessProxy::destroySpeechRecognitionServer): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: Added. (WebKit::WebSpeechRecognitionConnection::create): (WebKit::WebSpeechRecognitionConnection::WebSpeechRecognitionConnection): (WebKit::WebSpeechRecognitionConnection::~WebSpeechRecognitionConnection): (WebKit::WebSpeechRecognitionConnection::registerClient): (WebKit::WebSpeechRecognitionConnection::start): (WebKit::WebSpeechRecognitionConnection::stop): (WebKit::WebSpeechRecognitionConnection::abort): (WebKit::WebSpeechRecognitionConnection::invalidate): (WebKit::WebSpeechRecognitionConnection::didReceiveUpdate): (WebKit::WebSpeechRecognitionConnection::messageSenderConnection const): (WebKit::WebSpeechRecognitionConnection::messageSenderDestinationID const): * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.messages.in: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionProvider.h: Added. * WebProcess/WebPage/IPCTestingAPI.cpp: (WebKit::IPCTestingAPI::encodeArgument): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Source/WebKitLegacy/win: * Interfaces/IWebPreferencesPrivate.idl: * WebPreferenceKeysPrivate.h: * WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): (WebPreferences::speechRecognitionEnabled): (WebPreferences::setSpeechRecognitionEnabled): * WebPreferences.h: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Tools: * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): LayoutTests: * fast/speechrecognition/start-recognition-twice-exception-expected.txt: Added. * fast/speechrecognition/start-recognition-twice-exception.html: Added. Canonical link: https://commits.webkit.org/231192@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-04 01:44:02 +00:00
UIProcess/SpeechRecognitionServer.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/SuspendedPageProxy.cpp
UIProcess/SystemPreviewController.cpp
Implement basic permission check for SpeechRecognition https://bugs.webkit.org/show_bug.cgi?id=218476 <rdar://problem/71222638> Reviewed by Youenn Fablet. Source/WebCore: Tests: fast/speechrecognition/permission-error.html fast/speechrecognition/start-recognition-in-removed-iframe.html * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::startRecognition): * Modules/speech/SpeechRecognitionConnection.h: * Modules/speech/SpeechRecognitionRequest.cpp: (WebCore::SpeechRecognitionRequest::create): Deleted. * Modules/speech/SpeechRecognitionRequest.h: (WebCore::SpeechRecognitionRequest::clientOrigin const): * Modules/speech/SpeechRecognitionRequestInfo.h: (WebCore::SpeechRecognitionRequestInfo::encode const): (WebCore::SpeechRecognitionRequestInfo::decode): * Modules/speech/SpeechRecognitionUpdate.cpp: (WebCore::SpeechRecognitionUpdate::create): (WebCore::SpeechRecognitionUpdate::error const): (WebCore::SpeechRecognitionUpdate::result const): * Modules/speech/SpeechRecognitionUpdate.h: * page/DummySpeechRecognitionProvider.h: Source/WebKit: Introduce SpeechRecognitionPermissionManager, which checks and requests speech recognition permissions before we actually start capturing audio and perform recognition. SpeechRecognitionPermissionManager is per-page, like SpeechRecognitionServer. The checks include: 1. Sandbox requirement for microphone 2. TCC check for microphone 3. TCC check for SFSpeechRecognizer 4. User permission on speech recognition for origin Add a delegate function for requesting user permission. By default, user permission is not granted. API test: WebKit2.SpeechRecognitionUserPermissionPersistence * Headers.cmake: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForSpeechRecognitionPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/API/C/WKSpeechRecognitionPermissionCallback.cpp: Added. (WKSpeechRecognitionPermissionCallbackGetTypeID): (WKSpeechRecognitionPermissionCallbackComplete): * UIProcess/API/C/WKSpeechRecognitionPermissionCallback.h: Added. * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _speechRecognitionEnabled]): (-[WKPreferences _setSpeechRecognitionEnabled:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/Cocoa/MediaPermissionUtilities.mm: Added. (WebKit::checkSandboxRequirementForType): (WebKit::checkUsageDescriptionStringForType): (WebKit::checkUsageDescriptionStringForSpeechRecognition): (WebKit::requestAVCaptureAccessForType): (WebKit::checkAVCaptureAccessForType): (WebKit::requestSpeechRecognitionAccess): (WebKit::checkSpeechRecognitionServiceAccess): * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::decidePolicyForSpeechRecognitionPermissionRequest): * UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): (WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation): (WebKit::requestAVCaptureAccessForMediaType): Deleted. * UIProcess/Cocoa/WebProcessProxyCocoa.mm: * UIProcess/MediaPermissionUtilities.h: Copied from Added. * UIProcess/SpeechRecognitionPermissionManager.cpp: Added. (WebKit::computeMicrophoneAccess): (WebKit::computeSpeechRecognitionServiceAccess): (WebKit::SpeechRecognitionPermissionManager::SpeechRecognitionPermissionManager): (WebKit::SpeechRecognitionPermissionManager::~SpeechRecognitionPermissionManager): (WebKit::SpeechRecognitionPermissionManager::request): (WebKit::SpeechRecognitionPermissionManager::startNextRequest): (WebKit::SpeechRecognitionPermissionManager::startProcessingRequest): (WebKit::SpeechRecognitionPermissionManager::continueProcessingRequest): (WebKit::SpeechRecognitionPermissionManager::completeCurrentRequest): (WebKit::SpeechRecognitionPermissionManager::requestSpeechRecognitionServiceAccess): (WebKit::SpeechRecognitionPermissionManager::requestMicrophoneAccess): (WebKit::SpeechRecognitionPermissionManager::requestUserPermission): * UIProcess/SpeechRecognitionPermissionManager.h: Added. * UIProcess/SpeechRecognitionPermissionRequest.h: Added. (WebKit::SpeechRecognitionPermissionRequest::create): (WebKit::SpeechRecognitionPermissionRequest::complete): (WebKit::SpeechRecognitionPermissionRequest::origin const): (WebKit::SpeechRecognitionPermissionRequest::SpeechRecognitionPermissionRequest): (WebKit::SpeechRecognitionPermissionCallback::create): (WebKit::SpeechRecognitionPermissionCallback::complete): (WebKit::SpeechRecognitionPermissionCallback::SpeechRecognitionPermissionCallback): * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::requestPermissionForRequest): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::handleRequest): (WebKit::SpeechRecognitionServer::stopRequest): (WebKit::SpeechRecognitionServer::abortRequest): (WebKit::SpeechRecognitionServer::sendUpdate): (WebKit::SpeechRecognitionServer::processNextPendingRequestIfNeeded): Deleted. (WebKit::SpeechRecognitionServer::removePendingRequest): Deleted. (WebKit::SpeechRecognitionServer::startPocessingRequest): Deleted. (WebKit::SpeechRecognitionServer::stopProcessingRequest): Deleted. * UIProcess/SpeechRecognitionServer.h: * UIProcess/SpeechRecognitionServer.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChangeMainDocument): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::requestSpeechRecognitionPermission): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: (WebKit::WebSpeechRecognitionConnection::start): (WebKit::WebSpeechRecognitionConnection::didReceiveUpdate): * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h: Source/WTF: * wtf/PlatformHave.h: Tools: * MiniBrowser/mac/Info.plist: * MobileMiniBrowser/MobileMiniBrowser/Info.plist: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm: Added. (-[SpeechRecognitionPermissionUIDelegate _webView:requestSpeechRecognitionPermissionForOrigin:decisionHandler:]): (-[SpeechRecognitionMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/speechrecognition-user-permission-persistence.html: Added. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsSpeechRecognitionPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForSpeechRecognitionPermissionRequest): (WTR::TestController::completeSpeechRecognitionPermissionCheck): (WTR::TestController::setIsSpeechRecognitionPermissionGranted): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: * TestExpectations: * fast/speechrecognition/permission-error-expected.txt: Added. * fast/speechrecognition/permission-error.html: Added. * fast/speechrecognition/resources/removed-iframe.html: Added. * fast/speechrecognition/start-recognition-in-removed-iframe-expected.txt: Added. * fast/speechrecognition/start-recognition-in-removed-iframe.html: Added. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/231575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-14 02:16:49 +00:00
UIProcess/SpeechRecognitionPermissionManager.cpp
UIProcess/TextChecker.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Move SuspendedPage logic from WebProcessPool to new WebBackForwardCache class https://bugs.webkit.org/show_bug.cgi?id=202660 Reviewed by Antti Koivisto. Source/WebKit: Move SuspendedPage logic from WebProcessPool to new WebBackForwardCache class. This is a first step towards implementing back / forward cache handling in the UIProcess. The following changes were made: 1. SuspendedPageProxy objects are now normally owned by their associated WebBackForwardListItem (Similarly to CachedPage objects being owned by their HistoryItem in WebCore) instead of the WebProcessPool. 2. A new WebBackForwardCache class is introduced to cap the number of cached pages and clear them (similary to the PageCache in WebCore). * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::~WebBackForwardListItem): (WebKit::WebBackForwardListItem::wasRemovedFromBackForwardList): (WebKit::WebBackForwardListItem::setSuspendedPage): (WebKit::WebBackForwardListItem::takeSuspendedPage): (WebKit::WebBackForwardListItem::suspendedPage const): * Shared/WebBackForwardListItem.h: * Sources.txt: * UIProcess/API/Cocoa/WKProcessPool.mm: (-[WKProcessPool _maximumSuspendedPageCount]): * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp: * UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::findReusableSuspendedPageProcess): (WebKit::SuspendedPageProxy::SuspendedPageProxy): (WebKit::SuspendedPageProxy::~SuspendedPageProxy): (WebKit::SuspendedPageProxy::setBackForwardListItem): (WebKit::SuspendedPageProxy::clearBackForwardListItem): (WebKit::SuspendedPageProxy::backForwardCache const): (WebKit::SuspendedPageProxy::suspensionTimedOut): * UIProcess/SuspendedPageProxy.h: * UIProcess/WebAuthentication/Mock/MockHidConnection.h: * UIProcess/WebAuthentication/Mock/MockHidService.h: * UIProcess/WebBackForwardCache.cpp: Added. (WebKit::WebBackForwardCache::removeOldestEntry): (WebKit::WebBackForwardCache::setCapacity): (WebKit::WebBackForwardCache::addEntry): (WebKit::WebBackForwardCache::removeEntry): (WebKit::WebBackForwardCache::takeEntry): (WebKit::WebBackForwardCache::removeEntriesForProcess): (WebKit::WebBackForwardCache::removeEntriesForPage): (WebKit::WebBackForwardCache::removeEntriesMatching): (WebKit::WebBackForwardCache::clear): * UIProcess/WebBackForwardCache.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidService.h. (WebKit::WebBackForwardCache::capacity const): (WebKit::WebBackForwardCache::size const): * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::didRemoveItem): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::suspendCurrentPageIfPossible): (WebKit::WebPageProxy::backForwardCache const): (WebKit::WebPageProxy::shouldUseBackForwardCache const): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::receivedNavigationPolicyDecision): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::enterAcceleratedCompositingMode): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::process const): * UIProcess/WebProcessPool.cpp: (WebKit::m_webProcessCache): (WebKit::WebProcessPool::disconnectProcess): (WebKit::WebProcessPool::processForRegistrableDomain): (WebKit::WebProcessPool::handleMemoryPressureWarning): (WebKit::WebProcessPool::updateBackForwardCacheCapacity): (WebKit::WebProcessPool::setCacheModel): * UIProcess/WebProcessPool.h: * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::setMockWebAuthenticationConfiguration): * WebKit.xcodeproj/project.pbxproj: Tools: Drop test that relied on reusing a SuspendedPage's process from a loadHTMLStringLoad (optimization). This no longer works now that SuspendedPages are owned by their associated back/forward item because we currently do not create a back/forward item for loadHTMLString requests. Suspending a page for a loadHTMLString was also wasteful since there was no way to restore that page (given that there was no WebBackForwardListItem to go back to). * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Canonical link: https://commits.webkit.org/216312@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-11 20:40:48 +00:00
UIProcess/WebBackForwardCache.cpp
UIProcess/WebBackForwardCacheEntry.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[GTK] Datalist element support for TextFieldInputType https://bugs.webkit.org/show_bug.cgi?id=98934 Reviewed by Michael Catanzaro. .: Enable DATALIST_ELEMENT. * Source/cmake/OptionsGTK.cmake: Source/WebCore: Add support for rendering the arrow indicator of text fields having data list. * rendering/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintTextField): (WebCore::RenderThemeGtk::adjustListButtonStyle const): (WebCore::RenderThemeGtk::paintListButtonForInput): (WebCore::RenderThemeGtk::adjustSearchFieldStyle const): * rendering/RenderThemeGtk.h: Source/WebKit: Add a WebDataListSuggestionsDropdown implementation for the GTK port using a popup window with a tree view list. * Sources.txt: * SourcesGTK.txt: * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDataListSuggestionsDropdown): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Added. (WebKit::firstTimeItemSelectedCallback): (WebKit::WebDataListSuggestionsDropdownGtk::WebDataListSuggestionsDropdownGtk): (WebKit::WebDataListSuggestionsDropdownGtk::~WebDataListSuggestionsDropdownGtk): (WebKit::WebDataListSuggestionsDropdownGtk::treeViewRowActivatedCallback): (WebKit::WebDataListSuggestionsDropdownGtk::didSelectOption): (WebKit::WebDataListSuggestionsDropdownGtk::show): (WebKit::WebDataListSuggestionsDropdownGtk::handleKeydownWithIdentifier): (WebKit::WebDataListSuggestionsDropdownGtk::close): * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: Copied from Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h. Tools: Implement UIScriptControllerGtk::isShowingDataListSuggestions. * WebKitTestRunner/gtk/UIScriptControllerGtk.cpp: (WTR::UIScriptControllerGtk::isShowingDataListSuggestions const): * WebKitTestRunner/gtk/UIScriptControllerGtk.h: LayoutTests: Unskip datalist tests for GTK port. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/214080@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/WebProcessPool.cpp
UIProcess/WebProcessProxy.cpp
UIProcess/WebURLSchemeHandler.cpp
UIProcess/WebURLSchemeTask.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/APIAttachment.cpp
UIProcess/API/APIContentRuleList.cpp
Add SPI to inform applications of WKContentRuleList actions https://bugs.webkit.org/show_bug.cgi?id=195965 <rdar://problem/42664365> Reviewed by Geoff Garen. Source/WebCore: We already had SPI to inform the application of notifications. In order to inform it about other actions, I needed to put them in a different structure. Basically, instead of a Vector<Action> I use a Vector<Vector<Action>> that contains the same actions. That way we can give one callback per WKContentRuleList. * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::connect): * WebCore.xcodeproj/project.pbxproj: * contentextensions/ContentExtensionActions.h: * contentextensions/ContentExtensionParser.cpp: (WebCore::ContentExtensions::loadEncodedRules): * contentextensions/ContentExtensionRule.cpp: (WebCore::ContentExtensions::Action::isolatedCopy const): * contentextensions/ContentExtensionRule.h: (WebCore::ContentExtensions::Action::operator== const): (WebCore::ContentExtensions::Action::setExtensionIdentifier): Deleted. (WebCore::ContentExtensions::Action::extensionIdentifier const): Deleted. * contentextensions/ContentExtensionsBackend.cpp: (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const): (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad): (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad): (WebCore::ContentExtensions::applyResultsToRequest): (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad): Deleted. (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad): Deleted. (WebCore::ContentExtensions::applyBlockedStatusToRequest): Deleted. * contentextensions/ContentExtensionsBackend.h: * contentextensions/ContentRuleListResults.h: Added. (WebCore::ContentRuleListResults::Result::shouldNotifyApplication const): (WebCore::ContentRuleListResults::shouldNotifyApplication const): (WebCore::ContentRuleListResults::encode const): (WebCore::ContentRuleListResults::decode): (WebCore::ContentRuleListResults::Result::encode const): (WebCore::ContentRuleListResults::Result::decode): (WebCore::ContentRuleListResults::Summary::encode const): (WebCore::ContentRuleListResults::Summary::decode): * css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::subresourcesAllowReuse const): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): * loader/PingLoader.cpp: (WebCore::processContentRuleListsForLoad): (WebCore::PingLoader::loadImage): (WebCore::PingLoader::sendPing): (WebCore::PingLoader::sendViolationReport): (WebCore::processContentExtensionRulesForLoad): Deleted. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequestInternal): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestResource): * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::applyResults): (WebCore::CachedResourceRequest::applyBlockedStatus): Deleted. * loader/cache/CachedResourceRequest.h: * page/ChromeClient.h: (WebCore::ChromeClient::contentRuleListNotification): * page/DOMWindow.cpp: (WebCore::DOMWindow::open): * page/UserContentProvider.cpp: (WebCore::UserContentProvider::processContentRuleListsForLoad): (WebCore::UserContentProvider::actionsForResourceLoad): (WebCore::UserContentProvider::processContentExtensionRulesForLoad): Deleted. * page/UserContentProvider.h: Source/WebKit: * NetworkProcess/NetworkLoadChecker.cpp: (WebKit::NetworkLoadChecker::checkRequest): (WebKit::NetworkLoadChecker::processContentRuleListsForLoad): (WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad): Deleted. * NetworkProcess/NetworkLoadChecker.h: * UIProcess/API/APINavigationClient.h: (API::NavigationClient::contentRuleListNotification): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageNavigationClient): * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: * UIProcess/Cocoa/NavigationState.h: * UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::setNavigationDelegate): (WebKit::NavigationState::NavigationClient::contentRuleListNotification): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contentRuleListNotification): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentRuleListNotification): * WebProcess/WebCoreSupport/WebChromeClient.h: Tools: * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::allActionsForResourceLoad): (TestWebKitAPI::testRequest): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (Notification::description): (Notification::operator== const): (toVector): (-[ContentRuleListNotificationDelegate _webView:URL:contentRuleListIdentifiers:notifications:]): (-[ContentRuleListNotificationDelegate _webView:contentRuleListWithIdentifier:performedActionOnURL:blockedLoad:blockedCookies:madeHTTPS:notifications:]): (makeContentRuleList): (TEST): (makeWarnContentRuleList): Deleted. LayoutTests: * http/tests/contentextensions/popups-expected.txt: Because popups now use UserContentProvider.processContentRuleListsForLoad like everything else, it now prints messages to the debug console. That is a desired improvement, so expectations are updated accordingly. Canonical link: https://commits.webkit.org/210383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-21 20:23:46 +00:00
UIProcess/API/APIContentRuleListAction.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/APIContentRuleListStore.cpp
Add WKContentWorld SPI, and use it in JavaScript execution. https://bugs.webkit.org/show_bug.cgi?id=206310 Reviewed by Alex Christensen. Source/WebKit: Covered by API tests. _WKContentWorld is a UI Process wrapper for an InjectedBundleScriptWorld. Much like _WKUserContentWorld is. But different in that: - Its APIs are named different things - Only one unique instance per string name - It is used with evaluateJavascript: and callAsyncJavaScriptFunction: instead of WKUserContentController. But _WKContentWorld and _WKUserContentWorld do have to work together a little bit to avoid conflicts in the WebProcess. The new versions of evaluateJavascript: and callAsyncJavaScriptFunction: are also included, as well as API tests for all the new stuff. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * UIProcess/API/APIContentWorld.cpp: Copied from Source/WebKit/UIProcess/API/APIUserContentWorld.cpp. (API::ContentWorld::sharedWorldWithName): (API::ContentWorld::pageContentWorld): (API::ContentWorld::defaultClientWorld): (API::ContentWorld::ContentWorld): (API::ContentWorld::~ContentWorld): * UIProcess/API/APIContentWorld.h: Copied from Source/WebKit/UIProcess/API/APIUserContentWorld.h. * UIProcess/API/APIUserContentWorld.cpp: (API::UserContentWorld::generateIdentifier): (API::UserContentWorld::UserContentWorld): (API::generateIdentifier): Deleted. * UIProcess/API/APIUserContentWorld.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView evaluateJavaScript:completionHandler:]): (-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:inWorld:]): (-[WKWebView _callAsyncJavaScriptFunction:withArguments:inWorld:completionHandler:]): (-[WKWebView _evaluateJavaScript:inWorld:completionHandler:]): (-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]): (-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:]): Deleted. (-[WKWebView _callAsyncFunction:withArguments:completionHandler:]): Deleted. * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/_WKContentWorld.h: Added. * UIProcess/API/Cocoa/_WKContentWorld.mm: Copied from Source/WebKit/UIProcess/API/APIUserContentWorld.h. (+[_WKContentWorld pageContentWorld]): (+[_WKContentWorld defaultClientWorld]): (+[_WKContentWorld worldWithName:]): (-[_WKContentWorld dealloc]): (-[_WKContentWorld name]): (-[_WKContentWorld _apiObject]): * UIProcess/API/Cocoa/_WKContentWorldInternal.h: Copied from Source/WebKit/UIProcess/API/APIUserContentWorld.h. * UIProcess/UserContent/WebUserContentControllerProxy.cpp: * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runJavaScriptInMainFrame): (WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld): * UIProcess/WebPageProxy.h: * WebProcess/UserContent/WebUserContentController.cpp: (WebKit::worldMap): (WebKit::WebUserContentController::worldForIdentifier): (WebKit::WebUserContentController::addUserContentWorld): (WebKit::WebUserContentController::addUserContentWorlds): * WebProcess/UserContent/WebUserContentController.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScript): (WebKit::WebPage::runJavaScriptInMainFrameScriptWorld): (WebKit::WebPage::runJavaScriptInFrame): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Tools: Update previous callAsyncFunction calls with the new signature. Add tests for new _WKContentWorld class and its behavior with regard to executing JavaScript. * TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm: (TestWebKitAPI::tryGCPromise): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm: (TEST): * TestWebKitAPI/cocoa/TestWKWebView.mm: (-[WKWebView objectByCallingAsyncFunction:withArguments:error:]): Canonical link: https://commits.webkit.org/219418@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-16 05:41:03 +00:00
UIProcess/API/APIContentWorld.cpp
Introduce new SPI for context menus on iOS https://bugs.webkit.org/show_bug.cgi?id=198590 Reviewed by Tim Horton. Also introduce WKContextMenuElementInfo which is API. This is part of <rdar://problem/51003503> * Shared/API/APIObject.h: * Shared/API/Cocoa/WebKit.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContextMenuElementInfo.cpp: Added. (API::ContextMenuElementInfo::ContextMenuElementInfo): * UIProcess/API/APIContextMenuElementInfo.h: Added. * UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added. * UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added. (-[WKContextMenuElementInfo linkURL]): (-[WKContextMenuElementInfo _apiObject]): (-[WKContextMenuElementInfo _activatedElementInfo]): * UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added. * UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added. * UIProcess/API/Cocoa/WKPreviewElementInfo.h: * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/Cocoa/_WKActivatedElementInfo.h: * UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]): (-[_WKActivatedElementInfo isAnimatedImage]): * UIProcess/ios/WKActionSheetAssistant.h: * UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]): * UIProcess/ios/WKContentView.h: * UIProcess/ios/WKContentViewInteraction.mm: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/212668@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-07 23:59:22 +00:00
UIProcess/API/APIContextMenuElementInfo.cpp
Web Inspector: add InspectedTargetTypes diagnostic event and related hooks https://bugs.webkit.org/show_bug.cgi?id=205174 <rdar://problem/57887953> Reviewed by Devin Rousso. Source/WebCore: Expose debuggable information via InspectorFrontendHost. * WebCore.xcodeproj/project.pbxproj: Add new files. * inspector/InspectorFrontendClient.h: Add new methods. * testing/Internals.cpp: Implement new methods. * inspector/InspectorFrontendHost.idl: * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.cpp: (WebCore::debuggableTypeToString): (WebCore::InspectorFrontendHost::debuggableInfo const): (WebCore::InspectorFrontendHost::debuggableType): Deleted. Expose a `DebuggableInfo` dictionary via the .debuggableInfo getter. Source/WebInspectorUI: This change adds a new diagnostic recorder that reports information about inspected targets and their type / version information. * UserInterface/Base/DebuggableType.js: (WI.DebuggableType.fromString): Move the static parsing factory method to DebuggableType class. * UserInterface/Main.html: Add new files. * UserInterface/Base/Main.js: (WI.contentLoaded): Add new diagnostic recorder. * UserInterface/Protocol/InspectorBackend.js: (InspectorBackendClass.prototype.activateDomain): Adapt to InspectorFrontendHost changes. * UserInterface/Test/TestAppController.js: (WI.TestAppController): * UserInterface/Controllers/AppController.js: (WI.AppController): Adapt to InspectorFrontendHost changes. Source/WebKit: This change supplies Web Inspector with information about the debuggable that it is connected to. This is used for diagnostics and to customize the UI based on the target type being inspected. For remote Web Inspector, WebKit clients can populate an instance of _WKInspectorDebuggableInfo and use it when calling into -[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:]. For local Web Inspector, WebInspectorProxy fills in information for the local debuggable by consulting SystemVersion.plist (on Mac port). The new enum _WKInspectorDebuggableType replaces _WKRemoteWebInspectorDebuggableType. Its WebCore equivalent is Inspector::DebuggableType. The type and other information are carried around in a _WKInspectorDebuggableInfo class. The equivalents for this class are API::DebuggableInfo and DebuggableInfoData (for sending over IPC). The DebuggableInfoData is sent as part of the initial message from UIProcess to an Inspector WebProcess, similar to how a debuggableType string was sent before. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Add new files. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Add new object type. * Shared/WebCoreArgumentCoders.h: Add EnumTraits for Inspector::DebuggableType. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (legacyDebuggableTypeToModernDebuggableType): (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): (-[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:]): (debuggableTypeString): Deleted. Use the new enum in a new method that clients can switch over to. The old method can be removed when it is no longer being used. * UIProcess/RemoteWebInspectorProxy.h: * UIProcess/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::RemoteWebInspectorProxy): (WebKit::RemoteWebInspectorProxy::load): (WebKit::RemoteWebInspectorProxy::reopen): Send DebuggableInfoData struct to RemoteWebInspectorUI. * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::openLocalInspectorFrontend): (WebKit::WebInspectorProxy::infoForLocalDebuggable): Send DebuggableInfoData struct to WebInspectorUI. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::systemVersionPlist): (WebKit::WebInspectorProxy::infoForLocalDebuggable): Add Mac implementation for local debuggables. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): * UIProcess/wpe/WebInspectorProxyWPE.cpp: (WebKit::WebInspectorProxy::infoForLocalDebuggable): Add stubs for other platforms. * UIProcess/glib/RemoteInspectorClient.cpp: * UIProcess/socket/RemoteInspectorClient.h: * UIProcess/socket/RemoteInspectorClient.cpp: (WebKit::RemoteInspectorClient::inspect): (WebKit::debuggableTypeToString): (WebKit::RemoteInspectorClient::setTargetList): Use Inspector::DebuggableType instead of String for debuggable type. * WebProcess/WebPage/RemoteWebInspectorUI.messages.in: * WebProcess/WebPage/RemoteWebInspectorUI.h: * WebProcess/WebPage/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::initialize): (WebKit::RemoteWebInspectorUI::debuggableType const): (WebKit::RemoteWebInspectorUI::targetPlatformName const): (WebKit::RemoteWebInspectorUI::targetBuildVersion const): (WebKit::RemoteWebInspectorUI::targetProductVersion const): (WebKit::RemoteWebInspectorUI::targetIsSimulator const): Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost. * WebProcess/WebPage/WebInspectorUI.messages.in: * WebProcess/WebPage/WebInspectorUI.h: * WebProcess/WebPage/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): (WebKit::WebInspectorUI::targetPlatformName const): (WebKit::WebInspectorUI::targetBuildVersion const): (WebKit::WebInspectorUI::targetProductVersion const): Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost. Source/WebKitLegacy/win: * WebCoreSupport/WebInspectorClient.h: Canonical link: https://commits.webkit.org/218748@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-22 04:19:53 +00:00
UIProcess/API/APIDebuggableInfo.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/APIExperimentalFeature.cpp
UIProcess/API/APIFrameInfo.cpp
WKWebView's frames accessor should return a traversable type https://bugs.webkit.org/show_bug.cgi?id=208591 Reviewed by Brady Eidson. Source/WebKit: Rather than return an array of information that can technically be used to reconstruct a tree, let's just return the root of a tree. This introduces _WKFrameTreeNode which inherits from WKFrameInfo. Covered by API tests. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Shared/FrameInfoData.cpp: (WebKit::FrameInfoData::encode const): (WebKit::FrameInfoData::decode): * Shared/FrameInfoData.h: * Shared/FrameTreeNodeData.h: Added. (WebKit::FrameTreeNodeData::encode const): (WebKit::FrameTreeNodeData::decode): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIFrameInfo.cpp: (API::FrameInfo::parentFrameHandle const): Deleted. (API::FrameInfo::childFrameHandles const): Deleted. * UIProcess/API/APIFrameInfo.h: * UIProcess/API/APIFrameTreeNode.cpp: Added. (API::FrameTreeNode::handle const): * UIProcess/API/APIFrameTreeNode.h: Added. * UIProcess/API/Cocoa/WKFrameInfo.mm: (-[WKFrameInfo _parentFrameHandle]): Deleted. (-[WKFrameInfo _childFrameHandles]): Deleted. * UIProcess/API/Cocoa/WKFrameInfoPrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _frames:]): (-[WKWebView _allFrames:]): Deleted. * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/_WKFrameTreeNode.h: Added. * UIProcess/API/Cocoa/_WKFrameTreeNode.mm: Added. (-[_WKFrameTreeNode dealloc]): (-[_WKFrameTreeNode isMainFrame]): (-[_WKFrameTreeNode request]): (-[_WKFrameTreeNode securityOrigin]): (-[_WKFrameTreeNode webView]): (-[_WKFrameTreeNode childFrames]): (-[_WKFrameTreeNode copyWithZone:]): (-[_WKFrameTreeNode _handle]): (-[_WKFrameTreeNode _apiObject]): * UIProcess/API/Cocoa/_WKFrameTreeNodeInternal.h: Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getAllFrames): * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::info const): (WebKit::WebFrame::childFrameIDs const): Deleted. * WebProcess/WebPage/WebFrame.h: (WebKit::WebFrame::frameID const): * WebProcess/WebPage/WebPage.cpp: (WebKit::frameTreeNodeData): (WebKit::WebPage::getAllFrames): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Tools: * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: Canonical link: https://commits.webkit.org/221511@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-04 20:35:46 +00:00
UIProcess/API/APIFrameTreeNode.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/APIHTTPCookieStore.cpp
UIProcess/API/APIHitTestResult.cpp
[Cocoa] Introduce _WKInspectorConfiguration for customizing local and remote Web Inspectors https://bugs.webkit.org/show_bug.cgi?id=217896 <rdar://problem/70355910> Reviewed by Devin Rousso. Source/WebKit: Introduce _WKInspectorConfiguration for customizing the behavior of Web Inspector instances. The initial customization is to allow for custom WKURLSchemeHandlers to be used by Web Inspector's WebView to load resources from client-controlled locations. This can be used to implement loading of extension resources using a custom scheme such as web-extension://. Scheme handlers need to be registered at WebView creation time via WKWebViewConfiguration. In order to configure a inspector page summoned from within WebKit (i.e., Inspect Element context menu item), we need to add a method to the UI delegate to get a configuration when the page is being created. This configuration object is used in two different SPI (local and remote cases): - As part of WKUIDelegatePrivate, to retrieve a _WKInspectorConfiguration given a _WKInspector. - As an argument to the _WKRemoteWebInspectorViewController initializer. It's used later as needed. New API test: WKInspectorDelegate.InspectorConfiguration. * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: Add new files. * UIProcess/API/APIInspectorConfiguration.h: Added. * UIProcess/API/APIInspectorConfiguration.cpp: Added. * UIProcess/API/Cocoa/_WKInspectorConfiguration.h: Added. * UIProcess/API/Cocoa/_WKInspectorConfigurationInternal.h: Added. * UIProcess/API/Cocoa/_WKInspectorConfiguration.mm: Added. (-[_WKInspectorConfiguration init]): (-[_WKInspectorConfiguration dealloc]): (-[_WKInspectorConfiguration _apiObject]): (-[_WKInspectorConfiguration setURLSchemeHandler:forURLScheme:]): (-[_WKInspectorConfiguration applyToWebViewConfiguration:]): (-[_WKInspectorConfiguration copyWithZone:]): Create _WKInspectorConfiguration and add a method to register WKURLSchemeHandlers. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): Add new API object types. Add missing InspectorExtension. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/API/APIUIClient.h: (API::UIClient::configurationForLocalInspector): * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::configurationForLocalInspector): Add new client/delegate method to fetch an inspector configuration as needed. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController initWithConfiguration:]): Renamed from -init. (-[_WKRemoteWebInspectorViewController init]): Deleted. (-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]): (-[_WKRemoteWebInspectorViewController configurationForDebuggable:]): (-[_WKRemoteWebInspectorViewController _setDiagnosticLoggingDelegate:]): Store a _WKInspectorConfiguration and provide it when asked by RemoteWebInspectorProxy. * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::load): Store m_debuggableInfo before creating the page and window. It's used from inside platformCreateFrontendPageAndWindow to pass as an argument to the delegate method. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: (WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow): * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateFrontendPage): Obtain a configuration and use it to initialize the WKInspectorViewController. * UIProcess/Inspector/mac/WKInspectorViewController.h: * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithConfiguration:inspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController webViewConfiguration]): Renamed from -configuration. (-[WKInspectorViewController initWithInspectedPage:]): Deleted. (-[WKInspectorViewController configuration]): Deleted. Apply the URL scheme handlers registered in the _WKInspectorConfiguration to the WKWebViewConfiguration. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Stub out RemoteWebInspectorProxyClient::configurationForRemoteInspector(). * UIProcess/API/Cocoa/_WKUserStyleSheet.h: * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Fix build problems caused by repartitioning of unified sources. Tools: Add an API test for _WKInspectorConfiguration. Disabled for now, will be turned back on when more web extensions API has landed. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm: (-[SimpleURLSchemeHandler webView:startURLSchemeTask:]): (-[SimpleURLSchemeHandler webView:stopURLSchemeTask:]): (-[UIDelegate _webView:configurationForLocalInspector:]): (-[UIDelegate _webView:didAttachLocalInspector:]): (TEST): Canonical link: https://commits.webkit.org/230956@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-27 20:54:03 +00:00
UIProcess/API/APIInspectorConfiguration.cpp
[Cocoa] Web Inspector: add support for creating extension tabs in WebInspectorUI via _WKInspectorExtension https://bugs.webkit.org/show_bug.cgi?id=219380 Reviewed by Devin Rousso and Timothy Hatcher. Source/WebInspectorUI: * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype._makeNextExtensionTabID): (WI.WebInspectorExtensionController.prototype.unregisterExtension): (WI.WebInspectorExtensionController.prototype.createTabForExtension): * UserInterface/Main.html: * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.createTabForExtension): * UserInterface/Views/GeneralTabBarItem.js: (WI.GeneralTabBarItem.fromTabContentView): (WI.GeneralTabBarItem.get displayName): Deleted. * UserInterface/Views/PinnedTabBarItem.js: (WI.PinnedTabBarItem.fromTabContentView): (WI.PinnedTabBarItem): * UserInterface/Views/TabContentView.js: (WI.TabContentView.prototype.get tabBarItem): (WI.TabContentView.prototype.tabInfo): (WI.TabContentView.prototype.get managesNavigationSidebarPanel): Deleted. (WI.TabContentView.prototype.attached): Deleted. * UserInterface/Views/WebInspectorExtensionTabContentView.css: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h. (.content-view.web-inspector-extension-tab > iframe): * UserInterface/Views/WebInspectorExtensionTabContentView.js: Copied from Source/WebKit/UIProcess/API/APIInspectorExtension.h. (WI.WebInspectorExtensionTabContentView): (WI.WebInspectorExtensionTabContentView.prototype.tabInfo): (WI.WebInspectorExtensionTabContentView.prototype.get type): (WI.WebInspectorExtensionTabContentView.prototype.get supportsSplitContentBrowser): (WI.WebInspectorExtensionTabContentView.prototype.get extensionTabID): (WI.WebInspectorExtensionTabContentView.prototype.initialLayout): Source/WebKit: Add a new method to _WKInspectorExtension for creating an extension tab in WebInpectorUI. This can be used to implement browser.devtools.panels.create() as provided by the Web Extensions API. * Platform/Logging.h: Add Inspector channel for error logging. * Shared/InspectorExtensionTypes.h: Add a missing EnumTraits case. * WebKit.xcodeproj/project.pbxproj: * Sources.txt: Add files. * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::InspectorExtension): (API::InspectorExtension::create): (API::InspectorExtension::createTab): Inspector extensions need to be able to invoke commands in the WebProcess-side extension proxy controller, so keep a WeakRef to the extension controller that created the extension object. Also, implement the new API by forwarding it on. * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): Adapt to the new constructor as explained above. * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h: Expose member m_remoteInspectorPorxy for use in the API::InspectorExtension constructor. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension initWithIdentifier:]): Deleted. (-[_WKInspectorExtension createTabWithName:tabIconURL:sourceURL:completionHandler:]): Implement new API. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerInternal.h: Added. Make the RefPtr<RemoteWebInspectorProxy> member variable accessible to the API object constructor. * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): Adapt to new constructor as explained above. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: (WebKit::WebInspectorUIExtensionControllerProxy::createTabForExtension): Forward the request to the inspector frontend WebProcess. * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Add a new async IPC command for creating a new inspector extension tab. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: (WebKit::WebInspectorUIExtensionController::unwrapEvaluationResultAsObject): Added. Pull out the code needed for error-handling this common operation. (WebKit::WebInspectorUIExtensionController::createTabForExtension): Added. Call into InspectorFrontendAPI to request a new tab. Turn the result into an InspectorExtensionError or InspectorExtensionTabID and send the IPC reply. * UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h: Fix unified sources fallout. Canonical link: https://commits.webkit.org/232273@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 23:08:25 +00:00
UIProcess/API/APIInspectorExtension.cpp
Add and expose Internal features from WebKit https://bugs.webkit.org/show_bug.cgi?id=189442 <rdar://problem/44243404> Reviewed by Simon Fraser. Source/WebKit: Experimental features have become a mess. People are using them for anything that they want to be easily toggled from a host app (e.g. Safari), which means the user-facing menu has become large and confusing. Introduce the idea of Internal features, that will be exposed in a way that end-users are not expected to ever see (unless they really want to). * CMakeLists.txt: Add new files. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * DerivedSources.make: Add new generated files. * Scripts/GeneratePreferences.rb: Generate the preferences stuff for Internal Debug features. * Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb: * Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb: Added. * Shared/API/APIObject.h: New API object for InternalDebugFeature. * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Shared/WebPreferences.yaml: Change some of the existing experimental features to "internal". * UIProcess/API/APIInternalDebugFeature.cpp: New API type - just like APIExperimentalFeature. (API::InternalDebugFeature::create): (API::InternalDebugFeature::InternalDebugFeature): (API::InternalDebugFeature::~InternalDebugFeature): * UIProcess/API/APIInternalDebugFeature.h: * UIProcess/API/C/WKAPICast.h: * UIProcess/API/Cocoa/WKPreferences.mm: Change the naming of the experimental feature API so that it won't clash with internal debug features. We can remove the old API once Safari has adopted. (+[WKPreferences _internalDebugFeatures]): (-[WKPreferences _isEnabledForInternalDebugFeature:]): (-[WKPreferences _setEnabled:forInternalDebugFeature:]): (-[WKPreferences _isEnabledForFeature:]): (-[WKPreferences _setEnabled:forFeature:]): (-[WKPreferences _isEnabledForExperimentalFeature:]): (-[WKPreferences _setEnabled:forExperimentalFeature:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * UIProcess/API/Cocoa/_WKInternalDebugFeature.h: New object - same as _WKExperimentalFeature. * UIProcess/API/Cocoa/_WKInternalDebugFeature.mm: (-[_WKInternalDebugFeature dealloc]): (-[_WKInternalDebugFeature description]): (-[_WKInternalDebugFeature name]): (-[_WKInternalDebugFeature key]): (-[_WKInternalDebugFeature details]): (-[_WKInternalDebugFeature defaultValue]): (-[_WKInternalDebugFeature isHidden]): (-[_WKInternalDebugFeature _apiObject]): * UIProcess/API/Cocoa/_WKInternalDebugFeatureInternal.h: * UIProcess/WebPreferences.cpp: Add support for Internal Debug features. (WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey): (WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey): * UIProcess/WebPreferences.h: * UIProcess/WebProcessPool.cpp: Change a comment now that it is an internal feature. (WebKit::WebProcessPool::createWebPage): Tools: Update MiniBrowser to expose an Internal feature menu. * MiniBrowser/mac/AppDelegate.m: (defaultConfiguration): * MiniBrowser/mac/SettingsController.m: (-[SettingsController _populateMenu]): (-[SettingsController validateMenuItem:]): (-[SettingsController toggleExperimentalFeature:]): (-[SettingsController toggleInternalDebugFeature:]): LayoutTests: Skip some tests that rely on an experimental feature that has moved to internal. A follow-up patch will allow WKTR to enable them on demand. * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/204504@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-11 23:23:38 +00:00
UIProcess/API/APIInternalDebugFeature.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[WebAuthn] Implement SPI to tell UI clients to select assertion responses https://bugs.webkit.org/show_bug.cgi?id=206112 <rdar://problem/58495733> Reviewed by Alex Christensen. Source/WebKit: Covered by API tests. This patch adds a new delegate method in _WKWebAuthenticationPanelDelegate to tell UI clients to select an assertion response when multiple are returned from an authenticator. Here is the SPI: @protocol _WKWebAuthenticationPanelDelegate <NSObject> @optional ... - (void)panel:(_WKWebAuthenticationPanel *)panel selectAssertionResponse:(NSArray < _WKWebAuthenticationAssertionResponse *> *)responses completionHandler:(void (^)(_WKWebAuthenticationAssertionResponse *))completionHandler; ... @end A new interface is introduced to represent an authenticator assertion response: @interface _WKWebAuthenticationAssertionResponse : NSObject @property (nonatomic, readonly, copy) NSString *name; @property (nonatomic, readonly, copy) NSString *displayName; @property (nonatomic, readonly, copy) NSData *userHandle; @end Only members that can assist users to make a decision are exposed to UI clients. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebAuthenticationAssertionResponse.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (API::WebAuthenticationAssertionResponse::create): (API::WebAuthenticationAssertionResponse::WebAuthenticationAssertionResponse): * UIProcess/API/APIWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (-[_WKWebAuthenticationAssertionResponse dealloc]): (-[_WKWebAuthenticationAssertionResponse name]): (-[_WKWebAuthenticationAssertionResponse displayName]): (-[_WKWebAuthenticationAssertionResponse userHandle]): (-[_WKWebAuthenticationAssertionResponse _apiObject]): * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: (WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient): (WebKit::WebAuthenticationPanelClient::selectAssertionResponses const): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponses:completionHandler:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-multiple-accounts.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html: Canonical link: https://commits.webkit.org/219365@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-15 02:50:12 +00:00
UIProcess/API/APIWebAuthenticationAssertionResponse.cpp
[WebAuthn] Implement _WKWebAuthenticationPanel SPI https://bugs.webkit.org/show_bug.cgi?id=202559 <rdar://problem/55932094> Reviewed by Brent Fulgham. Source/WebKit: This patch implements _WKWebAuthenticationPanel SPI. Here is the structure: 1) API::WebAuthenticationPanel is the APIObject of _WKWebAuthenticationPanel. It is owned by AuthenticatorManager. The lifetime of _WKWebAuthenticationPanel on the other hand is managed by clients. This binding is the surface where clients could interact with WebKit's WebAuthentication implementation. 2) API::WebAuthenticationPanelClient is a base class representing _WKWebAuthenticationPanelDelegate. Its subclass WebKit::WebAuthenticationPanelClient implements bridges to _WKWebAuthenticationPanelDelegate methods. It is owned by API::WebAuthenticationPanel. A weak pointer of WebKit::WebAuthenticationPanelClient is kept in _WKWebAuthenticationPanel to get the _WKWebAuthenticationPanelDelegate set by clients or nil otherwise. This binding is the surface where WebKit interacts with clients. 3) WebAuthenticationPanelFlags is the mirror of enums within _WKWebAuthenticationPanel. Implementation wise, this patch implements: 1) -[WKUIDelegatePrivate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:], this is bridged from the regular UIDelegate route. Noted, WKFrameInfo is nil for now, a follow up on Bug 202563 will take care of it. This will be called from AuthenticatorManager::runPanel() which gates the start of discovery on the callback. For clients that don't implement the delegate, the callback will always be called with _WKWebAuthenticationPanelResultUnavailable to allow WebKit run on non-UI mode. A specific C API hack is added to always return _WKWebAuthenticationPanelResultPresented in WebKitTestRunner for layout tests. 2) -[_WKWebAuthenticationPanelDelegate panel:updateWebAuthenticationPanel:] will be implemented in Bug 200932. 3) -[_WKWebAuthenticationPanelDelegate panel:dismissWebAuthenticationPanelWithResult:], this is bridged from API::WebAuthenticationPanel/API::WebAuthenticationPanelClient. This will be called whenever AuthenticatorManager::m_pendingCompletionHandler is invoked. Depending on the respond, _WKWebAuthenticationResult will be returned accordingly. To facilitate that, invokePendingCompletionHandler is crafted to bundle those two operations. 4) -[_WKWebAuthenticationPanel cancel] will be implemented in Bug 191523. Besides the above, this patch also silents the NFC action sheet. * Platform/spi/Cocoa/NearFieldSPI.h: * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::runWebAuthenticationPanel): * UIProcess/API/APIWebAuthenticationPanel.cpp: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm. (API::WebAuthenticationPanel::create): (API::WebAuthenticationPanel::WebAuthenticationPanel): (API::WebAuthenticationPanel::setClient): * UIProcess/API/APIWebAuthenticationPanel.h: Copied from Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationRequestData.h. * UIProcess/API/APIWebAuthenticationPanelClient.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h. (API::WebAuthenticationPanelClient::dismissPanel const): * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: (-[_WKWebAuthenticationPanel dealloc]): (-[_WKWebAuthenticationPanel relyingPartyID]): (-[_WKWebAuthenticationPanel delegate]): (-[_WKWebAuthenticationPanel setDelegate:]): (-[_WKWebAuthenticationPanel _apiObject]): (-[_WKWebAuthenticationPanel _initWithRelayingPartyID:]): Deleted. * UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h: * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::webAuthenticationPanelResult): (WebKit::UIDelegate::UIClient::runWebAuthenticationPanel): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::WebCore::isFeatureEnabled): (WebKit::WebCore::getRpId): (WebKit::AuthenticatorManager::handleRequest): (WebKit::AuthenticatorManager::respondReceived): (WebKit::AuthenticatorManager::startDiscovery): (WebKit::AuthenticatorManager::initTimeOutTimer): (WebKit::AuthenticatorManager::timeOutTimerFired): (WebKit::AuthenticatorManager::runPanel): (WebKit::AuthenticatorManager::startRequest): (WebKit::AuthenticatorManager::invokePendingCompletionHandler): (WebKit::AuthenticatorManagerInternal::collectTransports): Deleted. (WebKit::AuthenticatorManagerInternal::processGoogleLegacyAppIdSupportExtension): Deleted. * UIProcess/WebAuthentication/AuthenticatorManager.h: (WebKit::AuthenticatorManager::pendingCompletionHandler): Deleted. * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: (WebKit::NfcConnection::NfcConnection): * UIProcess/WebAuthentication/Cocoa/NfcService.mm: (WebKit::NfcService::platformStartDiscovery): * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h: Copied from Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationRequestData.h. * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp. (WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient): (WebKit::wkWebAuthenticationResult): (WebKit::WebAuthenticationPanelClient::dismissPanel const): * UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp: (WebKit::MockAuthenticatorManager::respondReceivedInternal): * UIProcess/WebAuthentication/WebAuthenticationPanelFlags.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h. * UIProcess/WebAuthentication/WebAuthenticationRequestData.h: * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp: (WebKit::WebAuthenticatorCoordinatorProxy::makeCredential): (WebKit::WebAuthenticatorCoordinatorProxy::getAssertion): * WebKit.xcodeproj/project.pbxproj: Tools: This patch adds a very limited test case to _WKWebAuthenticationPanel. Bug 202560 and Bug 202565 will follow up to write more tests. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: Added. (-[TestWebAuthenticationPanelDelegate panel:dismissWebAuthenticationPanelWithResult:]): (-[TestWebAuthenticationPanelUIDelegate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion.html: Added. * WebKitTestRunner/TestController.cpp: (WTR::runWebAuthenticationPanel): (WTR::TestController::createWebViewWithOptions): Canonical link: https://commits.webkit.org/216065@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-04 16:50:01 +00:00
UIProcess/API/APIWebAuthenticationPanel.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Deprecate all WKCookieManagerRef functions https://bugs.webkit.org/show_bug.cgi?id=201473 Reviewed by Chris Dumez. Source/WebKit: Their use was removed in rdar://problem/55039275 Created replacement C API that more closely resembles the public ObjC API for WebKitTestRunner. * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIHTTPCookieStore.cpp: (API::HTTPCookieStore::deleteAllCookies): (API::HTTPCookieStore::setHTTPCookieAcceptPolicy): (API::HTTPCookieStore::deleteCookiesInDefaultUIProcessCookieStore): (API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore): * UIProcess/API/APIHTTPCookieStore.h: * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKContext.cpp: (WKContextSetStorageAccessAPIEnabled): * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerGetTypeID): (WKCookieManagerSetClient): (WKCookieManagerGetHostnamesWithCookies): (WKCookieManagerDeleteCookiesForHostname): (WKCookieManagerDeleteAllCookies): (WKCookieManagerDeleteAllCookiesModifiedAfterDate): (WKCookieManagerSetHTTPCookieAcceptPolicy): (WKCookieManagerGetHTTPCookieAcceptPolicy): (WKCookieManagerSetStorageAccessAPIEnabled): (WKCookieManagerStartObservingCookieChanges): (WKCookieManagerStopObservingCookieChanges): * UIProcess/API/C/WKCookieManager.h: * UIProcess/API/C/WKHTTPCookieStoreRef.cpp: Added. (WKHTTPCookieStoreGetTypeID): (WKHTTPCookieStoreDeleteAllCookies): (WKHTTPCookieStoreSetHTTPCookieAcceptPolicy): * UIProcess/API/C/WKHTTPCookieStoreRef.h: Added. * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreGetHTTPCookieStore): * UIProcess/API/C/WKWebsiteDataStoreRef.h: * UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm: (API::HTTPCookieStore::deleteCookiesInDefaultUIProcessCookieStore): (API::toNSHTTPCookieAcceptPolicy): (API::HTTPCookieStore::setHTTPCookieAcceptPolicyInDefaultUIProcessCookieStore): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::setStorageAccessAPIEnabled): Deleted. * UIProcess/WebCookieManagerProxy.h: * WebKit.xcodeproj/project.pbxproj: Tools: Adopt replacement C API in WebKitTestRunner. * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/CookieManager.cpp: Removed, because the functions it tests were removed. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): Canonical link: https://commits.webkit.org/215188@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-06 20:42:42 +00:00
UIProcess/API/C/WKHTTPCookieStoreRef.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Permission request API for MediaKeySystem access support https://bugs.webkit.org/show_bug.cgi?id=221187 Reviewed by Jer Noble. Source/WebCore: Support for user permission requesting when access to an EME MediaKeySystem is being requested by the page. This is similar to the mediaDevices access guards. Existing test media/encrypted-media/mock-MediaKeySystemAccess.html was updated to cover this new code path and WPE/GTK API tests as well. * CMakeLists.txt: * Headers.cmake: * Modules/encryptedmedia/MediaKeySystemClient.h: Added. * Modules/encryptedmedia/MediaKeySystemController.cpp: Added. (WebCore::MediaKeySystemController::supplementName): (WebCore::MediaKeySystemController::MediaKeySystemController): (WebCore::MediaKeySystemController::~MediaKeySystemController): (WebCore::provideMediaKeySystemTo): (WebCore::MediaKeySystemController::logRequestMediaKeySystemDenial): * Modules/encryptedmedia/MediaKeySystemController.h: Added. (WebCore::MediaKeySystemController::client const): (WebCore::MediaKeySystemController::from): (WebCore::MediaKeySystemController::requestMediaKeySystem): (WebCore::MediaKeySystemController::cancelMediaKeySystemRequest): * Modules/encryptedmedia/MediaKeySystemRequest.cpp: Added. (WebCore::MediaKeySystemRequest::create): (WebCore::MediaKeySystemRequest::MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::~MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const): (WebCore::MediaKeySystemRequest::start): (WebCore::MediaKeySystemRequest::allow): (WebCore::MediaKeySystemRequest::deny): (WebCore::MediaKeySystemRequest::stop): (WebCore::MediaKeySystemRequest::activeDOMObjectName const): (WebCore::MediaKeySystemRequest::document const): * Modules/encryptedmedia/MediaKeySystemRequest.h: Added. (WebCore::MediaKeySystemRequest::setAllowCallback): (WebCore::MediaKeySystemRequest::identifier const): (WebCore::MediaKeySystemRequest::keySystem const): * Modules/encryptedmedia/NavigatorEME.cpp: (WebCore::NavigatorEME::requestMediaKeySystemAccess): Source/WebKit: Add new IPC and C API exposing MediaKeySystem access permissions to the UIProcess. At least GTK/WPE would like to have API for asking permission to the user when EME's MediaKeyAccess is being requested by a page. On Apple platforms the permission is granted by default until a decision is made about supporting this in their APIUIClient. * CMakeLists.txt: * Headers.cmake: * Platform/Logging.h: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForMediaKeySystemPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp: Added. (WKMediaKeySystemPermissionCallbackGetTypeID): (WKMediaKeySystemPermissionCallbackComplete): * UIProcess/API/C/WKMediaKeySystemPermissionCallback.h: Added. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/MediaKeySystemPermissionRequest.h: Added. (WebKit::MediaKeySystemPermissionRequest::create): (WebKit::MediaKeySystemPermissionRequest::complete): (WebKit::MediaKeySystemPermissionRequest::keySystem const): (WebKit::MediaKeySystemPermissionRequest::MediaKeySystemPermissionRequest): (WebKit::MediaKeySystemPermissionCallback::create): (WebKit::MediaKeySystemPermissionCallback::complete): (WebKit::MediaKeySystemPermissionCallback::MediaKeySystemPermissionCallback): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::~MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::invalidatePendingRequests): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::grantRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::createRequestForFrame): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logChannel const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logger const): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::page const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): * UIProcess/MediaKeySystemPermissionRequestProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestProxy::MediaKeySystemPermissionRequestProxy): (WebKit::MediaKeySystemPermissionRequestProxy::allow): (WebKit::MediaKeySystemPermissionRequestProxy::deny): (WebKit::MediaKeySystemPermissionRequestProxy::invalidate): (WebKit::MediaKeySystemPermissionRequestProxy::doDefaultAction): * UIProcess/MediaKeySystemPermissionRequestProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestProxy::create): (WebKit::MediaKeySystemPermissionRequestProxy::isPending const): (WebKit::MediaKeySystemPermissionRequestProxy::mediaKeySystemID const): (WebKit::MediaKeySystemPermissionRequestProxy::mainFrameID const): (WebKit::MediaKeySystemPermissionRequestProxy::frameID const): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin const): (WebKit::MediaKeySystemPermissionRequestProxy::keySystem const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): (WebKit::WebPageProxy::mediaKeySystemPermissionRequestManager): (WebKit::WebPageProxy::requestMediaKeySystemPermissionByDefaultAction): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManager::MediaKeySystemPermissionRequestManager): (WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::sendMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasGranted): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasDenied): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: Added. * WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp: Added. (WebKit::WebMediaKeySystemClient::WebMediaKeySystemClient): (WebKit::WebMediaKeySystemClient::pageDestroyed): (WebKit::WebMediaKeySystemClient::requestMediaKeySystem): (WebKit::WebMediaKeySystemClient::cancelMediaKeySystemRequest): * WebProcess/WebCoreSupport/WebMediaKeySystemClient.h: Added. (WebKit::WebMediaKeySystemClient::~WebMediaKeySystemClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::mediaKeySystemWasGranted): (WebKit::WebPage::mediaKeySystemWasDenied): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::mediaKeySystemPermissionRequestManager): * WebProcess/WebPage/WebPage.messages.in: Tools: Add support for setting the permission request response from the TestRunner, for usage within layout tests. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsMediaKeySystemPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForMediaKeySystemPermissionRequest): (WTR::TestController::completeMediaKeySystemPermissionCheck): (WTR::TestController::setIsMediaKeySystemPermissionGranted): (WTR::TestController::createWebViewWithOptions): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Add basic coverage support for overriding the MediaKeySystem permission answer and thus have the promise rejection tested in this case. * media/encrypted-media/mock-MediaKeySystemAccess-expected.txt: * media/encrypted-media/mock-MediaKeySystemAccess.html: Canonical link: https://commits.webkit.org/233845@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-09 12:46:22 +00:00
UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp
testRunner.setAlwaysAcceptCookies should wait for cookie accept policy to be set https://bugs.webkit.org/show_bug.cgi?id=199230 <rdar://51757107> Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-26 Reviewed by Andy Estes. Source/WebKit: This patch adds an optional callback to WKCookieManagerSetHTTPCookieAcceptPolicy which is luckily only used for testing. It also adds listener-based asynchronous versions of didReceiveSynchronousMessageFromInjectedBundle. WebKitTestRunner uses these new abilities to wait for the cookie accept policy to be set in the network process while the web process is hung. This removes the race condition that was causing some flakiness in tests that use testRunner.setAlwaysAcceptCookies * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIInjectedBundleClient.h: (API::InjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle): * UIProcess/API/APIMessageListener.h: Copied from Source/WebKit/UIProcess/API/APIInjectedBundleClient.h. (API::MessageListener::create): (API::MessageListener::sendReply): (API::MessageListener::MessageListener): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKContextInjectedBundleClient.h: * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetHTTPCookieAcceptPolicy): * UIProcess/API/C/WKCookieManager.h: * UIProcess/API/C/WKMessageListener.cpp: Copied from Source/WebKit/UIProcess/API/APIInjectedBundleClient.h. (WKMessageListenerGetTypeID): (WKMessageListenerSendReply): * UIProcess/API/C/WKMessageListener.h: Copied from Source/WebKit/UIProcess/API/APIInjectedBundleClient.h. * UIProcess/API/C/WKPageInjectedBundleClient.h: * UIProcess/WebContextInjectedBundleClient.cpp: (WebKit::WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle): * UIProcess/WebContextInjectedBundleClient.h: * UIProcess/WebPageInjectedBundleClient.cpp: (WebKit::WebPageInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle): * UIProcess/WebPageInjectedBundleClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleSynchronousMessage): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::injectedBundleClient): Deleted. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::handleSynchronousMessage): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/Tests/WebKit/CookieManager.cpp: (TestWebKitAPI::didGetTestHTTPCookieAcceptPolicy): (TestWebKitAPI::didGetUserHTTPCookieAcceptPolicy): * WebKitTestRunner/TestController.cpp: (WTR::TestController::generatePageConfiguration): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundleWithListener): (WTR::TestController::didReceiveSynchronousPageMessageFromInjectedBundleWithListener): (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestController::didReceiveSynchronousPageMessageFromInjectedBundle): Deleted. * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::invoke): (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Canonical link: https://commits.webkit.org/213201@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-26 23:30:19 +00:00
UIProcess/API/C/WKMessageListener.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Implement basic permission check for SpeechRecognition https://bugs.webkit.org/show_bug.cgi?id=218476 <rdar://problem/71222638> Reviewed by Youenn Fablet. Source/WebCore: Tests: fast/speechrecognition/permission-error.html fast/speechrecognition/start-recognition-in-removed-iframe.html * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::startRecognition): * Modules/speech/SpeechRecognitionConnection.h: * Modules/speech/SpeechRecognitionRequest.cpp: (WebCore::SpeechRecognitionRequest::create): Deleted. * Modules/speech/SpeechRecognitionRequest.h: (WebCore::SpeechRecognitionRequest::clientOrigin const): * Modules/speech/SpeechRecognitionRequestInfo.h: (WebCore::SpeechRecognitionRequestInfo::encode const): (WebCore::SpeechRecognitionRequestInfo::decode): * Modules/speech/SpeechRecognitionUpdate.cpp: (WebCore::SpeechRecognitionUpdate::create): (WebCore::SpeechRecognitionUpdate::error const): (WebCore::SpeechRecognitionUpdate::result const): * Modules/speech/SpeechRecognitionUpdate.h: * page/DummySpeechRecognitionProvider.h: Source/WebKit: Introduce SpeechRecognitionPermissionManager, which checks and requests speech recognition permissions before we actually start capturing audio and perform recognition. SpeechRecognitionPermissionManager is per-page, like SpeechRecognitionServer. The checks include: 1. Sandbox requirement for microphone 2. TCC check for microphone 3. TCC check for SFSpeechRecognizer 4. User permission on speech recognition for origin Add a delegate function for requesting user permission. By default, user permission is not granted. API test: WebKit2.SpeechRecognitionUserPermissionPersistence * Headers.cmake: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForSpeechRecognitionPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/API/C/WKSpeechRecognitionPermissionCallback.cpp: Added. (WKSpeechRecognitionPermissionCallbackGetTypeID): (WKSpeechRecognitionPermissionCallbackComplete): * UIProcess/API/C/WKSpeechRecognitionPermissionCallback.h: Added. * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _speechRecognitionEnabled]): (-[WKPreferences _setSpeechRecognitionEnabled:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * UIProcess/Cocoa/MediaPermissionUtilities.mm: Added. (WebKit::checkSandboxRequirementForType): (WebKit::checkUsageDescriptionStringForType): (WebKit::checkUsageDescriptionStringForSpeechRecognition): (WebKit::requestAVCaptureAccessForType): (WebKit::checkAVCaptureAccessForType): (WebKit::requestSpeechRecognitionAccess): (WebKit::checkSpeechRecognitionServiceAccess): * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::decidePolicyForSpeechRecognitionPermissionRequest): * UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): (WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): (WebKit::UserMediaPermissionRequestManagerProxy::requestSystemValidation): (WebKit::requestAVCaptureAccessForMediaType): Deleted. * UIProcess/Cocoa/WebProcessProxyCocoa.mm: * UIProcess/MediaPermissionUtilities.h: Copied from Added. * UIProcess/SpeechRecognitionPermissionManager.cpp: Added. (WebKit::computeMicrophoneAccess): (WebKit::computeSpeechRecognitionServiceAccess): (WebKit::SpeechRecognitionPermissionManager::SpeechRecognitionPermissionManager): (WebKit::SpeechRecognitionPermissionManager::~SpeechRecognitionPermissionManager): (WebKit::SpeechRecognitionPermissionManager::request): (WebKit::SpeechRecognitionPermissionManager::startNextRequest): (WebKit::SpeechRecognitionPermissionManager::startProcessingRequest): (WebKit::SpeechRecognitionPermissionManager::continueProcessingRequest): (WebKit::SpeechRecognitionPermissionManager::completeCurrentRequest): (WebKit::SpeechRecognitionPermissionManager::requestSpeechRecognitionServiceAccess): (WebKit::SpeechRecognitionPermissionManager::requestMicrophoneAccess): (WebKit::SpeechRecognitionPermissionManager::requestUserPermission): * UIProcess/SpeechRecognitionPermissionManager.h: Added. * UIProcess/SpeechRecognitionPermissionRequest.h: Added. (WebKit::SpeechRecognitionPermissionRequest::create): (WebKit::SpeechRecognitionPermissionRequest::complete): (WebKit::SpeechRecognitionPermissionRequest::origin const): (WebKit::SpeechRecognitionPermissionRequest::SpeechRecognitionPermissionRequest): (WebKit::SpeechRecognitionPermissionCallback::create): (WebKit::SpeechRecognitionPermissionCallback::complete): (WebKit::SpeechRecognitionPermissionCallback::SpeechRecognitionPermissionCallback): * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::requestPermissionForRequest): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::handleRequest): (WebKit::SpeechRecognitionServer::stopRequest): (WebKit::SpeechRecognitionServer::abortRequest): (WebKit::SpeechRecognitionServer::sendUpdate): (WebKit::SpeechRecognitionServer::processNextPendingRequestIfNeeded): Deleted. (WebKit::SpeechRecognitionServer::removePendingRequest): Deleted. (WebKit::SpeechRecognitionServer::startPocessingRequest): Deleted. (WebKit::SpeechRecognitionServer::stopProcessingRequest): Deleted. * UIProcess/SpeechRecognitionServer.h: * UIProcess/SpeechRecognitionServer.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChangeMainDocument): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::requestSpeechRecognitionPermission): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: (WebKit::WebSpeechRecognitionConnection::start): (WebKit::WebSpeechRecognitionConnection::didReceiveUpdate): * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h: Source/WTF: * wtf/PlatformHave.h: Tools: * MiniBrowser/mac/Info.plist: * MobileMiniBrowser/MobileMiniBrowser/Info.plist: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/SpeechRecognition.mm: Added. (-[SpeechRecognitionPermissionUIDelegate _webView:requestSpeechRecognitionPermissionForOrigin:decisionHandler:]): (-[SpeechRecognitionMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/speechrecognition-user-permission-persistence.html: Added. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsSpeechRecognitionPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForSpeechRecognitionPermissionRequest): (WTR::TestController::completeSpeechRecognitionPermissionCheck): (WTR::TestController::setIsSpeechRecognitionPermissionGranted): (WTR::TestController::createWebViewWithOptions): (WTR::TestController::resetStateToConsistentValues): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: * TestExpectations: * fast/speechrecognition/permission-error-expected.txt: Added. * fast/speechrecognition/permission-error.html: Added. * fast/speechrecognition/resources/removed-iframe.html: Added. * fast/speechrecognition/start-recognition-in-removed-iframe-expected.txt: Added. * fast/speechrecognition/start-recognition-in-removed-iframe.html: Added. * platform/wk2/TestExpectations: Canonical link: https://commits.webkit.org/231575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-14 02:16:49 +00:00
UIProcess/API/C/WKSpeechRecognitionPermissionCallback.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/C/WKUserMediaPermissionCheck.cpp
UIProcess/API/C/WKUserMediaPermissionRequest.cpp
Deprecate WKContextGetWebsiteDataStore https://bugs.webkit.org/show_bug.cgi?id=200050 Reviewed by Geoff Garen. Source/WebCore: * platform/network/CacheValidation.cpp: (WebCore::collectVaryingRequestHeaders): (WebCore::verifyVaryingRequestHeaders): * platform/network/CacheValidation.h: Replace a few NetworkStorageSession& with NetworkStorageSession* so I can replace defaultStorageSession with the correct NetworkStorageSession in NetworkCache.cpp. Source/WebKit: The last use of it was removed in rdar://problem/47030981 In order to remove its use in WebKitTestRunner, I needed to make WKWebsiteDataStoreConfigurationRef to replace the WKContextConfigurationRef members that should've been associated with the WebsiteDataStore the whole time. There is one use of WKContextGetWebsiteDataStore in TestWebKitAPI still I'll investigate later. * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::create): * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKContext.cpp: (WKContextGetApplicationCacheManager): (WKContextGetKeyValueStorageManager): (WKContextGetResourceCacheManager): * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationCopyDiskCacheDirectory): (WKContextConfigurationSetDiskCacheDirectory): (WKContextConfigurationCopyApplicationCacheDirectory): (WKContextConfigurationSetApplicationCacheDirectory): (WKContextConfigurationCopyIndexedDBDatabaseDirectory): (WKContextConfigurationSetIndexedDBDatabaseDirectory): (WKContextConfigurationCopyLocalStorageDirectory): (WKContextConfigurationSetLocalStorageDirectory): (WKContextConfigurationCopyWebSQLDatabaseDirectory): (WKContextConfigurationSetWebSQLDatabaseDirectory): (WKContextConfigurationCopyMediaKeysStorageDirectory): (WKContextConfigurationSetMediaKeysStorageDirectory): (WKContextConfigurationCopyResourceLoadStatisticsDirectory): (WKContextConfigurationSetResourceLoadStatisticsDirectory): * UIProcess/API/C/WKContextConfigurationRef.h: * UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp: Added. (WKWebsiteDataStoreConfigurationGetTypeID): (WKWebsiteDataStoreConfigurationCreate): (WKWebsiteDataStoreConfigurationCopyApplicationCacheDirectory): (WKWebsiteDataStoreConfigurationSetApplicationCacheDirectory): (WKWebsiteDataStoreConfigurationCopyNetworkCacheDirectory): (WKWebsiteDataStoreConfigurationSetNetworkCacheDirectory): (WKWebsiteDataStoreConfigurationCopyIndexedDBDatabaseDirectory): (WKWebsiteDataStoreConfigurationSetIndexedDBDatabaseDirectory): (WKWebsiteDataStoreConfigurationCopyLocalStorageDirectory): (WKWebsiteDataStoreConfigurationSetLocalStorageDirectory): (WKWebsiteDataStoreConfigurationCopyWebSQLDatabaseDirectory): (WKWebsiteDataStoreConfigurationSetWebSQLDatabaseDirectory): (WKWebsiteDataStoreConfigurationCopyMediaKeysStorageDirectory): (WKWebsiteDataStoreConfigurationSetMediaKeysStorageDirectory): (WKWebsiteDataStoreConfigurationCopyResourceLoadStatisticsDirectory): (WKWebsiteDataStoreConfigurationSetResourceLoadStatisticsDirectory): * UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.h: Added. * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreCreateWithConfiguration): * UIProcess/API/C/WKWebsiteDataStoreRef.h: * WebKit.xcodeproj/project.pbxproj: Tools: * MiniBrowser/win/WebKitBrowserWindow.cpp: (WebKitBrowserWindow::updateProxySettings): * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: * WebKitTestRunner/TestController.cpp: (WTR::TestController::generateContextConfiguration const): (WTR::TestController::websiteDataStore): (WTR::TestController::generatePageConfiguration): (WTR::TestController::resetStateToConsistentValues): (WTR::TestController::platformAdjustContext): (WTR::TestController::clearServiceWorkerRegistrations): (WTR::TestController::clearDOMCache): (WTR::TestController::clearDOMCaches): (WTR::TestController::ClearIndexedDatabases): (WTR::TestController::hasDOMCache): (WTR::TestController::domCacheSize): (WTR::TestController::setStatisticsDebugMode): (WTR::TestController::setStatisticsPrevalentResourceForDebugMode): (WTR::TestController::setStatisticsLastSeen): (WTR::TestController::setStatisticsPrevalentResource): (WTR::TestController::setStatisticsVeryPrevalentResource): (WTR::TestController::dumpResourceLoadStatistics): (WTR::TestController::isStatisticsPrevalentResource): (WTR::TestController::isStatisticsVeryPrevalentResource): (WTR::TestController::isStatisticsRegisteredAsSubresourceUnder): (WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): (WTR::TestController::isStatisticsRegisteredAsRedirectingTo): (WTR::TestController::setStatisticsHasHadUserInteraction): (WTR::TestController::isStatisticsHasHadUserInteraction): (WTR::TestController::setStatisticsGrandfathered): (WTR::TestController::isStatisticsGrandfathered): (WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin): (WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin): (WTR::TestController::setStatisticsSubresourceUniqueRedirectTo): (WTR::TestController::setStatisticsSubresourceUniqueRedirectFrom): (WTR::TestController::setStatisticsTopFrameUniqueRedirectTo): (WTR::TestController::setStatisticsTopFrameUniqueRedirectFrom): (WTR::TestController::setStatisticsCrossSiteLoadWithLinkDecoration): (WTR::TestController::setStatisticsTimeToLiveUserInteraction): (WTR::TestController::statisticsProcessStatisticsAndDataRecords): (WTR::TestController::statisticsUpdateCookieBlocking): (WTR::TestController::statisticsSubmitTelemetry): (WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned): (WTR::TestController::setStatisticsIsRunningTest): (WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): (WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured): (WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval): (WTR::TestController::setStatisticsGrandfatheringTime): (WTR::TestController::setStatisticsMaxStatisticsEntries): (WTR::TestController::setStatisticsPruneEntriesDownTo): (WTR::TestController::statisticsClearInMemoryAndPersistentStore): (WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): (WTR::TestController::statisticsDeleteCookiesForHost): (WTR::TestController::isStatisticsHasLocalStorage): (WTR::TestController::setStatisticsCacheMaxAgeCap): (WTR::TestController::statisticsResetToConsistentState): (WTR::TestController::setWebAuthenticationMockConfiguration): (WTR::TestController::clearAdClickAttributionsThroughWebsiteDataRemoval): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): * WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::initializeWebViewConfiguration): LayoutTests: Rebase some accessibility tests that were printing the SessionID since we're using SessionID 2 for testing now. * accessibility/mac/document-attributes-expected.txt: * platform/mac/accessibility/parent-delete-expected.txt: Canonical link: https://commits.webkit.org/215212@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-07 16:04:00 +00:00
UIProcess/API/C/WKWebsiteDataStoreConfigurationRef.cpp
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-09-08 00:36:09 +00:00
UIProcess/API/C/WKWebsiteDataStoreRef.cpp
UIProcess/API/C/WKWebsitePolicies.cpp
UIProcess/API/C/WKWindowFeaturesRef.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Authentication/AuthenticationChallengeProxy.cpp
UIProcess/Authentication/AuthenticationDecisionListener.cpp
UIProcess/Authentication/WebCredential.cpp
UIProcess/Authentication/WebProtectionSpace.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
[WebAuthn] Implement SPI to tell UI clients to select assertion responses https://bugs.webkit.org/show_bug.cgi?id=206112 <rdar://problem/58495733> Reviewed by Alex Christensen. Source/WebKit: Covered by API tests. This patch adds a new delegate method in _WKWebAuthenticationPanelDelegate to tell UI clients to select an assertion response when multiple are returned from an authenticator. Here is the SPI: @protocol _WKWebAuthenticationPanelDelegate <NSObject> @optional ... - (void)panel:(_WKWebAuthenticationPanel *)panel selectAssertionResponse:(NSArray < _WKWebAuthenticationAssertionResponse *> *)responses completionHandler:(void (^)(_WKWebAuthenticationAssertionResponse *))completionHandler; ... @end A new interface is introduced to represent an authenticator assertion response: @interface _WKWebAuthenticationAssertionResponse : NSObject @property (nonatomic, readonly, copy) NSString *name; @property (nonatomic, readonly, copy) NSString *displayName; @property (nonatomic, readonly, copy) NSData *userHandle; @end Only members that can assist users to make a decision are exposed to UI clients. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebAuthenticationAssertionResponse.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (API::WebAuthenticationAssertionResponse::create): (API::WebAuthenticationAssertionResponse::WebAuthenticationAssertionResponse): * UIProcess/API/APIWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (-[_WKWebAuthenticationAssertionResponse dealloc]): (-[_WKWebAuthenticationAssertionResponse name]): (-[_WKWebAuthenticationAssertionResponse displayName]): (-[_WKWebAuthenticationAssertionResponse userHandle]): (-[_WKWebAuthenticationAssertionResponse _apiObject]): * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: (WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient): (WebKit::WebAuthenticationPanelClient::selectAssertionResponses const): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponses:completionHandler:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-multiple-accounts.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html: Canonical link: https://commits.webkit.org/219365@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Downloads/DownloadProxy.cpp
UIProcess/Downloads/DownloadProxyMap.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Gamepad/UIGamepad.cpp
UIProcess/Gamepad/UIGamepadProvider.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
UIProcess/Launcher/ProcessLauncher.cpp @no-unify
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Network/NetworkProcessProxy.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Web Inspector: consolidate UIProcess/WebProcess files into Inspector folders https://bugs.webkit.org/show_bug.cgi?id=206721 Reviewed by Alex Christensen and Don Olmstead. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/InspectorTargetProxy.h: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.h. * UIProcess/Inspector/InspectorTargetProxy.cpp: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.cpp. * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.messages.in. * UIProcess/Inspector/RemoteWebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.h. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.messages.in. * UIProcess/Inspector/WebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.h. * UIProcess/Inspector/WebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorUtilities.h: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.h. * UIProcess/Inspector/WebInspectorUtilities.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.cpp. * UIProcess/Inspector/WebPageDebuggable.h: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.h. * UIProcess/Inspector/WebPageDebuggable.cpp: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.cpp. * UIProcess/Inspector/WebPageInspectorController.h: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.h. * UIProcess/Inspector/WebPageInspectorController.cpp: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.cpp. * UIProcess/Inspector/glib/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.h. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.cpp. * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyClient.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp. * UIProcess/Inspector/ios/WKInspectorHighlightView.h: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.h. * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.mm. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm. * UIProcess/Inspector/mac/WKInspectorViewController.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.h. * UIProcess/Inspector/mac/WKInspectorViewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.mm. * UIProcess/Inspector/mac/WKInspectorWKWebView.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.h. * UIProcess/Inspector/mac/WKInspectorWKWebView.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.mm. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm. * UIProcess/Inspector/socket/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.h. * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.h. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp. * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/RemoteWebInspectorProxyWin.cpp. * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp. * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.messages.in. * WebProcess/Inspector/RemoteWebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h. * WebProcess/Inspector/RemoteWebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp. * WebProcess/Inspector/WebInspector.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.messages.in. * WebProcess/Inspector/WebInspector.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.h. * WebProcess/Inspector/WebInspector.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.cpp. * WebProcess/Inspector/WebInspectorClient.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.h. * WebProcess/Inspector/WebInspectorClient.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp. * WebProcess/Inspector/WebInspectorInterruptDispatcher.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in. * WebProcess/Inspector/WebInspectorInterruptDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.h. * WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp. * WebProcess/Inspector/WebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in. * WebProcess/Inspector/WebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.h. * WebProcess/Inspector/WebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp. * WebProcess/Inspector/WebPageInspectorTarget.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.h. * WebProcess/Inspector/WebPageInspectorTarget.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp. * WebProcess/Inspector/WebPageInspectorTargetController.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.h. * WebProcess/Inspector/WebPageInspectorTargetController.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.h. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.cpp. * WebProcess/Inspector/gtk/WebInspectorUIGtk.cpp: Renamed from Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp. * WebProcess/Inspector/mac/WebInspectorUIMac.mm: Renamed from Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm. * WebProcess/Inspector/win/WebInspectorUIWin.mm: Renamed from Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.mm. * UIProcess/API/APIAttachment.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: Add some missing includes. Canonical link: https://commits.webkit.org/219861@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-28 01:13:27 +00:00
UIProcess/Inspector/InspectorTargetProxy.cpp
Web Inspector: rename WebInspectorProxy to WebInspectorUIProxy https://bugs.webkit.org/show_bug.cgi?id=223551 Reviewed by Devin Rousso. To improve clarity in the codebase, I'm renaming this to be consistent with it's WebProcess-side counterpart, WebInspectorUI. There are many different classes with the 'WebInspector' prefix, so it can be difficult to understand whether a class is associated with the WebInspectorUI frontend or the InspectorController backend. This fixes one of the biggest offenders. For brevity, I have elided function-level changelog entries from files that have been renamed. This is a mechanical refactoring. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * UIProcess/API/APIInspectorClient.h: (API::InspectorClient::openURLExternally): * UIProcess/API/APIUIClient.h: (API::UIClient::didAttachLocalInspector): (API::UIClient::willCloseLocalInspector): (API::UIClient::configurationForLocalInspector): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKInspector.cpp: (WKInspectorGetTypeID): * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/mac/WKInspectorPrivateMac.h: * UIProcess/API/Cocoa/_WKInspectorInternal.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController initWithConfiguration:]): * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerInternal.h: * UIProcess/API/gtk/WebKitWebInspector.cpp: (webkitWebInspectorCreate): * UIProcess/API/gtk/WebKitWebInspectorPrivate.h: * UIProcess/API/gtk/WebKitWebViewBase.cpp: * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/Automation/WebAutomationSession.cpp: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::configurationForLocalInspector): (WebKit::UIDelegate::UIClient::didAttachLocalInspector): (WebKit::UIDelegate::UIClient::willCloseLocalInspector): * UIProcess/Cocoa/WebViewImpl.mm: * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: * UIProcess/Inspector/Cocoa/InspectorDelegate.h: * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: (WebKit::InspectorDelegate::InspectorClient::openURLExternally): * UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm: * UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp: Renamed from Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp. (WebKit::RemoteWebInspectorUIProxy::RemoteWebInspectorUIProxy): (WebKit::RemoteWebInspectorUIProxy::~RemoteWebInspectorUIProxy): (WebKit::RemoteWebInspectorUIProxy::invalidate): (WebKit::RemoteWebInspectorUIProxy::setDiagnosticLoggingAvailable): (WebKit::RemoteWebInspectorUIProxy::load): (WebKit::RemoteWebInspectorUIProxy::closeFromBackend): (WebKit::RemoteWebInspectorUIProxy::closeFromCrash): (WebKit::RemoteWebInspectorUIProxy::show): (WebKit::RemoteWebInspectorUIProxy::sendMessageToFrontend): (WebKit::RemoteWebInspectorUIProxy::frontendLoaded): (WebKit::RemoteWebInspectorUIProxy::frontendDidClose): (WebKit::RemoteWebInspectorUIProxy::reopen): (WebKit::RemoteWebInspectorUIProxy::resetState): (WebKit::RemoteWebInspectorUIProxy::bringToFront): (WebKit::RemoteWebInspectorUIProxy::save): (WebKit::RemoteWebInspectorUIProxy::append): (WebKit::RemoteWebInspectorUIProxy::setSheetRect): (WebKit::RemoteWebInspectorUIProxy::setForcedAppearance): (WebKit::RemoteWebInspectorUIProxy::startWindowDrag): (WebKit::RemoteWebInspectorUIProxy::openURLExternally): (WebKit::RemoteWebInspectorUIProxy::showCertificate): (WebKit::RemoteWebInspectorUIProxy::sendMessageToBackend): (WebKit::RemoteWebInspectorUIProxy::createFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::closeFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformCreateFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformResetState): (WebKit::RemoteWebInspectorUIProxy::platformBringToFront): (WebKit::RemoteWebInspectorUIProxy::platformSave): (WebKit::RemoteWebInspectorUIProxy::platformAppend): (WebKit::RemoteWebInspectorUIProxy::platformSetSheetRect): (WebKit::RemoteWebInspectorUIProxy::platformSetForcedAppearance): (WebKit::RemoteWebInspectorUIProxy::platformStartWindowDrag): (WebKit::RemoteWebInspectorUIProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorUIProxy::platformShowCertificate): (WebKit::RemoteWebInspectorUIProxy::platformCloseFrontendPageAndWindow): * UIProcess/Inspector/RemoteWebInspectorUIProxy.h: Renamed from Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.h. (WebKit::RemoteWebInspectorUIProxyClient::~RemoteWebInspectorUIProxyClient): (WebKit::RemoteWebInspectorUIProxy::create): (WebKit::RemoteWebInspectorUIProxy::setClient): (WebKit::RemoteWebInspectorUIProxy::isUnderTest const): (WebKit::RemoteWebInspectorUIProxy::extensionController const): (WebKit::RemoteWebInspectorUIProxy::window const): (WebKit::RemoteWebInspectorUIProxy::sheetRect const): * UIProcess/Inspector/RemoteWebInspectorUIProxy.messages.in: Renamed from Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.messages.in. * UIProcess/Inspector/WebInspectorUIProxy.cpp: Renamed from Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp. (WebKit::WebInspectorUIProxy::WebInspectorUIProxy): (WebKit::WebInspectorUIProxy::~WebInspectorUIProxy): (WebKit::WebInspectorUIProxy::setInspectorClient): (WebKit::WebInspectorUIProxy::inspectionLevel const): (WebKit::WebInspectorUIProxy::inspectorPagePreferences const): (WebKit::WebInspectorUIProxy::invalidate): (WebKit::WebInspectorUIProxy::sendMessageToFrontend): (WebKit::WebInspectorUIProxy::isFront): (WebKit::WebInspectorUIProxy::connect): (WebKit::WebInspectorUIProxy::show): (WebKit::WebInspectorUIProxy::hide): (WebKit::WebInspectorUIProxy::close): (WebKit::WebInspectorUIProxy::closeForCrash): (WebKit::WebInspectorUIProxy::reopen): (WebKit::WebInspectorUIProxy::resetState): (WebKit::WebInspectorUIProxy::reset): (WebKit::WebInspectorUIProxy::updateForNewPageProcess): (WebKit::WebInspectorUIProxy::setFrontendConnection): (WebKit::WebInspectorUIProxy::showConsole): (WebKit::WebInspectorUIProxy::showResources): (WebKit::WebInspectorUIProxy::showMainResourceForFrame): (WebKit::WebInspectorUIProxy::attachBottom): (WebKit::WebInspectorUIProxy::attachRight): (WebKit::WebInspectorUIProxy::attachLeft): (WebKit::WebInspectorUIProxy::attach): (WebKit::WebInspectorUIProxy::detach): (WebKit::WebInspectorUIProxy::setAttachedWindowHeight): (WebKit::WebInspectorUIProxy::setAttachedWindowWidth): (WebKit::WebInspectorUIProxy::setSheetRect): (WebKit::WebInspectorUIProxy::startWindowDrag): (WebKit::WebInspectorUIProxy::togglePageProfiling): (WebKit::WebInspectorUIProxy::toggleElementSelection): (WebKit::WebInspectorUIProxy::isMainOrTestInspectorPage): (WebKit::WebInspectorUIProxy::createFrontendPage): (WebKit::WebInspectorUIProxy::openLocalInspectorFrontend): (WebKit::WebInspectorUIProxy::open): (WebKit::WebInspectorUIProxy::didClose): (WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow): (WebKit::WebInspectorUIProxy::sendMessageToBackend): (WebKit::WebInspectorUIProxy::frontendLoaded): (WebKit::WebInspectorUIProxy::bringToFront): (WebKit::WebInspectorUIProxy::bringInspectedPageToFront): (WebKit::WebInspectorUIProxy::attachAvailabilityChanged): (WebKit::WebInspectorUIProxy::setForcedAppearance): (WebKit::WebInspectorUIProxy::openURLExternally): (WebKit::WebInspectorUIProxy::inspectedURLChanged): (WebKit::WebInspectorUIProxy::showCertificate): (WebKit::WebInspectorUIProxy::elementSelectionChanged): (WebKit::WebInspectorUIProxy::timelineRecordingChanged): (WebKit::WebInspectorUIProxy::setDeveloperPreferenceOverride): (WebKit::WebInspectorUIProxy::setDiagnosticLoggingAvailable): (WebKit::WebInspectorUIProxy::save): (WebKit::WebInspectorUIProxy::append): (WebKit::WebInspectorUIProxy::shouldOpenAttached): (WebKit::WebInspectorUIProxy::evaluateInFrontendForTesting): (WebKit::WebInspectorUIProxy::platformCreateFrontendPage): (WebKit::WebInspectorUIProxy::platformCreateFrontendWindow): (WebKit::WebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::WebInspectorUIProxy::platformDidCloseForCrash): (WebKit::WebInspectorUIProxy::platformInvalidate): (WebKit::WebInspectorUIProxy::platformResetState): (WebKit::WebInspectorUIProxy::platformBringToFront): (WebKit::WebInspectorUIProxy::platformBringInspectedPageToFront): (WebKit::WebInspectorUIProxy::platformHide): (WebKit::WebInspectorUIProxy::platformIsFront): (WebKit::WebInspectorUIProxy::platformSetForcedAppearance): (WebKit::WebInspectorUIProxy::platformInspectedURLChanged): (WebKit::WebInspectorUIProxy::platformShowCertificate): (WebKit::WebInspectorUIProxy::platformSave): (WebKit::WebInspectorUIProxy::platformAppend): (WebKit::WebInspectorUIProxy::platformInspectedWindowHeight): (WebKit::WebInspectorUIProxy::platformInspectedWindowWidth): (WebKit::WebInspectorUIProxy::platformAttach): (WebKit::WebInspectorUIProxy::platformDetach): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowHeight): (WebKit::WebInspectorUIProxy::platformSetSheetRect): (WebKit::WebInspectorUIProxy::platformStartWindowDrag): (WebKit::WebInspectorUIProxy::inspectorPageURL): (WebKit::WebInspectorUIProxy::inspectorTestPageURL): (WebKit::WebInspectorUIProxy::infoForLocalDebuggable): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowWidth): (WebKit::WebInspectorUIProxy::platformAttachAvailabilityChanged): * UIProcess/Inspector/WebInspectorUIProxy.h: Renamed from Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h. (WebKit::WebInspectorUIProxy::create): (WebKit::WebInspectorUIProxy::inspectorClient): (WebKit::WebInspectorUIProxy::inspectedPage const): (WebKit::WebInspectorUIProxy::inspectorPage const): (WebKit::WebInspectorUIProxy::extensionController const): (WebKit::WebInspectorUIProxy::isConnected const): (WebKit::WebInspectorUIProxy::isVisible const): (WebKit::WebInspectorUIProxy::inspectorWindow const): (WebKit::WebInspectorUIProxy::sheetRect const): (WebKit::WebInspectorUIProxy::inspectorView const): (WebKit::WebInspectorUIProxy::attachmentSide const): (WebKit::WebInspectorUIProxy::isAttached const): (WebKit::WebInspectorUIProxy::isProfilingPage const): (WebKit::WebInspectorUIProxy::isElementSelectionActive const): (WebKit::WebInspectorUIProxy::isUnderTest const): (WebKit::WebInspectorUIProxy::platformCanAttach): (WebKit::WebInspectorUIProxy::canAttach const): * UIProcess/Inspector/WebInspectorUIProxy.messages.in: Renamed from Source/WebKit/UIProcess/Inspector/WebInspectorProxy.messages.in. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: * UIProcess/Inspector/glib/RemoteInspectorClient.h: * UIProcess/Inspector/gtk/RemoteWebInspectorUIProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp. (WebKit::RemoteWebInspectorUIProxy::updateWindowTitle): (WebKit::remoteInspectorViewDestroyed): (WebKit::RemoteWebInspectorUIProxy::platformCreateFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformResetState): (WebKit::RemoteWebInspectorUIProxy::platformBringToFront): (WebKit::remoteFileReplaceContentsCallback): (WebKit::RemoteWebInspectorUIProxy::platformSave): (WebKit::RemoteWebInspectorUIProxy::platformAppend): (WebKit::RemoteWebInspectorUIProxy::platformSetSheetRect): (WebKit::RemoteWebInspectorUIProxy::platformSetForcedAppearance): (WebKit::RemoteWebInspectorUIProxy::platformStartWindowDrag): (WebKit::RemoteWebInspectorUIProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorUIProxy::platformShowCertificate): * UIProcess/Inspector/gtk/WebInspectorUIProxyClient.h: Renamed from Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyClient.h. * UIProcess/Inspector/gtk/WebInspectorUIProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp. (WebKit::inspectorViewDestroyed): (WebKit::WebInspectorUIProxy::setClient): (WebKit::WebInspectorUIProxy::updateInspectorWindowTitle const): (WebKit::exceededDatabaseQuota): (WebKit::webProcessDidCrash): (WebKit::decidePolicyForNavigationAction): (WebKit::getContextMenuFromProposedMenu): (WebKit::inspectorWebsiteDataStore): (WebKit::WebInspectorUIProxy::platformCreateFrontendPage): (WebKit::WebInspectorUIProxy::platformCreateFrontendWindow): (WebKit::WebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::WebInspectorUIProxy::platformDidCloseForCrash): (WebKit::WebInspectorUIProxy::platformInvalidate): (WebKit::WebInspectorUIProxy::platformHide): (WebKit::WebInspectorUIProxy::platformResetState): (WebKit::WebInspectorUIProxy::platformBringToFront): (WebKit::WebInspectorUIProxy::platformBringInspectedPageToFront): (WebKit::WebInspectorUIProxy::platformIsFront): (WebKit::WebInspectorUIProxy::platformSetForcedAppearance): (WebKit::WebInspectorUIProxy::platformInspectedURLChanged): (WebKit::WebInspectorUIProxy::platformShowCertificate): (WebKit::WebInspectorUIProxy::inspectorPageURL): (WebKit::WebInspectorUIProxy::inspectorTestPageURL): (WebKit::WebInspectorUIProxy::infoForLocalDebuggable): (WebKit::WebInspectorUIProxy::platformInspectedWindowHeight): (WebKit::WebInspectorUIProxy::platformInspectedWindowWidth): (WebKit::WebInspectorUIProxy::platformAttach): (WebKit::WebInspectorUIProxy::platformDetach): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowHeight): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowWidth): (WebKit::WebInspectorUIProxy::platformSetSheetRect): (WebKit::WebInspectorUIProxy::platformStartWindowDrag): (WebKit::fileReplaceContentsCallback): (WebKit::WebInspectorUIProxy::platformSave): (WebKit::WebInspectorUIProxy::platformAppend): (WebKit::WebInspectorUIProxy::platformAttachAvailabilityChanged): * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: (webkitInspectorWindowNew): * UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm: Renamed from Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm. (-[WKRemoteWebInspectorUIProxyObjCAdapter window:willPositionSheet:usingRect:]): (-[WKRemoteWebInspectorUIProxyObjCAdapter initWithRemoteWebInspectorUIProxy:]): (-[WKRemoteWebInspectorUIProxyObjCAdapter inspectorWKWebViewDidBecomeActive:]): (-[WKRemoteWebInspectorUIProxyObjCAdapter inspectorViewControllerInspectorDidCrash:]): (-[WKRemoteWebInspectorUIProxyObjCAdapter inspectorViewControllerInspectorIsUnderTest:]): (WebKit::RemoteWebInspectorUIProxy::webView const): (WebKit::RemoteWebInspectorUIProxy::didBecomeActive): (WebKit::RemoteWebInspectorUIProxy::platformCreateFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformResetState): (WebKit::RemoteWebInspectorUIProxy::platformBringToFront): (WebKit::RemoteWebInspectorUIProxy::platformSave): (WebKit::RemoteWebInspectorUIProxy::platformAppend): (WebKit::RemoteWebInspectorUIProxy::platformSetSheetRect): (WebKit::RemoteWebInspectorUIProxy::platformSetForcedAppearance): (WebKit::RemoteWebInspectorUIProxy::platformStartWindowDrag): (WebKit::RemoteWebInspectorUIProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorUIProxy::platformShowCertificate): * UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController webView]): * UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm: Renamed from Source/WebKit/UIProcess/Inspector/mac/WebInspectorProxyMac.mm. (-[WKWebInspectorUIProxyObjCAdapter inspectorRef]): (-[WKWebInspectorUIProxyObjCAdapter inspector]): (-[WKWebInspectorUIProxyObjCAdapter initWithWebInspectorUIProxy:]): (-[WKWebInspectorUIProxyObjCAdapter invalidate]): (-[WKWebInspectorUIProxyObjCAdapter window:willPositionSheet:usingRect:]): (-[WKWebInspectorUIProxyObjCAdapter windowDidMove:]): (-[WKWebInspectorUIProxyObjCAdapter windowDidResize:]): (-[WKWebInspectorUIProxyObjCAdapter windowWillClose:]): (-[WKWebInspectorUIProxyObjCAdapter windowDidEnterFullScreen:]): (-[WKWebInspectorUIProxyObjCAdapter windowDidExitFullScreen:]): (-[WKWebInspectorUIProxyObjCAdapter inspectedViewFrameDidChange:]): (-[WKWebInspectorUIProxyObjCAdapter observeValueForKeyPath:ofObject:change:context:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewControllerDidBecomeActive:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewControllerInspectorDidCrash:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewControllerInspectorIsUnderTest:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewController:willMoveToWindow:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewControllerDidMoveToWindow:]): (-[WKWebInspectorUIProxyObjCAdapter inspectorViewController:openURLExternally:]): (WebKit::WebInspectorUIProxy::didBecomeActive): (WebKit::WebInspectorUIProxy::attachmentViewDidChange): (WebKit::WebInspectorUIProxy::attachmentWillMoveFromWindow): (WebKit::WebInspectorUIProxy::attachmentDidMoveToWindow): (WebKit::WebInspectorUIProxy::updateInspectorWindowTitle const): (WebKit::WebInspectorUIProxy::createFrontendWindow): (WebKit::WebInspectorUIProxy::platformCreateFrontendPage): (WebKit::WebInspectorUIProxy::platformCreateFrontendWindow): (WebKit::WebInspectorUIProxy::closeFrontendPage): (WebKit::WebInspectorUIProxy::closeFrontendAfterInactivityTimerFired): (WebKit::WebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::WebInspectorUIProxy::platformDidCloseForCrash): (WebKit::WebInspectorUIProxy::platformInvalidate): (WebKit::WebInspectorUIProxy::platformHide): (WebKit::WebInspectorUIProxy::platformResetState): (WebKit::WebInspectorUIProxy::platformBringToFront): (WebKit::WebInspectorUIProxy::platformBringInspectedPageToFront): (WebKit::WebInspectorUIProxy::platformIsFront): (WebKit::WebInspectorUIProxy::platformCanAttach): (WebKit::WebInspectorUIProxy::platformAttachAvailabilityChanged): (WebKit::WebInspectorUIProxy::platformSetForcedAppearance): (WebKit::WebInspectorUIProxy::platformInspectedURLChanged): (WebKit::WebInspectorUIProxy::platformShowCertificate): (WebKit::WebInspectorUIProxy::platformSave): (WebKit::WebInspectorUIProxy::platformAppend): (WebKit::WebInspectorUIProxy::windowFrameDidChange): (WebKit::WebInspectorUIProxy::windowFullScreenDidChange): (WebKit::WebInspectorUIProxy::inspectedViewFrameDidChange): (WebKit::WebInspectorUIProxy::platformInspectedWindowHeight): (WebKit::WebInspectorUIProxy::platformInspectedWindowWidth): (WebKit::WebInspectorUIProxy::platformAttach): (WebKit::WebInspectorUIProxy::platformDetach): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowHeight): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowWidth): (WebKit::WebInspectorUIProxy::platformSetSheetRect): (WebKit::WebInspectorUIProxy::platformStartWindowDrag): (WebKit::WebInspectorUIProxy::inspectorPageURL): (WebKit::WebInspectorUIProxy::inspectorTestPageURL): (WebKit::systemVersionPlist): (WebKit::WebInspectorUIProxy::infoForLocalDebuggable): (WebKit::WebInspectorUIProxy::applyForcedAppearance): * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: * UIProcess/Inspector/win/RemoteWebInspectorUIProxyWin.cpp: Renamed from Source/WebKit/UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp. (WebKit::RemoteWebInspectorUIProxy::WndProc): (WebKit::registerWindowClass): (WebKit::RemoteWebInspectorUIProxy::sizeChange): (WebKit::RemoteWebInspectorUIProxy::onClose): (WebKit::RemoteWebInspectorUIProxy::platformCreateFrontendPageAndWindow): (WebKit::RemoteWebInspectorUIProxy::platformResetState): (WebKit::RemoteWebInspectorUIProxy::platformBringToFront): (WebKit::RemoteWebInspectorUIProxy::platformSave): (WebKit::RemoteWebInspectorUIProxy::platformAppend): (WebKit::RemoteWebInspectorUIProxy::platformSetSheetRect): (WebKit::RemoteWebInspectorUIProxy::platformSetForcedAppearance): (WebKit::RemoteWebInspectorUIProxy::platformStartWindowDrag): (WebKit::RemoteWebInspectorUIProxy::platformOpenURLExternally): (WebKit::RemoteWebInspectorUIProxy::platformShowCertificate): (WebKit::RemoteWebInspectorUIProxy::platformCloseFrontendPageAndWindow): * UIProcess/Inspector/win/WebInspectorUIProxyWin.cpp: Renamed from Source/WebKit/UIProcess/Inspector/win/WebInspectorProxyWin.cpp. (WebKit::getInspectedWindowInfo): (WebKit::WebInspectorUIProxy::windowReceivedMessage): (WebKit::WebInspectorUIProxy::wndProc): (WebKit::WebInspectorUIProxy::registerWindowClass): (WebKit::decidePolicyForNavigationAction): (WebKit::webProcessDidCrash): (WebKit::WebInspectorUIProxy::platformCreateFrontendPage): (WebKit::WebInspectorUIProxy::platformCloseFrontendPageAndWindow): (WebKit::WebInspectorUIProxy::inspectorPageURL): (WebKit::WebInspectorUIProxy::inspectorTestPageURL): (WebKit::WebInspectorUIProxy::infoForLocalDebuggable): (WebKit::WebInspectorUIProxy::platformInspectedWindowHeight): (WebKit::WebInspectorUIProxy::platformInspectedWindowWidth): (WebKit::WebInspectorUIProxy::platformAttach): (WebKit::WebInspectorUIProxy::platformDetach): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowHeight): (WebKit::WebInspectorUIProxy::platformSetAttachedWindowWidth): (WebKit::WebInspectorUIProxy::platformSetSheetRect): (WebKit::WebInspectorUIProxy::platformIsFront): (WebKit::WebInspectorUIProxy::platformHide): (WebKit::WebInspectorUIProxy::platformResetState): (WebKit::WebInspectorUIProxy::platformBringToFront): (WebKit::WebInspectorUIProxy::platformBringInspectedPageToFront): (WebKit::WebInspectorUIProxy::platformSetForcedAppearance): (WebKit::WebInspectorUIProxy::platformInspectedURLChanged): (WebKit::WebInspectorUIProxy::platformShowCertificate): (WebKit::WebInspectorUIProxy::platformSave): (WebKit::WebInspectorUIProxy::platformAppend): (WebKit::WebInspectorUIProxy::platformAttachAvailabilityChanged): (WebKit::WebInspectorUIProxy::platformCreateFrontendWindow): (WebKit::WebInspectorUIProxy::platformDidCloseForCrash): (WebKit::WebInspectorUIProxy::platformInvalidate): (WebKit::WebInspectorUIProxy::platformStartWindowDrag): * UIProcess/WebPageProxy.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPageProxy::inspector const): * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::sendMessageToBackend): (WebKit::RemoteWebInspectorUI::frontendLoaded): (WebKit::RemoteWebInspectorUI::changeSheetRect): (WebKit::RemoteWebInspectorUI::setForcedAppearance): (WebKit::RemoteWebInspectorUI::startWindowDrag): (WebKit::RemoteWebInspectorUI::bringToFront): (WebKit::RemoteWebInspectorUI::closeWindow): (WebKit::RemoteWebInspectorUI::reopen): (WebKit::RemoteWebInspectorUI::resetState): (WebKit::RemoteWebInspectorUI::openURLExternally): (WebKit::RemoteWebInspectorUI::save): (WebKit::RemoteWebInspectorUI::append): (WebKit::RemoteWebInspectorUI::showCertificate): * WebProcess/Inspector/WebInspector.cpp: (WebKit::WebInspector::openLocalInspectorFrontend): (WebKit::WebInspector::closeFrontendConnection): (WebKit::WebInspector::bringToFront): (WebKit::WebInspector::elementSelectionChanged): (WebKit::WebInspector::timelineRecordingChanged): (WebKit::WebInspector::setDeveloperPreferenceOverride): (WebKit::WebInspector::updateDockingAvailability): * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::updateConnection): (WebKit::WebInspectorUI::frontendLoaded): (WebKit::WebInspectorUI::startWindowDrag): (WebKit::WebInspectorUI::bringToFront): (WebKit::WebInspectorUI::closeWindow): (WebKit::WebInspectorUI::reopen): (WebKit::WebInspectorUI::resetState): (WebKit::WebInspectorUI::setForcedAppearance): (WebKit::WebInspectorUI::requestSetDockSide): (WebKit::WebInspectorUI::changeAttachedWindowHeight): (WebKit::WebInspectorUI::changeAttachedWindowWidth): (WebKit::WebInspectorUI::changeSheetRect): (WebKit::WebInspectorUI::openURLExternally): (WebKit::WebInspectorUI::save): (WebKit::WebInspectorUI::append): (WebKit::WebInspectorUI::inspectedURLChanged): (WebKit::WebInspectorUI::showCertificate): (WebKit::WebInspectorUI::sendMessageToBackend): Canonical link: https://commits.webkit.org/235613@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 23:26:01 +00:00
UIProcess/Inspector/RemoteWebInspectorUIProxy.cpp
UIProcess/Inspector/WebInspectorUIProxy.cpp
[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing https://bugs.webkit.org/show_bug.cgi?id=217783 <rdar://problem/69968787> Reviewed by Devin Rousso. Source/WebCore: * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: In order for WebInspectorUIExtensionController to work with remote and local inspectors, it stores a weak pointer the inspector's InspectorFrontendClient. Expose the frontend's page so that the frontend API dispatcher can dispatch to it. Source/WebInspectorUI: * UserInterface/Main.html: Add new files. * UserInterface/Controllers/AppControllerBase.js: (WI.AppControllerBase): (WI.AppControllerBase.prototype.get extensionController): Hang the extension controller off of the global singleton, as there can only be one. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype.registerExtension): (WI.WebInspectorExtensionController.prototype.unregisterExtension): Added. For now, just keep the UUIDs in a map and log the result. * UserInterface/Models/WebInspectorExtension.js: (WI.WebInspectorExtension): (WI.WebInspectorExtension.prototype.get extensionID): (WI.WebInspectorExtension.prototype.get displayName): Added. This is a data object for now. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.loadCompleted): (InspectorFrontendAPI.registerExtension): (InspectorFrontendAPI.unregisterExtension): Added. Forward invocations to the extension controller. Source/WebKit: _WKInspectorExtension is new SPI that represents a Web Extension that uses the 'devtools' API to interact with Web Inspector. An extension is associated with its _WKInspectorExtensionHost. A WebKit client that supports Web Extensions can use this class to implement 'devtools' extension APIs. Add _WKInspectorExtensionHost methods to register and unregister an extension. Add plumbing so that the extension in registered in the frontend with WI.InspectorExtensionController. Later patches will flesh out the needed functionality to implement rest of the 'devtools' API. * Sources.txt: * SourcesCocoa.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * WebKit.xcodeproj/project.pbxproj: Add new files. * Scripts/webkit/messages.py: If a message includes InspectorExtensionError, then generate an include for InspectorExtensionTypes.h where it is declared. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): New API object type. * Shared/InspectorExtensionTypes.h: Added error code enum and useful type aliases. * Shared/InspectorExtensionTypes.cpp: (WebKit::inspectorExtensionErrorToString): * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::create): (API::InspectorExtension::InspectorExtension): (API::InspectorExtension::~InspectorExtension): Added. This is a placeholder object that's used for the wrapper system, since we don't have single C++ objects for each extension to back the API object. * UIProcess/API/Cocoa/_WKInspector.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): (-[_WKInspector unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension initWithIdentifier:]): (-[_WKInspectorExtension dealloc]): (-[_WKInspectorExtension _apiObject]): (-[_WKInspectorExtension extensionID]): Added. This is a data object that's also used as a token to unregister the extension. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Add new SPI. * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): (-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Add FrontendLoaded. (WebKit::RemoteWebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::frontendLoaded): (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow): Set up the extension controller object after the frontend has been created. Hook up the FrontendLoaded event sent from Inspector web process so that the extension controller can be notified of when it's safe to message the frontend. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createFrontendPage): (WebKit::WebInspectorProxy::closeFrontendPageAndWindow): (WebKit::WebInspectorProxy::frontendLoaded): Set up the extension controller object after the frontend has been created. * UIProcess/Inspector/WebInspectorProxy.h: (WebKit::WebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: Added. (WebKit::WebInspectorUIExtensionControllerProxy::WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::whenFrontendHasLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): Added. Forward API requests to the Web Inspector's web process to be evaluated in the frontend. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand): Add a more generic way to encode values to be passed as arguments to InspectorFrontendAPI.dispatch. * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): (WebKit::WebInspectorUI::closeWindow): * WebProcess/Inspector/WebInspectorUI.h: (WebKit::WebInspectorUI::frontendPage const): Added. (WebKit::WebInspectorUI::frontendAPIDispatcher): Added. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Added. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: Added. (WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::registerExtension): (WebKit::WebInspectorUIExtensionController::unregisterExtension): (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult): Handle incoming messages by forwarding the associated command to WI.WebExtensionController via InspectorFrontendAPI evaluations. * UIProcess/API/Cocoa/_WKUserStyleSheet.h: * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Fallout from unified build chunking shifts. * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticatorInternal::getExistingCredentials): (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): Fallout from unified build chunking shifts, but more. Tools: Add API tests to exercise new methods of the _WKInspectorExtensionHost protocol. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: New test file. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: Added. (resetGlobalState): (-[UIDelegateForTestingInspectorExtensionHost _webView:didAttachLocalInspector:]): (TEST): Canonical link: https://commits.webkit.org/231480@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-11 21:44:38 +00:00
UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp
Web Inspector: consolidate UIProcess/WebProcess files into Inspector folders https://bugs.webkit.org/show_bug.cgi?id=206721 Reviewed by Alex Christensen and Don Olmstead. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/InspectorTargetProxy.h: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.h. * UIProcess/Inspector/InspectorTargetProxy.cpp: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.cpp. * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.messages.in. * UIProcess/Inspector/RemoteWebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.h. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.messages.in. * UIProcess/Inspector/WebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.h. * UIProcess/Inspector/WebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorUtilities.h: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.h. * UIProcess/Inspector/WebInspectorUtilities.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.cpp. * UIProcess/Inspector/WebPageDebuggable.h: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.h. * UIProcess/Inspector/WebPageDebuggable.cpp: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.cpp. * UIProcess/Inspector/WebPageInspectorController.h: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.h. * UIProcess/Inspector/WebPageInspectorController.cpp: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.cpp. * UIProcess/Inspector/glib/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.h. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.cpp. * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyClient.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp. * UIProcess/Inspector/ios/WKInspectorHighlightView.h: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.h. * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.mm. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm. * UIProcess/Inspector/mac/WKInspectorViewController.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.h. * UIProcess/Inspector/mac/WKInspectorViewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.mm. * UIProcess/Inspector/mac/WKInspectorWKWebView.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.h. * UIProcess/Inspector/mac/WKInspectorWKWebView.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.mm. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm. * UIProcess/Inspector/socket/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.h. * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.h. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp. * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/RemoteWebInspectorProxyWin.cpp. * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp. * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.messages.in. * WebProcess/Inspector/RemoteWebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h. * WebProcess/Inspector/RemoteWebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp. * WebProcess/Inspector/WebInspector.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.messages.in. * WebProcess/Inspector/WebInspector.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.h. * WebProcess/Inspector/WebInspector.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.cpp. * WebProcess/Inspector/WebInspectorClient.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.h. * WebProcess/Inspector/WebInspectorClient.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp. * WebProcess/Inspector/WebInspectorInterruptDispatcher.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in. * WebProcess/Inspector/WebInspectorInterruptDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.h. * WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp. * WebProcess/Inspector/WebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in. * WebProcess/Inspector/WebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.h. * WebProcess/Inspector/WebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp. * WebProcess/Inspector/WebPageInspectorTarget.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.h. * WebProcess/Inspector/WebPageInspectorTarget.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp. * WebProcess/Inspector/WebPageInspectorTargetController.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.h. * WebProcess/Inspector/WebPageInspectorTargetController.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.h. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.cpp. * WebProcess/Inspector/gtk/WebInspectorUIGtk.cpp: Renamed from Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp. * WebProcess/Inspector/mac/WebInspectorUIMac.mm: Renamed from Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm. * WebProcess/Inspector/win/WebInspectorUIWin.mm: Renamed from Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.mm. * UIProcess/API/APIAttachment.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: Add some missing includes. Canonical link: https://commits.webkit.org/219861@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-28 01:13:27 +00:00
UIProcess/Inspector/WebInspectorUtilities.cpp
UIProcess/Inspector/WebPageDebuggable.cpp
UIProcess/Inspector/WebPageInspectorController.cpp
Web Inspector: safari app extension isolated worlds and injected files use the extension's identifier instead of its name https://bugs.webkit.org/show_bug.cgi?id=206911 <rdar://problem/58026635> Reviewed by Brian Burg. Source/JavaScriptCore: * inspector/protocol/Browser.json: Added. Add a `Browser` agent that can communicate with the inspected page's containing browser. It lives in the UIProcess alongside the `Target` agent (meaning there should only be one per debuggable rather than one per target) and as such is not routed through the `Target` agent. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: Source/WebCore: * Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Drive-by: add missing include. Source/WebInspectorUI: * UserInterface/Controllers/BrowserManager.js: Added. (WI.BrowserManager): (WI.BrowserManager.prototype.initializeTarget): (WI.BrowserManager.prototype.enable): (WI.BrowserManager.prototype.disable): (WI.BrowserManager.prototype.isExtensionScheme): (WI.BrowserManager.prototype.extensionNameForId): (WI.BrowserManager.prototype.extensionNameForURL): * UserInterface/Protocol/BrowserObserver.js: Added. (WI.BrowserObserver.prototype.extensionsEnabled): (WI.BrowserObserver.prototype.extensionsDisabled): * UserInterface/Protocol/Target.js: (WI.Target.prototype.get BrowserAgent): Added. * UserInterface/Base/Main.js: (WI.loaded): * UserInterface/Main.html: * UserInterface/Test/Test.js: (WI.loaded): * UserInterface/Test.html: Add an observer and manager for the `Browser` domain. * UserInterface/Protocol/MultiplexingBackendTarget.js: (WI.MultiplexingBackendTarget): (WI.MultiplexingBackendTarget.prototype.initialize): * UserInterface/Controllers/TargetManager.js: (WI.TargetManager.prototype.initializeTarget): Added. The `Browser` agent lives in the UIProcess alongside the `Target` agent (meaning there should only be one per debuggable rather than one per target) and as such is not routed through the `Target` agent. * UserInterface/Views/QuickConsole.js: (WI.QuickConsole.prototype._displayNameForExecutionContext): Attempt to match the execution context name against any known extension identifier, and use the extension's display name if one is found. * UserInterface/Base/URLUtilities.js: (WI.displayNameForHost): Attempt to match the host against any known extension identifier, and use the extension's display name if one is found. * UserInterface/Views/SourcesNavigationSidebarPanel.js: (WI.SourcesNavigationSidebarPanel.prototype._addStyleSheet): (WI.SourcesNavigationSidebarPanel.prototype._addScript): * UserInterface/Base/Utilities.js: (isWebKitExtensionScheme): Deleted. * .eslintrc: Use `WI.BrowserManager.prototype.isExtensionScheme` instead of the global function. * UserInterface/Models/SourceCode.js: (WI.SourceCode): (WI.SourceCode.prototype.get url): Added. (WI.SourceCode.prototype.get urlComponents): Added. * UserInterface/Models/CSSStyleSheet.js: (WI.CSSStyleSheet): (WI.CSSStyleSheet.prototype.get injected): (WI.CSSStyleSheet.prototype.get url): Deleted. (WI.CSSStyleSheet.prototype.get urlComponents): Deleted. * UserInterface/Models/Resource.js: (WI.Resource): (WI.Resource.prototype.get url): Deleted. (WI.Resource.prototype.get urlComponents): Deleted. * UserInterface/Models/Script.js: (WI.Script): (WI.Script.prototype.get url): Deleted. (WI.Script.prototype.get urlComponents): Deleted. All subclasses of `WI.SourceCode` have separate `get url` and `get urlComponents` functions, so unify them in the common superclass so that it's guaranteed to exist. Source/WebKit: * UIProcess/Inspector/WebPageInspectorController.h: (WebKit::WebPageInspectorController::enabledInspectorBrowserAgent const): Added. (WebKit::WebPageInspectorController::setEnabledInspectorBrowserAgent): Added. * UIProcess/Inspector/WebPageInspectorController.cpp: (WebKit::WebPageInspectorController::WebPageInspectorController): (WebKit::WebPageInspectorController::connectFrontend): (WebKit::WebPageInspectorController::webPageAgentContext): Added. (WebKit::WebPageInspectorController::createLazyAgents): Added. * UIProcess/Inspector/WebPageInspectorAgentBase.h: Added. (WebKit::InspectorAgentBase::InspectorAgentBase): * UIProcess/Inspector/Agents/InspectorBrowserAgent.h: Added. * UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp: Added. (WebKit::InspectorBrowserAgent::InspectorBrowserAgent): (WebKit::InspectorBrowserAgent::enabled): (WebKit::InspectorBrowserAgent::didCreateFrontendAndBackend): (WebKit::InspectorBrowserAgent::willDestroyFrontendAndBackend): (WebKit::InspectorBrowserAgent::enable): (WebKit::InspectorBrowserAgent::disable): (WebKit::InspectorBrowserAgent::extensionsEnabled): (WebKit::InspectorBrowserAgent::extensionsDisabled): Add a `Browser` agent that can communicate with the inspected page's containing browser. It lives in the UIProcess alongside the `Target` agent (meaning there should only be one per debuggable rather than one per target) and as such is not routed through the `Target` agent. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::inspectorClient): Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): * UIProcess/API/Cocoa/WKWebViewInternal.h: * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _initializeWithConfiguration:]): (-[WKWebView _inspectorDelegate]): Added. (-[WKWebView _setInspectorDelegate:]): Added. (WebKit::WebPageProxy::setInspectorClient): Added. * UIProcess/Inspector/Cocoa/InspectorDelegate.h: Added. * UIProcess/Inspector/Cocoa/InspectorDelegate.mm: Added. (WebKit::InspectorDelegate::InspectorDelegate): (WebKit::InspectorDelegate::createInspectorClient): (WebKit::InspectorDelegate::delegate): (WebKit::InspectorDelegate::setDelegate): (WebKit::InspectorDelegate::InspectorClient): (WebKit::InspectorDelegate::InspectorClient::didAttachLocalInspector): (WebKit::InspectorDelegate::InspectorClient::browserDomainEnabled): (WebKit::InspectorDelegate::InspectorClient::browserDomainDisabled): * UIProcess/API/APIInspectorClient.h: Added. (API::InspectorClient::didAttachLocalInspector): (API::InspectorClient::browserDomainEnabled): (API::InspectorClient::browserDomainDisabled): * UIProcess/API/Cocoa/_WKInspectorDelegate.h: Added. Introduce an inspector delegate SPI for communicating information related to Web Inspector. * UIProcess/API/Cocoa/_WKInspectorPrivate.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector _browserExtensionsEnabled:]): Added. (-[_WKInspector _browserExtensionsDisabled:]): Added. * UIProcess/Inspector/WebInspectorProxy.h: * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::openLocalInspectorFrontend): (WebKit::WebInspectorProxy::browserExtensionsEnabled): Added. (WebKit::WebInspectorProxy::browserExtensionsDisabled): Added. Add SPI for when extensions are enabled/disabled so that Web Inspector can update. * UIProcess/Cocoa/UIDelegate.h: * UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::setDelegate): (WebKit::UIDelegate::UIClient::didAttachInspector): Deleted. * UIProcess/API/APIUIClient.h: (API::UIClient::didAttachInspector): Deleted. * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Move `_webView:didAttachInspector:` from `WKUIDelegatePrivate` to `_WKInspectorDelegate`. * CMakeLists.txt: * DerivedSources.make: * PlatformMac.cmake: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/WebAuthentication/Cocoa/LocalConnection.h: Drive-by: add missing include. Source/WTF: * wtf/HashSet.h: (WTF::HashSet::reserveInitialCapacity): Added. Tools: * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::TEST): Add test for `WTF::HashSet::reserveInitialCapacity`. * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Actually check the value of `WTF::HashMap::capacity`. * TestWebKitAPI/Tests/WebKitCocoa/_WKInspectorDelegate.mm: Added. (-[InspectorDelegate _webView:didAttachInspector:]) (-[InspectorDelegate _webView:browserDomainEnabledForInspector:]) (-[InspectorDelegate _webView:browserDomainDisabledForInspector:]) (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (-[InspectorDelegate _webView:didAttachInspector:]): Deleted. (TestWebKitAPI::TEST): Deleted. Canonical link: https://commits.webkit.org/221173@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-26 06:05:13 +00:00
UIProcess/Inspector/Agents/InspectorBrowserAgent.cpp
Adopt interface AVAudioRoutingArbiter for Mac https://bugs.webkit.org/show_bug.cgi?id=210167 Source/WebCore: Reviewed by Eric Carlson. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::setCategory): (WebCore::categoryName): Deleted. * platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp. (WebCore::AudioSession::setCategory): (WebCore::AudioSession::categoryOverride const): (WebCore::AudioSession::setCategoryOverride): Fix unified build failures. * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Source/WebCore/PAL: Reviewed by Eric Carlson. Add softlink for AVAudioRoutingArbiter. * pal/cocoa/AVFoundationSoftLink.h: * pal/cocoa/AVFoundationSoftLink.mm: Source/WebKit: <rdar://problem/59113994> Reviewed by Eric Carlson. Add a new cross-process object pair, AudioSessionRouterAbitrator/Proxy which passes routing arbitration commands from WebContent -> UIProcess. Because the UIProcess can represent multiple WebContent processes, it must track all outstanding arbitration requests globally. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * Sources.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::mediaRelatedMachServices): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: Added. (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: Added. (WebKit::AudioSessionRoutingArbitratorProxy::category const): (WebKit::AudioSessionRoutingArbitratorProxy::destinationId): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in: Added. * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: Added. (WebKit::SharedArbitrator::sharedInstance): (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): (WebKit::SharedArbitrator::leaveRoutingArbitrationForArbitrator): (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_processDisplayName): * WebProcess/WebProcess.cpp: * WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp: Added. (WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator): (WebKit::AudioSessionRoutingArbitrator::supplementName): (WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitrator::leaveRoutingAbritration): * WebProcess/cocoa/AudioSessionRoutingArbitrator.h: Added. * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): * WebProcess/com.apple.WebProcess.sb.in: Source/WTF: Reviewed by Eric Carlson. Add macro HAVE_AVAUDIO_ROUTING_ARBITER. * wtf/PlatformHave.h: Tools: Reviewed by Eric Carlson. Add test for softlink of AVAudioRoutingArbiter. * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/223396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-14 22:35:47 +00:00
UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp
[macOS] Update ScreenTime as playback state changes https://bugs.webkit.org/show_bug.cgi?id=210518 <rdar://problem/61181092> Reviewed by Jer Noble. Source/WebCore: Test: media/media-usage-state.html Pass media element state to the UI process whenever it changes. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::MediaElementSession): (WebCore::MediaElementSession::~MediaElementSession): (WebCore::MediaElementSession::updateMediaUsageIfChanged): * html/MediaElementSession.h: * page/ChromeClient.h: (WebCore::ChromeClient::addMediaUsageManagerSession): (WebCore::ChromeClient::updateMediaUsageManagerSessionState): (WebCore::ChromeClient::removeMediaUsageManagerSession): * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::PlatformMediaSession): * platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::updateMediaUsageIfChanged): (WebCore::PlatformMediaSession::mediaSessionIdentifier const): * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): * platform/audio/PlatformMediaSessionManager.h: (WebCore::PlatformMediaSessionManager::scheduleUpdateSessionStatus): (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing): (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::scheduleUpdateSessionStatus): (WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback): (WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerCocoa::removeSession): (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): (WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged): (WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged): (WebCore::MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo): Deleted. * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::resetRestrictions): (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): * platform/graphics/MediaUsageInfo.h: Added. (WebCore::MediaUsageInfo::operator== const): (WebCore::MediaUsageInfo::operator!= const): (WebCore::MediaUsageInfo::encode const): (WebCore::MediaUsageInfo::decode): * testing/Internals.cpp: (WebCore::Internals::setMediaElementRestrictions): (WebCore::Internals::mediaUsageState const): * testing/Internals.h: * testing/Internals.idl: Source/WebCore/PAL: Soft link the UsageTracking framework. * PAL.xcodeproj/project.pbxproj: * pal/cocoa/UsageTrackingSoftLink.h: Added. * pal/cocoa/UsageTrackingSoftLink.mm: Added. Source/WebKit: Add a manager that gets media element state changes, and a Cocoa-specific implementation that passes that state to ScreenTime. * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::mediaUsageManager): (WebKit::WebPageProxy::addMediaUsageManagerSession): (WebKit::WebPageProxy::updateMediaUsageManagerSessionState): (WebKit::WebPageProxy::removeMediaUsageManagerSession): * UIProcess/Media/MediaUsageManager.cpp: Added. (WebKit::MediaUsageManager::create): (WebKit::reset): (WebKit::MediaUsageManager::addMediaSession): (WebKit::MediaUsageManager::removeMediaSession): (WebKit::MediaUsageManager::updateMediaUsage): * UIProcess/Media/MediaUsageManager.h: Added. * UIProcess/Media/cocoa/MediaUsageManagerCocoa.h: Added. (WebKit::MediaUsageManagerCocoa::SessionMediaUsage::SessionMediaUsage): * UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: Added. (WebKit::usageTrackingAvailable): (WebKit::MediaUsageManager::create): (WebKit::MediaUsageManagerCocoa::~MediaUsageManagerCocoa): (WebKit::MediaUsageManagerCocoa::reset): (WebKit::MediaUsageManagerCocoa::addMediaSession): (WebKit::MediaUsageManagerCocoa::removeMediaSession): (WebKit::MediaUsageManagerCocoa::updateMediaUsage): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMediaUsageManagerSession): (WebKit::WebChromeClient::updateMediaUsageManagerSessionState): (WebKit::WebChromeClient::removeMediaUsageManagerSession): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addMediaUsageManagerSession): (WebKit::WebPage::updateMediaUsageManagerSessionState): (WebKit::WebPage::removeMediaUsageManagerSession): * WebProcess/WebPage/WebPage.h: Source/WTF: Define HAVE_MEDIA_USAGE_FRAMEWORK and ENABLE_MEDIA_USAGE * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: LayoutTests: * media/media-usage-state-expected.txt: Added. * media/media-usage-state.html: Added. * platform/gtk/TestExpectations: Skip new test. * platform/win/TestExpectations: Ditto. * platform/wpe/TestExpectations: Ditto. Canonical link: https://commits.webkit.org/223468@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-16 13:36:07 +00:00
UIProcess/Media/MediaUsageManager.cpp
[macOS] Add MediaSessionCoordinator API test https://bugs.webkit.org/show_bug.cgi?id=224140 <rdar://problem/76171173> Reviewed by Jer Noble. Source/WebKit: * Sources.txt: Include RemoteMediaSessionCoordinatorProxy.cpp and RemoteMediaSessionCoordinator.cpp so they don't have to be included in the Xcode project. * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: Declare enums, struct, and protocols necessary to implement and use an object derived from MediaSessionCoordinatorProxyPrivate. * UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]): New private method to create a MediaSessionCoordinatorProxyPrivate. (-[WKMediaSessionCoordinatorHelper initWithCoordinator:]): (-[WKMediaSessionCoordinatorHelper seekSessionToTime:withCompletion:]): (-[WKMediaSessionCoordinatorHelper playSessionWithCompletion:]): (-[WKMediaSessionCoordinatorHelper pauseSessionWithCompletion:]): (-[WKMediaSessionCoordinatorHelper setSessionTrack:withCompletion:]): * UIProcess/Cocoa/WebViewImpl.h: (WebKit::WebViewImpl::mediaSessionCoordinatorForTesting): MediaSessionCoordinatorProxyPrivate getter. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setMediaSessionCoordinatorForTesting): Setter for MediaSessionCoordinatorProxyPrivate drived object. * UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h: Add typedef for the completion handler used by many coordinator proxy methods. * UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp: (WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy): Set the private coordinator client so calls to the session can be forwarded. (WebKit::RemoteMediaSessionCoordinatorProxy::join): Use MediaSessionCommandCompletionHandler. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSeekTo): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePlay): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePause): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSetTrack): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged): Ditto. * UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createMediaSessionCoordinator): Change completion handler parameter to return a bool instead of a RemoteMediaSessionCoordinatorProxy as the client interface provides all of the session access needed. * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: Remove RemoteMediaSessionCoordinatorProxy.cpp and RemoteMediaSessionCoordinator.cpp * WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp: (WebKit::RemoteMediaSessionCoordinator::join): Use ExceptionData's toException() method instead of creating an Exception directly. Remove the destination ID parameter to sendWithAsyncReply so messageSenderDestinationID() will be used. (WebKit::RemoteMediaSessionCoordinator::leave): Ditto. (WebKit::RemoteMediaSessionCoordinator::seekTo) Ditto.: (WebKit::RemoteMediaSessionCoordinator::play): Ditto. (WebKit::RemoteMediaSessionCoordinator::pause): Ditto. (WebKit::RemoteMediaSessionCoordinator::setTrack): Ditto. (WebKit::RemoteMediaSessionCoordinator::positionStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::readyStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::playbackStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::coordinatorStateChanged): Ditto. Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: Added. (-[_WKMockMediaSessionCoordinator lastStateChange]): (-[_WKMockMediaSessionCoordinator lastMethodCalled]): (-[_WKMockMediaSessionCoordinator identifier]): (-[_WKMockMediaSessionCoordinator joinWithCompletion:]): (-[_WKMockMediaSessionCoordinator leave]): (-[_WKMockMediaSessionCoordinator seekTo:withCompletion:]): (-[_WKMockMediaSessionCoordinator playWithCompletion:]): (-[_WKMockMediaSessionCoordinator pauseWithCompletion:]): (-[_WKMockMediaSessionCoordinator setTrack:withCompletion:]): (-[_WKMockMediaSessionCoordinator positionStateChanged:]): (-[_WKMockMediaSessionCoordinator readyStateChanged:]): (-[_WKMockMediaSessionCoordinator playbackStateChanged:]): (-[_WKMockMediaSessionCoordinator coordinatorStateChanged:]): (-[_WKMockMediaSessionCoordinator seekSessionToTime:]): (-[_WKMockMediaSessionCoordinator playSession]): (-[_WKMockMediaSessionCoordinator pauseSession]): (-[_WKMockMediaSessionCoordinator setSessionTrack:]): (TestWebKitAPI::MediaSessionCoordinatorTest::createCoordinator): (TestWebKitAPI::MediaSessionCoordinatorTest::webView const): (TestWebKitAPI::MediaSessionCoordinatorTest::coordinator const): (TestWebKitAPI::MediaSessionCoordinatorTest::loadPageAndBecomeReady): (TestWebKitAPI::MediaSessionCoordinatorTest::runScriptWithUserGesture): (TestWebKitAPI::MediaSessionCoordinatorTest::play): (TestWebKitAPI::MediaSessionCoordinatorTest::pause): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForEventMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::eventListenerWasCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::clearEventListenerState): (TestWebKitAPI::MediaSessionCoordinatorTest::executeUntil): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForEventListenerToBeCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForMessagesPosted): (TestWebKitAPI::MediaSessionCoordinatorTest::clearMessagesPosted): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForSessionHandlerMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::sessionHandlerWasCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForSessionHandlerToBeCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForPromiseMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::clearPromiseMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasResolved): (TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasRejected): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForPromise): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/media-remote.html: Canonical link: https://commits.webkit.org/236193@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-06 19:06:53 +00:00
UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp
Adopt interface AVAudioRoutingArbiter for Mac https://bugs.webkit.org/show_bug.cgi?id=210167 Source/WebCore: Reviewed by Eric Carlson. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/ios/AudioSessionIOS.mm: (WebCore::AudioSession::setCategory): (WebCore::categoryName): Deleted. * platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp. (WebCore::AudioSession::setCategory): (WebCore::AudioSession::categoryOverride const): (WebCore::AudioSession::setCategoryOverride): Fix unified build failures. * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Source/WebCore/PAL: Reviewed by Eric Carlson. Add softlink for AVAudioRoutingArbiter. * pal/cocoa/AVFoundationSoftLink.h: * pal/cocoa/AVFoundationSoftLink.mm: Source/WebKit: <rdar://problem/59113994> Reviewed by Eric Carlson. Add a new cross-process object pair, AudioSessionRouterAbitrator/Proxy which passes routing arbitration commands from WebContent -> UIProcess. Because the UIProcess can represent multiple WebContent processes, it must track all outstanding arbitration requests globally. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * Sources.txt: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::mediaRelatedMachServices): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.cpp: Added. (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.h: Added. (WebKit::AudioSessionRoutingArbitratorProxy::category const): (WebKit::AudioSessionRoutingArbitratorProxy::destinationId): * UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in: Added. * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm: Added. (WebKit::SharedArbitrator::sharedInstance): (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator): (WebKit::SharedArbitrator::leaveRoutingArbitrationForArbitrator): (WebKit::AudioSessionRoutingArbitratorProxy::AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::~AudioSessionRoutingArbitratorProxy): (WebKit::AudioSessionRoutingArbitratorProxy::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitratorProxy::leaveRoutingArbitration): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_processDisplayName): * WebProcess/WebProcess.cpp: * WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp: Added. (WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator): (WebKit::AudioSessionRoutingArbitrator::supplementName): (WebKit::AudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory): (WebKit::AudioSessionRoutingArbitrator::leaveRoutingAbritration): * WebProcess/cocoa/AudioSessionRoutingArbitrator.h: Added. * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::AudioFactory::createAudioCaptureSource): * WebProcess/com.apple.WebProcess.sb.in: Source/WTF: Reviewed by Eric Carlson. Add macro HAVE_AVAUDIO_ROUTING_ARBITER. * wtf/PlatformHave.h: Tools: Reviewed by Eric Carlson. Add test for softlink of AVAudioRoutingArbiter. * TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/223396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-14 22:35:47 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Notifications/WebNotification.cpp
UIProcess/Notifications/WebNotificationManagerProxy.cpp
UIProcess/Notifications/WebNotificationProvider.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/Plugins/PluginInfoStore.cpp
UIProcess/Plugins/PluginProcessManager.cpp
UIProcess/Plugins/PluginProcessProxy.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/UserContent/WebScriptMessageHandler.cpp
UIProcess/UserContent/WebUserContentControllerProxy.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator https://bugs.webkit.org/show_bug.cgi?id=191527 <rdar://problem/54237146> Reviewed by Chris Dumez. This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example, CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports. This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly. * Sources.txt: * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::continueAddDeviceAfterGetInfo): * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp. (WebKit::CtapAuthenticator::CtapAuthenticator): (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const): (WebKit::CtapAuthenticator::getAssertion): (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): (WebKit::CtapAuthenticator::tryDowngrade): * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h. * UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h. * UIProcess/WebAuthentication/fido/CtapHidDriver.h: (WebKit::CtapHidDriver::setProtocol): * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp. (WebKit::U2fAuthenticator::U2fAuthenticator): (WebKit::U2fAuthenticator::makeCredential): (WebKit::U2fAuthenticator::checkExcludeList): (WebKit::U2fAuthenticator::issueRegisterCommand): (WebKit::U2fAuthenticator::getAssertion): (WebKit::U2fAuthenticator::issueSignCommand): (WebKit::U2fAuthenticator::issueNewCommand): (WebKit::U2fAuthenticator::issueCommand): (WebKit::U2fAuthenticator::responseReceived): (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h. * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/214427@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-13 20:43:00 +00:00
UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
[WebAuthN] Support U2F HID Authenticators on macOS https://bugs.webkit.org/show_bug.cgi?id=191535 <rdar://problem/47102027> Reviewed by Brent Fulgham. Source/WebCore: This patch changes U2fCommandConstructor to produce register commands with enforcing test of user presence. Otherwise, authenticators would silently generate credentials. It also renames readFromU2fSignResponse to readU2fSignResponse. Tests: http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html http/wpt/webauthn/public-key-credential-create-success-u2f.https.html http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html http/wpt/webauthn/public-key-credential-get-success-u2f.https.html * Modules/webauthn/fido/U2fCommandConstructor.cpp: (fido::WebCore::constructU2fRegisterCommand): * Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fSignResponse): (fido::readFromU2fSignResponse): Deleted. * Modules/webauthn/fido/U2fResponseConverter.h: Source/WebKit: This patch implements the support for U2F authenticators, and enables it for hid devices. It follows the CTAP spec to map WebAuthN requests to U2F commands and return the responses: https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability Most of the parts are done before this patch, this patch focues on: 7.2.2 and 7.3.2. Besides implementing the U2fHidAuthenticator, this patch also adds support in the mocking environment for U2F authenticators. It is done by extending the stages in MockHidConnection from 4 to indefinite as multi-round communications are expected to map WebAuthN requests to U2F requests. * Sources.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::continueAddDeviceAfterGetInfo): * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: (WebKit::CtapHidDriver::continueAfterChannelAllocated): * UIProcess/WebAuthentication/fido/CtapHidDriver.h: (WebKit::CtapHidDriver::setProtocol): * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: Added. (WebKit::U2fHidAuthenticator::U2fHidAuthenticator): (WebKit::U2fHidAuthenticator::makeCredential): (WebKit::U2fHidAuthenticator::checkExcludeList): (WebKit::U2fHidAuthenticator::issueRegisterCommand): (WebKit::U2fHidAuthenticator::getAssertion): (WebKit::U2fHidAuthenticator::issueSignCommand): (WebKit::U2fHidAuthenticator::issueNewCommand): (WebKit::U2fHidAuthenticator::issueCommand): (WebKit::U2fHidAuthenticator::responseReceived): (WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueBogusCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h: Added. * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::parseRequest): (WebKit::MockHidConnection::feedReports): * UIProcess/WebAuthentication/Mock/MockHidConnection.h: * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: * WebKit.xcodeproj/project.pbxproj: Tools: This patch: 1) adds support for U2F mocking mechanism; 2) updates tests to reflect U2fCommandConstructor changes. * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FidoTestData.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAuthenticationMockConfiguration): LayoutTests: Besiding adding tests for U2F authenticators, it also changes payloadBase64 from a string to a vector of strings. New tests are skipped for iOS. * 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-failure-u2f-silent.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html: Added. * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: * http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: Copied from LayoutTests/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-failure-u2f-silent.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html: Added. * http/wpt/webauthn/public-key-credential-get-success-hid.https.html: * http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-success-u2f.https.html: Added. * http/wpt/webauthn/resources/util.js: * platform/ios-wk2/TestExpectations: Canonical link: https://commits.webkit.org/207763@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-09 00:35:39 +00:00
UIProcess/WebAuthentication/fido/CtapHidDriver.cpp
[WebAuthn] Support NFC authenticators for iOS https://bugs.webkit.org/show_bug.cgi?id=188624 <rdar://problem/43354214> Reviewed by Chris Dumez. Source/WebCore: Tests: http/wpt/webauthn/ctap-nfc-failure.https.html http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html http/wpt/webauthn/public-key-credential-create-success-nfc.https.html http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html http/wpt/webauthn/public-key-credential-get-success-nfc.https.html * Modules/webauthn/apdu/ApduResponse.h: Adds a new method to support moving m_data. * Modules/webauthn/fido/FidoConstants.h: Adds constants for NFC applet selection. Source/WebKit: This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary. The patch follows almost the same flow as previous HID and Local authenticator support. 1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session. 2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate to wait for 'didDetectTags'. 3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }. The first tag that meets all requirement will then be returned for WebAuthn operations. 4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService. 5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent. For testing, this patch follows the same flow as well. 1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery. 2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication. * Platform/spi/Cocoa/NearFieldSPI.h: Added. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManagerInternal::collectTransports): * UIProcess/WebAuthentication/AuthenticatorTransportService.cpp: (WebKit::AuthenticatorTransportService::create): (WebKit::AuthenticatorTransportService::createMock): * UIProcess/WebAuthentication/Cocoa/HidService.h: * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::HidService): (WebKit::HidService::deviceAdded): (WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted. * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added. (WebKit::fido::compareVersion): (WebKit::NfcConnection::NfcConnection): (WebKit::NfcConnection::~NfcConnection): (WebKit::NfcConnection::transact const): (WebKit::NfcConnection::didDetectTags const): * UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added. (WebKit::NfcService::NfcService): (WebKit::NfcService::~NfcService): (WebKit::NfcService::didConnectTag): (WebKit::NfcService::startDiscoveryInternal): (WebKit::NfcService::platformStartDiscovery): * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. (-[WKNFReaderSessionDelegate initWithConnection:]): (-[WKNFReaderSessionDelegate readerSession:didDetectTags:]): * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::send): (WebKit::MockHidConnection::registerDataReceivedCallbackInternal): (WebKit::MockHidConnection::parseRequest): (WebKit::MockHidConnection::feedReports): (WebKit::MockHidConnection::shouldContinueFeedReports): * UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added. (-[WKMockNFTag type]): (-[WKMockNFTag initWithNFTag:]): (-[WKMockNFTag description]): (-[WKMockNFTag isEqualToNFTag:]): (-[WKMockNFTag initWithType:]): (WebKit::MockNfcService::MockNfcService): (WebKit::MockNfcService::transceive): (WebKit::MockNfcService::platformStartDiscovery): (WebKit::MockNfcService::detectTags const): * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: * UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added. (WebKit::CtapNfcDriver::CtapNfcDriver): (WebKit::CtapNfcDriver::transact): (WebKit::CtapNfcDriver::respondAsync const): * UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/fido/FidoService.cpp: Added. (WebKit::FidoService::FidoService): (WebKit::FidoService::getInfo): (WebKit::FidoService::continueAfterGetInfo): * UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: * UIProcess/ios/WebPageProxyIOS.mm: * WebKit.xcodeproj/project.pbxproj: Source/WTF: * wtf/Platform.h: Add a feature flag for NearField. Tools: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAuthenticationMockConfiguration): Setup NFC mock testing configuration. LayoutTests: * http/wpt/webauthn/ctap-nfc-failure.https-expected.txt: Added. * http/wpt/webauthn/ctap-nfc-failure.https.html: Added. * http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: This patch replaces the "local" keyword with "hid". * http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: Added. * http/wpt/webauthn/resources/util.js: * platform/ios-simulator-wk2/TestExpectations: Skip NFC tests for simulators. Canonical link: https://commits.webkit.org/214783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[WebAuthn] Support NFC authenticators for iOS https://bugs.webkit.org/show_bug.cgi?id=188624 <rdar://problem/43354214> Reviewed by Chris Dumez. Source/WebCore: Tests: http/wpt/webauthn/ctap-nfc-failure.https.html http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html http/wpt/webauthn/public-key-credential-create-success-nfc.https.html http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html http/wpt/webauthn/public-key-credential-get-success-nfc.https.html * Modules/webauthn/apdu/ApduResponse.h: Adds a new method to support moving m_data. * Modules/webauthn/fido/FidoConstants.h: Adds constants for NFC applet selection. Source/WebKit: This patch implements support for NFC authenticators including both FIDO2 and U2F ones. It utilizes a private framework called NearField instead of CoreNFC to be able to supply a custom UI later if necessary. The patch follows almost the same flow as previous HID and Local authenticator support. 1) Discovery is via NfcService which will invoke NFHardwareManager to start a generic NFC reader session. 2) Once a reader session is established, a NfcConnection is created to start the polling and register the WKNFReaderSessionDelegate to wait for 'didDetectTags'. 3) When tags are detected, NfcConnection will determine if it meets our requriements: { type, connectability, fido applet availability }. The first tag that meets all requirement will then be returned for WebAuthn operations. 4) The first WebAuthn operation is to send authenticatorGetInfo command to determine the supported protocol, and then initialize corresponding authenticators. Noted, the sending/receiving of this command is now abstracted into FidoService which will be shared across HidService and NfcService. 5) From then, the actual WebAuthn request, either makeCredential or getAssertion will be sent. For testing, this patch follows the same flow as well. 1) MockNfcService overrides NfcService to mock the behavior of NFC Tags discovery. 2) The same class also swizzles methods from NFReaderSession to mock tag connection and communication. * Platform/spi/Cocoa/NearFieldSPI.h: Added. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): * UIProcess/WebAuthentication/AuthenticatorManager.cpp: (WebKit::AuthenticatorManagerInternal::collectTransports): * UIProcess/WebAuthentication/AuthenticatorTransportService.cpp: (WebKit::AuthenticatorTransportService::create): (WebKit::AuthenticatorTransportService::createMock): * UIProcess/WebAuthentication/Cocoa/HidService.h: * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::HidService): (WebKit::HidService::deviceAdded): (WebKit::HidService::continueAddDeviceAfterGetInfo): Deleted. * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NearFieldSoftLink.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcConnection.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcConnection.mm: Added. (WebKit::fido::compareVersion): (WebKit::NfcConnection::NfcConnection): (WebKit::NfcConnection::~NfcConnection): (WebKit::NfcConnection::transact const): (WebKit::NfcConnection::didDetectTags const): * UIProcess/WebAuthentication/Cocoa/NfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/NfcService.mm: Added. (WebKit::NfcService::NfcService): (WebKit::NfcService::~NfcService): (WebKit::NfcService::didConnectTag): (WebKit::NfcService::startDiscoveryInternal): (WebKit::NfcService::platformStartDiscovery): * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. (-[WKNFReaderSessionDelegate initWithConnection:]): (-[WKNFReaderSessionDelegate readerSession:didDetectTags:]): * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::send): (WebKit::MockHidConnection::registerDataReceivedCallbackInternal): (WebKit::MockHidConnection::parseRequest): (WebKit::MockHidConnection::feedReports): (WebKit::MockHidConnection::shouldContinueFeedReports): * UIProcess/WebAuthentication/Mock/MockNfcService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/Mock/MockNfcService.mm: Added. (-[WKMockNFTag type]): (-[WKMockNFTag initWithNFTag:]): (-[WKMockNFTag description]): (-[WKMockNFTag isEqualToNFTag:]): (-[WKMockNFTag initWithType:]): (WebKit::MockNfcService::MockNfcService): (WebKit::MockNfcService::transceive): (WebKit::MockNfcService::platformStartDiscovery): (WebKit::MockNfcService::detectTags const): * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: * UIProcess/WebAuthentication/fido/CtapNfcDriver.cpp: Added. (WebKit::CtapNfcDriver::CtapNfcDriver): (WebKit::CtapNfcDriver::transact): (WebKit::CtapNfcDriver::respondAsync const): * UIProcess/WebAuthentication/fido/CtapNfcDriver.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/fido/FidoService.cpp: Added. (WebKit::FidoService::FidoService): (WebKit::FidoService::getInfo): (WebKit::FidoService::continueAfterGetInfo): * UIProcess/WebAuthentication/fido/FidoService.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/HidService.h. * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: * UIProcess/ios/WebPageProxyIOS.mm: * WebKit.xcodeproj/project.pbxproj: Source/WTF: * wtf/Platform.h: Add a feature flag for NearField. Tools: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAuthenticationMockConfiguration): Setup NFC mock testing configuration. LayoutTests: * http/wpt/webauthn/ctap-nfc-failure.https-expected.txt: Added. * http/wpt/webauthn/ctap-nfc-failure.https.html: Added. * http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt: * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: This patch replaces the "local" keyword with "hid". * http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-success-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html: Added. * http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html: Added. * http/wpt/webauthn/resources/util.js: * platform/ios-simulator-wk2/TestExpectations: Skip NFC tests for simulators. Canonical link: https://commits.webkit.org/214783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-23 18:56:03 +00:00
UIProcess/WebAuthentication/fido/FidoService.cpp
[WebAuthn] Make CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator https://bugs.webkit.org/show_bug.cgi?id=191527 <rdar://problem/54237146> Reviewed by Chris Dumez. This patch makes an ABC CtapDriver, which services as an abstract interface for CtapAuthenticator/U2fAuthenticator to talk to the actual object that implement the specific CTAP protocol that mananges communications over different transports, for example, CtapHidDriver, such that CtapAuthenticator/U2fAuthenticator can be shared across different transports. This patch also renames CtapHidAuthenticator/U2fHidAuthenticator to CtapAuthenticator/U2fAuthenticator correspondingly. * Sources.txt: * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::continueAddDeviceAfterGetInfo): * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.cpp. (WebKit::CtapAuthenticator::CtapAuthenticator): (WebKit::CtapAuthenticator::makeCredential): (WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const): (WebKit::CtapAuthenticator::getAssertion): (WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived): (WebKit::CtapAuthenticator::tryDowngrade): * UIProcess/WebAuthentication/fido/CtapAuthenticator.h: Copied from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h. * UIProcess/WebAuthentication/fido/CtapDriver.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidAuthenticator.h. * UIProcess/WebAuthentication/fido/CtapHidDriver.h: (WebKit::CtapHidDriver::setProtocol): * UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp. (WebKit::U2fAuthenticator::U2fAuthenticator): (WebKit::U2fAuthenticator::makeCredential): (WebKit::U2fAuthenticator::checkExcludeList): (WebKit::U2fAuthenticator::issueRegisterCommand): (WebKit::U2fAuthenticator::getAssertion): (WebKit::U2fAuthenticator::issueSignCommand): (WebKit::U2fAuthenticator::issueNewCommand): (WebKit::U2fAuthenticator::issueCommand): (WebKit::U2fAuthenticator::responseReceived): (WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueCheckOnlyCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueBogusCommandAfterResponseReceived): (WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fAuthenticator.h: Renamed from Source/WebKit/UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h. * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/214427@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-13 20:43:00 +00:00
UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp
[WebAuthN] Support U2F HID Authenticators on macOS https://bugs.webkit.org/show_bug.cgi?id=191535 <rdar://problem/47102027> Reviewed by Brent Fulgham. Source/WebCore: This patch changes U2fCommandConstructor to produce register commands with enforcing test of user presence. Otherwise, authenticators would silently generate credentials. It also renames readFromU2fSignResponse to readU2fSignResponse. Tests: http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html http/wpt/webauthn/public-key-credential-create-success-u2f.https.html http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html http/wpt/webauthn/public-key-credential-get-success-u2f.https.html * Modules/webauthn/fido/U2fCommandConstructor.cpp: (fido::WebCore::constructU2fRegisterCommand): * Modules/webauthn/fido/U2fResponseConverter.cpp: (fido::readU2fSignResponse): (fido::readFromU2fSignResponse): Deleted. * Modules/webauthn/fido/U2fResponseConverter.h: Source/WebKit: This patch implements the support for U2F authenticators, and enables it for hid devices. It follows the CTAP spec to map WebAuthN requests to U2F commands and return the responses: https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability Most of the parts are done before this patch, this patch focues on: 7.2.2 and 7.3.2. Besides implementing the U2fHidAuthenticator, this patch also adds support in the mocking environment for U2F authenticators. It is done by extending the stages in MockHidConnection from 4 to indefinite as multi-round communications are expected to map WebAuthN requests to U2F requests. * Sources.txt: * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): * UIProcess/WebAuthentication/Cocoa/HidService.mm: (WebKit::HidService::continueAddDeviceAfterGetInfo): * UIProcess/WebAuthentication/fido/CtapHidDriver.cpp: (WebKit::CtapHidDriver::continueAfterChannelAllocated): * UIProcess/WebAuthentication/fido/CtapHidDriver.h: (WebKit::CtapHidDriver::setProtocol): * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: Added. (WebKit::U2fHidAuthenticator::U2fHidAuthenticator): (WebKit::U2fHidAuthenticator::makeCredential): (WebKit::U2fHidAuthenticator::checkExcludeList): (WebKit::U2fHidAuthenticator::issueRegisterCommand): (WebKit::U2fHidAuthenticator::getAssertion): (WebKit::U2fHidAuthenticator::issueSignCommand): (WebKit::U2fHidAuthenticator::issueNewCommand): (WebKit::U2fHidAuthenticator::issueCommand): (WebKit::U2fHidAuthenticator::responseReceived): (WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueBogusCommandAfterResponseReceived): (WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived): * UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h: Added. * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp: (WebKit::MockHidConnection::parseRequest): (WebKit::MockHidConnection::feedReports): * UIProcess/WebAuthentication/Mock/MockHidConnection.h: * UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h: * WebKit.xcodeproj/project.pbxproj: Tools: This patch: 1) adds support for U2F mocking mechanism; 2) updates tests to reflect U2fCommandConstructor changes. * TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebCore/FidoTestData.h: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebAuthenticationMockConfiguration): LayoutTests: Besiding adding tests for U2F authenticators, it also changes payloadBase64 from a string to a vector of strings. New tests are skipped for iOS. * 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-failure-u2f-silent.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html: Added. * http/wpt/webauthn/public-key-credential-create-success-hid.https.html: * http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: Copied from LayoutTests/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-failure-u2f-silent.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html: Added. * http/wpt/webauthn/public-key-credential-get-success-hid.https.html: * http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt: Added. * http/wpt/webauthn/public-key-credential-get-success-u2f.https.html: Added. * http/wpt/webauthn/resources/util.js: * platform/ios-wk2/TestExpectations: Canonical link: https://commits.webkit.org/207763@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp
[WebAuthn] Implement a dummy WebAuthnProcess https://bugs.webkit.org/show_bug.cgi?id=217559 <rdar://problem/70168749> Reviewed by Brent Fulgham. Source/WebCore: No tests. * en.lproj/Localizable.strings: Provides a name for the WebAuthn process. Source/WebKit: Previous patch r268248 introduces a new daemon to handle all WebAuthn requests. However, after more deeper investigations, the daemon story is not very compelling for WebKit. Here are the two major road blockers: 1) The major one is on macOS. New daemons cannot be installed without a system update. It means relocatable Safari (e.g. STP) and staged Safari on downlevel OSes will not get this feature. And relocatable STP can only utilize the system daemon. This seems a bummer especially for the STP case given it is heavily used to test latest web features. 2) Additional plumbing is needed for testing and engineering builds. This problem is specific to WebKit and is on both macOS and iOS. WebKit doesn't build roots to test engineering builds, which is required to update the plist on the above location. Hence, a separate configuration is needed to generate a different plist that points to the right engineering binary and additional scripts will be needed to ask launchd to load the plist before running any tests. Some extra exercises are probably needed to not confuse launchd about the engineering binary and system binary as well. Given the above constraints, a new architecture is proposed to make the daemon a WebKit XPC service/process instead and leave the launchd event handler to a new Safari daemon. The launchd related feature is only on iOS and therefore it really doesn't make sense to overcome all the above macOS constraints. Having different architectures on iOS (a daemon) and on macOS (a XPC service) accordingly will introduce tons of overhead for maintainance as well. That's why relying on a Safari daemon to do the job is the most reasonable option. This patch therefore focuses on making the WebAuthn process happen and removes the WebAuthn daemon. * CMakeLists.txt: * Configurations/WebAuthnService.xcconfig: Renamed from Source/WebKit/Configurations/WebAuthenticationAgent.xcconfig. * Configurations/WebKit.xcconfig: * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Removed. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Removed. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Paperwork for building the new WebAuthn process. * Platform/ExtraPrivateSymbolsForTAPI.h: * Shared/AuxiliaryProcess.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::processStorageClass): (WebKit::sandboxDirectory): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * Sources.txt: * SourcesCocoa.txt: Paperwork for building the new WebAuthn process. * UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::shouldLeakBoost): * UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: Added. (WebKit::WebAuthnProcessProxy::singleton): (WebKit::WebAuthnProcessProxy::WebAuthnProcessProxy): (WebKit::WebAuthnProcessProxy::getLaunchOptions): (WebKit::WebAuthnProcessProxy::connectionWillOpen): (WebKit::WebAuthnProcessProxy::processWillShutDown): (WebKit::WebAuthnProcessProxy::getWebAuthnProcessConnection): (WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed): (WebKit::WebAuthnProcessProxy::didClose): (WebKit::WebAuthnProcessProxy::didReceiveInvalidMessage): (WebKit::WebAuthnProcessProxy::didFinishLaunching): (WebKit::WebAuthnProcessProxy::updateProcessAssertion): * UIProcess/WebAuthentication/WebAuthnProcessProxy.h: Added. * UIProcess/WebAuthentication/WebAuthnProcessProxy.messages.in: Added. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getWebAuthnProcessConnection): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getWebAuthnProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnServiceEntryPoint.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnServiceInitializerDelegate::WebAuthnServiceInitializerDelegate): (WebKit::initializeAuxiliaryProcess<WebAuthnProcess>): (WEBAUTHEN_SERVICE_INITIALIZER): * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp: Added. (WebKit::WebAuthnConnectionToWebProcess::create): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::~WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::didClose): (WebKit::WebAuthnConnectionToWebProcess::didReceiveInvalidMessage): * WebAuthnProcess/WebAuthnConnectionToWebProcess.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnConnectionToWebProcess::connection): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnProcessProcess): (WebKit::WebAuthnConnectionToWebProcess::webProcessIdentifier const): * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcess.cpp: Added. (WebKit::WebAuthnProcess::WebAuthnProcess): (WebKit::WebAuthnProcess::~WebAuthnProcess): (WebKit::WebAuthnProcess::createWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::removeWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::connectionToWebProcessClosed): (WebKit::WebAuthnProcess::shouldTerminate): (WebKit::WebAuthnProcess::didClose): (WebKit::WebAuthnProcess::lowMemoryHandler): (WebKit::WebAuthnProcess::initializeWebAuthnProcess): (WebKit::WebAuthnProcess::prepareToSuspend): (WebKit::WebAuthnProcess::processDidResume): (WebKit::WebAuthnProcess::resume): (WebKit::WebAuthnProcess::processDidTransitionToForeground): (WebKit::WebAuthnProcess::processDidTransitionToBackground): (WebKit::WebAuthnProcess::webProcessConnection const): * WebAuthnProcess/WebAuthnProcess.h: Added. * WebAuthnProcess/WebAuthnProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcessCreationParameters.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessCreationParameters::encode const): (WebKit::WebAuthnProcessCreationParameters::decode): * WebAuthnProcess/WebAuthnProcessCreationParameters.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. * WebAuthnProcess/ios/WebAuthnProcessIOS.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): * WebAuthnProcess/mac/WebAuthnProcessMac.mm: Added. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Added. The sandbox profile is originally from the GPU Process with IOKit related rules removed. Will tighten it again after the process is fully functional. * WebKit.xcodeproj/project.pbxproj: Paperwork for building the new WebAuthn process. * WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::~WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::didClose): (WebKit::WebAuthnProcessConnection::didReceiveInvalidMessage): * WebProcess/WebAuthentication/WebAuthnProcessConnection.h: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::create): (WebKit::WebAuthnProcessConnection::connection): * WebProcess/WebAuthentication/WebAuthnProcessConnection.messages.in: Added. * WebProcess/WebAuthentication/WebAuthnProcessConnectionInfo.h: Added. (WebKit::WebAuthnProcessConnectionInfo::identifier const): (WebKit::WebAuthnProcessConnectionInfo::releaseIdentifier): (WebKit::WebAuthnProcessConnectionInfo::encode const): (WebKit::WebAuthnProcessConnectionInfo::decode): * WebProcess/WebProcess.cpp: (WebKit::getWebAuthnProcessConnection): (WebKit::WebProcess::ensureWebAuthnProcessConnection): (WebKit::WebProcess::webAuthnProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::existingWebAuthnProcessConnection): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. Canonical link: https://commits.webkit.org/230567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Remember device orientation permission for the duration of the browsing session https://bugs.webkit.org/show_bug.cgi?id=196992 <rdar://problem/49946067> Reviewed by Alex Christensen. Source/WebCore: Use DeviceOrientationOrMotionPermissionState type more consistently in the code base instead of bool or Optional<bool>. Added "Prompt" value to this enumeration which is the default state and which indicates we should ask the client. * WebCore.xcodeproj/project.pbxproj: * dom/DeviceOrientationAndMotionAccessController.cpp: (WebCore::DeviceOrientationAndMotionAccessController::DeviceOrientationAndMotionAccessController): (WebCore::DeviceOrientationAndMotionAccessController::shouldAllowAccess): * dom/DeviceOrientationAndMotionAccessController.h: (WebCore::DeviceOrientationAndMotionAccessController::accessState const): * dom/DeviceOrientationOrMotionEvent.cpp: (WebCore::DeviceOrientationOrMotionEvent::requestPermission): * dom/DeviceOrientationOrMotionPermissionState.h: * loader/DocumentLoader.h: (WebCore::DocumentLoader::deviceOrientationAndMotionAccessState const): (WebCore::DocumentLoader::setDeviceOrientationAndMotionAccessState): * page/ChromeClient.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::isAllowedToAddDeviceMotionOrientationListener const): Source/WebKit: Implement caching of device orientation permission decisions on the WebDeviceOrientationAndMotionAccessController, which is owned by the WebsiteDataStore. This way, if we already prompted the user of a given origin, we will remember the previous decision for the duration of the session and not prompt again. * Shared/WebsitePoliciesData.cpp: (WebKit::WebsitePoliciesData::encode const): (WebKit::WebsitePoliciesData::decode): * Shared/WebsitePoliciesData.h: * UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::copy const): (API::WebsitePolicies::data): * UIProcess/API/APIWebsitePolicies.h: * UIProcess/API/Cocoa/WKWebpagePreferences.mm: (toDeviceOrientationOrMotionPermissionState): (-[WKWebpagePreferences _setDeviceOrientationAndMotionAccessPolicy:]): (toWKWebsiteDeviceOrientationAndMotionAccessPolicy): (-[WKWebpagePreferences _deviceOrientationAndMotionAccessPolicy]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::shouldAllowDeviceOrientationAndMotionAccess): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebsiteData/WebDeviceOrientationAndMotionAccessController.cpp: Added. (WebKit::WebDeviceOrientationAndMotionAccessController::shouldAllowDeviceOrientationAndMotionAccess): (WebKit::WebDeviceOrientationAndMotionAccessController::deviceOrientationPermission const): * UIProcess/WebsiteData/WebDeviceOrientationAndMotionAccessController.h: Copied from Source/WebCore/dom/DeviceOrientationAndMotionAccessController.h. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::deviceOrientationAndMotionAccessController): * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldAllowDeviceOrientationAndMotionAccess): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::shouldAllowDeviceOrientationAndMotionAccess): * WebProcess/WebPage/WebPage.h: Tools: Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm: (-[DeviceOrientationPermissionUIDelegate _webView:shouldAllowDeviceOrientationAndMotionAccessRequestedByFrame:decisionHandler:]): (TEST): Canonical link: https://commits.webkit.org/211268@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-17 17:03:59 +00:00
UIProcess/WebsiteData/WebDeviceOrientationAndMotionAccessController.cpp
Use unified build for UIProcess https://bugs.webkit.org/show_bug.cgi?id=185014 Reviewed by Alex Christensen. * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/WKWebView.mm: * UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]): * UIProcess/API/glib/IconDatabase.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/WebKitColorChooser.cpp: * UIProcess/API/gtk/WebKitPopupMenu.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/ApplicationStateTracker.mm: * UIProcess/Authentication/mac/WebCredentialMac.mm: * UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm: * UIProcess/Automation/ios/WebAutomationSessionIOS.mm: * UIProcess/Automation/mac/WebAutomationSessionMac.mm: * UIProcess/Cocoa/NavigationState.mm: * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm: * UIProcess/Cocoa/ViewGestureController.cpp: * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: (-[WKWebViewContentProviderRegistry initWithConfiguration:]): (-[WKWebViewContentProviderRegistry addPage:]): (-[WKWebViewContentProviderRegistry removePage:]): * UIProcess/Cocoa/WebPageProxyCocoa.mm: * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: * UIProcess/Cocoa/WebProcessPoolCocoa.mm: * UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm: * UIProcess/Cocoa/WebViewImpl.mm: (-[WKTextTouchBarItemController itemForIdentifier:]): (WebKit::WebViewImpl::performDragOperation): * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/DrawingAreaProxy.cpp: * UIProcess/Gamepad/UIGamepad.cpp: * UIProcess/Gamepad/UIGamepadProvider.cpp: * UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: * UIProcess/HighPerformanceGraphicsUsageSampler.cpp: * UIProcess/Network/NetworkProcessProxy.cpp: * UIProcess/Notifications/WebNotificationManagerProxy.cpp: * UIProcess/PerActivityStateCPUUsageSampler.cpp: * UIProcess/Plugins/PluginInfoStore.cpp: * UIProcess/Plugins/PluginProcessProxy.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * UIProcess/RemoteWebInspectorProxy.cpp: * UIProcess/ResourceLoadStatisticsMemoryStore.cpp: * UIProcess/ServiceWorkerProcessProxy.cpp: * UIProcess/Storage/StorageProcessProxy.cpp: * UIProcess/SuspendedPageProxy.cpp: * UIProcess/TextCheckerCompletion.cpp: * UIProcess/UIMessagePortChannelProvider.cpp: * UIProcess/UserMediaPermissionCheckProxy.cpp: * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: * UIProcess/UserMediaPermissionRequestProxy.cpp: * UIProcess/VisitedLinkStore.cpp: * UIProcess/WKInspectorHighlightView.mm: (findIntersectionOnLineBetweenPoints): (quadIntersection): (layerPathWithHole): (layerPath): (-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]): (-[WKInspectorHighlightView _layoutForNodeListHighlight:]): (-[WKInspectorHighlightView _layoutForRectsHighlight:]): (-[WKInspectorHighlightView update:]): * UIProcess/WebBackForwardList.cpp: * UIProcess/WebContextMenuListenerProxy.cpp: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebEditCommandProxy.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebInspectorProxy.cpp: * UIProcess/WebNavigationState.cpp: * UIProcess/WebOpenPanelResultListenerProxy.cpp: * UIProcess/WebPageInjectedBundleClient.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebProcessPool.cpp: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp: * UIProcess/WebURLSchemeHandler.cpp: * UIProcess/WebURLSchemeTask.cpp: * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: * UIProcess/ios/DragDropInteractionState.mm: * UIProcess/ios/InputViewUpdateDeferrer.mm: * UIProcess/ios/PageClientImplIOS.mm: (-[WKEditCommandObjC initWithWebEditCommandProxy:]): (-[WKEditCommandObjC command]): * UIProcess/ios/SmartMagnificationController.mm: * UIProcess/ios/TextCheckerIOS.mm: * UIProcess/ios/ViewGestureControllerIOS.mm: (WebKit::ViewGestureController::beginSwipeGesture): (WebKit::ViewGestureController::removeSwipeSnapshot): * UIProcess/ios/WKActionSheetAssistant.mm: (presentationStyleForView): * UIProcess/ios/WKApplicationStateTrackingView.mm: (-[WKApplicationStateTrackingView initWithFrame:webView:]): (-[WKApplicationStateTrackingView _applicationDidEnterBackground]): (-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]): (-[WKApplicationStateTrackingView _applicationWillEnterForeground]): * UIProcess/ios/WKGeolocationProviderIOS.mm: (-[WKGeolocationProviderIOS _startUpdating]): (-[WKGeolocationProviderIOS _stopUpdating]): (-[WKGeolocationProviderIOS _setEnableHighAccuracy:]): (-[WKGeolocationProviderIOS init]): (-[WKGeolocationProviderIOS initWithProcessPool:]): (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]): (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]): (-[WKLegacyCoreLocationProvider positionChanged:]): * UIProcess/ios/WKKeyboardScrollingAnimator.mm: (-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]): (-[WKKeyboardScrollingAnimator beginWithEvent:]): (-[WKKeyboardScrollingAnimator handleKeyEvent:]): (-[WKKeyboardScrollingAnimator startAnimatedScroll]): (-[WKKeyboardScrollingAnimator stopAnimatedScroll]): * UIProcess/ios/WKLegacyPDFView.mm: * UIProcess/ios/WKPDFView.mm: (-[WKPDFView web_setContentProviderData:suggestedFilename:]): * UIProcess/ios/WKScrollView.mm: (-[WKScrollView _systemContentInset]): * UIProcess/ios/WKSystemPreviewView.mm: * UIProcess/ios/WebPageProxyIOS.mm: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): * UIProcess/mac/PageClientImplMac.mm: * UIProcess/mac/RemoteWebInspectorProxyMac.mm: (-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]): * UIProcess/mac/TextCheckerMac.mm: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * UIProcess/mac/ViewGestureControllerMac.mm: * UIProcess/mac/ViewSnapshotStore.mm: * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: (-[WKFullKeyboardAccessWatcher notifyAllProcessPools]): * UIProcess/mac/WKFullScreenWindowController.mm: (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface): (WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const): (-[WKFullScreenWindowController initWithWindow:webView:page:]): (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController windowDidEnterFullScreen:]): (-[WKFullScreenWindowController windowDidExitFullScreen:]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindowController _replaceView:with:]): (zoomAnimation): (createMask): (maskAnimation): * UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]): (-[WKImmediateActionController willDestroyView:]): (-[WKImmediateActionController _clearImmediateActionState]): (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]): (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]): (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]): (-[WKImmediateActionController _webHitTestResult]): (-[WKImmediateActionController _defaultAnimationController]): (-[WKImmediateActionController menuItem:maxSizeForPoint:]): (-[WKImmediateActionController _animationControllerForDataDetectedText]): (-[WKImmediateActionController _animationControllerForDataDetectedLink]): (-[WKImmediateActionController _animationControllerForText]): * UIProcess/mac/WKInspectorViewController.mm: (-[WKInspectorViewController initWithInspectedPage:]): (-[WKInspectorViewController webView]): (-[WKInspectorViewController configuration]): (-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): (-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]): (-[WKInspectorViewController inspectorWKWebViewReload:]): * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView _expectedPreviewCallbackForRect:]): (pageDidDrawToImage): (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): (pageDidComputePageRects): (-[WKPrintingView _askPageToComputePageRects]): (-[WKPrintingView _pageForRect:]): (-[WKPrintingView _drawPDFDocument:page:atPoint:]): (-[WKPrintingView _drawPreview:]): (-[WKPrintingView drawRect:]): (-[WKPrintingView rectForPage:]): * UIProcess/mac/WKTextFinderClient.mm: (-[WKTextFinderClient initWithPage:view:]): (-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]): (-[WKTextFinderClient getSelectedText:]): (arrayFromRects): (-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]): (-[WKTextFinderClient didGetImageForMatchResult:]): * UIProcess/mac/WKTextInputWindowController.mm: * UIProcess/mac/WKViewLayoutStrategy.mm: (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]): (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]): (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]): * UIProcess/mac/WebColorPickerMac.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: (-[WKMenuTarget forwardContextMenuAction:]): (WebKit::menuItemIdentifier): (WebKit::WebContextMenuProxyMac::createContextMenuItem): * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]): * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/win/PageClientImpl.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * UIProcess/win/WebPopupMenuProxyWin.cpp: * UIProcess/win/WebView.cpp: * UIProcess/wpe/TextCheckerWPE.cpp: * UIProcess/wpe/WebPasteboardProxyWPE.cpp: * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/203968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-24 00:59:11 +00:00
UIProcess/WebsiteData/WebsiteDataRecord.cpp
UIProcess/WebsiteData/WebsiteDataStore.cpp
Make WebsiteDataStoreConfiguration a proper API object https://bugs.webkit.org/show_bug.cgi?id=192380 Reviewed by Youenn Fablet. In the immediate future I'll need to add things to _WKWebsiteDataStoreConfiguration. Instead of making ivars, setting them, copying them to a local object, make this a wrapper of an API::Object like all our other ObjC API objects are. * Shared/API/APIObject.h: (API::Object::wrapper const): (API::Object::wrapper): Deleted. * Shared/Cocoa/APIObject.mm: (API::Object::ref const): (API::Object::deref const): (API::Object::newObject): (API::Object::ref): Deleted. (API::Object::deref): Deleted. * Sources.txt: * UIProcess/API/APIProcessPoolConfiguration.cpp: (API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration): * UIProcess/API/APIProcessPoolConfiguration.h: * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::createLegacy): (API::WebsiteDataStore::WebsiteDataStore): (API::WebsiteDataStore::legacyDefaultDataStoreConfiguration): * UIProcess/API/APIWebsiteDataStore.h: * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultDataStoreConfiguration): * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _initWithConfiguration:]): * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]): (-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]): (-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]): (-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]): (-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]): (-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]): (-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]): (-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]): (-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]): (-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]): (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]): (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]): (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]): (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]): (-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]): (-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]): (-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]): (-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]): (-[_WKWebsiteDataStoreConfiguration _apiObject]): * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfigurationInternal.h: Added. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::retrieveCacheStorageParameters): * UIProcess/WebProcessPool.cpp: (WebKit::legacyWebsiteDataStoreConfiguration): (WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): * UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::create): (WebKit::WebsiteDataStore::WebsiteDataStore): (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): (WebKit::WebsiteDataStore::parameters): (WebKit::WebsiteDataStore::Configuration::Configuration): Deleted. * UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const): (WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota): (WebKit::WebsiteDataStore::cacheStorageDirectory const): (WebKit::WebsiteDataStore::setCacheStorageDirectory): (WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const): (WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory): (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const): (WebKit::WebsiteDataStore::resolvedMediaCacheDirectory const): (WebKit::WebsiteDataStore::resolvedMediaKeysDirectory const): (WebKit::WebsiteDataStore::resolvedDatabaseDirectory const): (WebKit::WebsiteDataStore::resolvedJavaScriptConfigurationDirectory const): (WebKit::WebsiteDataStore::resolvedCookieStorageFile const): (WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const): (WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const): (WebKit::WebsiteDataStore::resolvedResourceLoadStatisticsDirectory const): * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Added. (WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration): * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Added. (WebKit::WebsiteDataStoreConfiguration::create): (WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota): (WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota): (WebKit::WebsiteDataStoreConfiguration::applicationCacheDirectory const): (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheDirectory): (WebKit::WebsiteDataStoreConfiguration::mediaCacheDirectory const): (WebKit::WebsiteDataStoreConfiguration::setMediaCacheDirectory): (WebKit::WebsiteDataStoreConfiguration::mediaKeysStorageDirectory const): (WebKit::WebsiteDataStoreConfiguration::setMediaKeysStorageDirectory): (WebKit::WebsiteDataStoreConfiguration::javaScriptConfigurationDirectory const): (WebKit::WebsiteDataStoreConfiguration::setJavaScriptConfigurationDirectory): (WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const): (WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory): (WebKit::WebsiteDataStoreConfiguration::indexedDBDatabaseDirectory const): (WebKit::WebsiteDataStoreConfiguration::setIndexedDBDatabaseDirectory): (WebKit::WebsiteDataStoreConfiguration::webSQLDatabaseDirectory const): (WebKit::WebsiteDataStoreConfiguration::setWebSQLDatabaseDirectory): (WebKit::WebsiteDataStoreConfiguration::localStorageDirectory const): (WebKit::WebsiteDataStoreConfiguration::setLocalStorageDirectory): (WebKit::WebsiteDataStoreConfiguration::cookieStorageFile const): (WebKit::WebsiteDataStoreConfiguration::setCookieStorageFile): (WebKit::WebsiteDataStoreConfiguration::resourceLoadStatisticsDirectory const): (WebKit::WebsiteDataStoreConfiguration::setResourceLoadStatisticsDirectory): (WebKit::WebsiteDataStoreConfiguration::networkCacheDirectory const): (WebKit::WebsiteDataStoreConfiguration::setNetworkCacheDirectory): (WebKit::WebsiteDataStoreConfiguration::cacheStorageDirectory const): (WebKit::WebsiteDataStoreConfiguration::setCacheStorageDirectory): (WebKit::WebsiteDataStoreConfiguration::applicationCacheFlatFileSubdirectoryName const): (WebKit::WebsiteDataStoreConfiguration::setApplicationCacheFlatFileSubdirectoryName): (WebKit::WebsiteDataStoreConfiguration::serviceWorkerRegistrationDirectory const): (WebKit::WebsiteDataStoreConfiguration::setServiceWorkerRegistrationDirectory): (WebKit::WebsiteDataStoreConfiguration::sourceApplicationBundleIdentifier const): (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationBundleIdentifier): (WebKit::WebsiteDataStoreConfiguration::sourceApplicationSecondaryIdentifier const): (WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/207031@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-05 18:42:21 +00:00
UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Cross platform compilation of PlatformXRSystem and PlatformXRSystemProxy https://bugs.webkit.org/show_bug.cgi?id=226919 Reviewed by Dean Jackson. PlatformXRSystem and PlatformXRSystemProxy are only compiled in Cocoa platform while WPE uses OpenXR, which only has code in WebCore. In order to run WebKit based WebXR on non-cocoa VR Standalone devices we also need to split the code and IPC messages between UIProcess/WebProcess. The existing PlatformXRSystem/PlatformXRSystemProxy pattern fits very well to the VR standalone scenario. This patch ensures that the existing code can be used in more platforms other than Cocoa. Tested by WebXR WPT. * CMakeLists.txt: * DerivedSources.make: * PlatformMac.cmake: * Shared/XR/XRDeviceIdentifier.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceIdentifier.h. * Shared/XR/XRDeviceInfo.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm. * Shared/XR/XRDeviceInfo.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.h. * Shared/XR/XRDeviceProxy.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm. * Shared/XR/XRDeviceProxy.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.h. * Shared/mac/MediaFormatReader/MediaSampleCursor.cpp: Add include to fix compilation error * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/PlatformXRCoordinator.mm: Copied from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::resetState): * UIProcess/WebPageProxy.h: * UIProcess/XR/PlatformXRCoordinator.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h. * UIProcess/XR/PlatformXRSystem.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.mm. * UIProcess/XR/PlatformXRSystem.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.h. * UIProcess/XR/PlatformXRSystem.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::xrSystemProxy): * WebProcess/WebPage/WebPage.h: * WebProcess/XR/PlatformXRSystemProxy.cpp: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm. * WebProcess/XR/PlatformXRSystemProxy.h: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h. * WebProcess/XR/PlatformXRSystemProxy.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. Canonical link: https://commits.webkit.org/239583@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 09:30:56 +00:00
UIProcess/XR/PlatformXRSystem.cpp
[WebAuthn] Implement a dummy WebAuthnProcess https://bugs.webkit.org/show_bug.cgi?id=217559 <rdar://problem/70168749> Reviewed by Brent Fulgham. Source/WebCore: No tests. * en.lproj/Localizable.strings: Provides a name for the WebAuthn process. Source/WebKit: Previous patch r268248 introduces a new daemon to handle all WebAuthn requests. However, after more deeper investigations, the daemon story is not very compelling for WebKit. Here are the two major road blockers: 1) The major one is on macOS. New daemons cannot be installed without a system update. It means relocatable Safari (e.g. STP) and staged Safari on downlevel OSes will not get this feature. And relocatable STP can only utilize the system daemon. This seems a bummer especially for the STP case given it is heavily used to test latest web features. 2) Additional plumbing is needed for testing and engineering builds. This problem is specific to WebKit and is on both macOS and iOS. WebKit doesn't build roots to test engineering builds, which is required to update the plist on the above location. Hence, a separate configuration is needed to generate a different plist that points to the right engineering binary and additional scripts will be needed to ask launchd to load the plist before running any tests. Some extra exercises are probably needed to not confuse launchd about the engineering binary and system binary as well. Given the above constraints, a new architecture is proposed to make the daemon a WebKit XPC service/process instead and leave the launchd event handler to a new Safari daemon. The launchd related feature is only on iOS and therefore it really doesn't make sense to overcome all the above macOS constraints. Having different architectures on iOS (a daemon) and on macOS (a XPC service) accordingly will introduce tons of overhead for maintainance as well. That's why relying on a Safari daemon to do the job is the most reasonable option. This patch therefore focuses on making the WebAuthn process happen and removes the WebAuthn daemon. * CMakeLists.txt: * Configurations/WebAuthnService.xcconfig: Renamed from Source/WebKit/Configurations/WebAuthenticationAgent.xcconfig. * Configurations/WebKit.xcconfig: * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Removed. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Removed. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Paperwork for building the new WebAuthn process. * Platform/ExtraPrivateSymbolsForTAPI.h: * Shared/AuxiliaryProcess.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::processStorageClass): (WebKit::sandboxDirectory): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * Sources.txt: * SourcesCocoa.txt: Paperwork for building the new WebAuthn process. * UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::shouldLeakBoost): * UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: Added. (WebKit::WebAuthnProcessProxy::singleton): (WebKit::WebAuthnProcessProxy::WebAuthnProcessProxy): (WebKit::WebAuthnProcessProxy::getLaunchOptions): (WebKit::WebAuthnProcessProxy::connectionWillOpen): (WebKit::WebAuthnProcessProxy::processWillShutDown): (WebKit::WebAuthnProcessProxy::getWebAuthnProcessConnection): (WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed): (WebKit::WebAuthnProcessProxy::didClose): (WebKit::WebAuthnProcessProxy::didReceiveInvalidMessage): (WebKit::WebAuthnProcessProxy::didFinishLaunching): (WebKit::WebAuthnProcessProxy::updateProcessAssertion): * UIProcess/WebAuthentication/WebAuthnProcessProxy.h: Added. * UIProcess/WebAuthentication/WebAuthnProcessProxy.messages.in: Added. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getWebAuthnProcessConnection): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getWebAuthnProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnServiceEntryPoint.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnServiceInitializerDelegate::WebAuthnServiceInitializerDelegate): (WebKit::initializeAuxiliaryProcess<WebAuthnProcess>): (WEBAUTHEN_SERVICE_INITIALIZER): * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp: Added. (WebKit::WebAuthnConnectionToWebProcess::create): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::~WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::didClose): (WebKit::WebAuthnConnectionToWebProcess::didReceiveInvalidMessage): * WebAuthnProcess/WebAuthnConnectionToWebProcess.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnConnectionToWebProcess::connection): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnProcessProcess): (WebKit::WebAuthnConnectionToWebProcess::webProcessIdentifier const): * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcess.cpp: Added. (WebKit::WebAuthnProcess::WebAuthnProcess): (WebKit::WebAuthnProcess::~WebAuthnProcess): (WebKit::WebAuthnProcess::createWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::removeWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::connectionToWebProcessClosed): (WebKit::WebAuthnProcess::shouldTerminate): (WebKit::WebAuthnProcess::didClose): (WebKit::WebAuthnProcess::lowMemoryHandler): (WebKit::WebAuthnProcess::initializeWebAuthnProcess): (WebKit::WebAuthnProcess::prepareToSuspend): (WebKit::WebAuthnProcess::processDidResume): (WebKit::WebAuthnProcess::resume): (WebKit::WebAuthnProcess::processDidTransitionToForeground): (WebKit::WebAuthnProcess::processDidTransitionToBackground): (WebKit::WebAuthnProcess::webProcessConnection const): * WebAuthnProcess/WebAuthnProcess.h: Added. * WebAuthnProcess/WebAuthnProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcessCreationParameters.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessCreationParameters::encode const): (WebKit::WebAuthnProcessCreationParameters::decode): * WebAuthnProcess/WebAuthnProcessCreationParameters.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. * WebAuthnProcess/ios/WebAuthnProcessIOS.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): * WebAuthnProcess/mac/WebAuthnProcessMac.mm: Added. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Added. The sandbox profile is originally from the GPU Process with IOKit related rules removed. Will tighten it again after the process is fully functional. * WebKit.xcodeproj/project.pbxproj: Paperwork for building the new WebAuthn process. * WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::~WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::didClose): (WebKit::WebAuthnProcessConnection::didReceiveInvalidMessage): * WebProcess/WebAuthentication/WebAuthnProcessConnection.h: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::create): (WebKit::WebAuthnProcessConnection::connection): * WebProcess/WebAuthentication/WebAuthnProcessConnection.messages.in: Added. * WebProcess/WebAuthentication/WebAuthnProcessConnectionInfo.h: Added. (WebKit::WebAuthnProcessConnectionInfo::identifier const): (WebKit::WebAuthnProcessConnectionInfo::releaseIdentifier): (WebKit::WebAuthnProcessConnectionInfo::encode const): (WebKit::WebAuthnProcessConnectionInfo::decode): * WebProcess/WebProcess.cpp: (WebKit::getWebAuthnProcessConnection): (WebKit::WebProcess::ensureWebAuthnProcessConnection): (WebKit::WebProcess::webAuthnProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::existingWebAuthnProcessConnection): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. Canonical link: https://commits.webkit.org/230567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 19:38:48 +00:00
WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp
WebAuthnProcess/WebAuthnProcess.cpp
WebAuthnProcess/WebAuthnProcessCreationParameters.cpp
WebProcess/WebConnectionToUIProcess.cpp
WebProcess/WebProcess.cpp
[Cocoa] Sleep disabling should be performed in the UI process https://bugs.webkit.org/show_bug.cgi?id=209676 Reviewed by Darin Adler. Source/WebCore: Since sleep disabling is causing communication with the power management service, it should be performed in the UI process. This patch fixes this by creating a sleep disabler client, which will notify the UI process when a sleep disabler is being created and destroyed. In response to these messages, the UI process will perform the actual sleep disabling and enabling. A new sleep disabler class is created which wraps the PAL sleep disabler, and notifies the sleep disabler client when set. If the sleep disabler client is set, a PAL sleep disabler instance will not be created in the WebContent process, since this will then happen in the UI process. API test: WebKit.SleepDisabler * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateSleepDisabling): * html/HTMLMediaElement.h: * platform/SleepDisabler.cpp: Added. (WebCore::SleepDisabler::SleepDisabler): (WebCore::SleepDisabler::~SleepDisabler): * platform/SleepDisabler.h: Added. (WebCore::SleepDisabler::type const): * platform/SleepDisablerClient.cpp: Added. (WebCore::sleepDisablerClient): * platform/SleepDisablerClient.h: Added. (WebCore::SleepDisablerClient::~SleepDisablerClient): * platform/SleepDisablerIdentifier.h: Added. * testing/Internals.cpp: (WebCore::Internals::createSleepDisabler): (WebCore::Internals::destroySleepDisabler): * testing/Internals.h: * testing/Internals.idl: Source/WebKit: Since sleep disabling is causing communication with the power management service, it should be performed in the UI process. The UI process will be notified by the WebContent process about sleep disablers being created and destroyed, and will perform the actual sleep disabling and enabling. * Scripts/webkit/messages.py: * Sources.txt: * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _hasSleepDisabler]): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didCreateSleepDisabler): (WebKit::WebProcessProxy::didDestroySleepDisabler): (WebKit::WebProcessProxy::hasSleepDisabler): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteLegacyCDM.cpp: * WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp: * WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h: * WebProcess/WebPage/ViewGestureGeometryCollector.cpp: * WebProcess/WebSleepDisablerClient.cpp: Added. (WebKit::WebSleepDisablerClient::didCreateSleepDisabler): (WebKit::WebSleepDisablerClient::didDestroySleepDisabler): * WebProcess/WebSleepDisablerClient.h: Added. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/SleepDisabler.mm: Added. (TEST): Canonical link: https://commits.webkit.org/222665@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-30 14:48:38 +00:00
WebProcess/WebSleepDisablerClient.cpp
[macOS] System sounds should be played in the UI process https://bugs.webkit.org/show_bug.cgi?id=218405 Source/WebCore: <rdar://problem/70898846> Reviewed by Darin Adler. In preparation of blocking the system sound server in the WebContent process, system sounds should be played in the UI process. This patch creates a system sound manager, which delegates the sound request if a delegate is present, otherwise the function PAL::systemBeep will be called. API test: WebKit.SystemBeep * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * editing/Editor.cpp: (WebCore::Editor::cut): (WebCore::Editor::copy): (WebCore::Editor::performDelete): * editing/EditorCommand.cpp: (WebCore::executeSelectToMark): (WebCore::executeSwapWithMark): * editing/cocoa/EditorCocoa.mm: (WebCore::Editor::takeFindStringFromSelection): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::beep): * platform/SystemSoundDelegate.h: Added. (WebCore::SystemSoundDelegate::~SystemSoundDelegate): (WebCore::SystemSoundDelegate::systemBeep): * platform/SystemSoundManager.cpp: Added. (WebCore::SystemSoundManager::singleton): (WebCore::SystemSoundManager::setSystemSoundDelegate): (WebCore::SystemSoundManager::systemBeep): * platform/SystemSoundManager.h: Added. * platform/audio/StereoPanner.cpp: * testing/Internals.cpp: (WebCore::Internals::systemBeep): * testing/Internals.h: * testing/Internals.idl: Source/WebKit: <rdar://problem/70898846> Reviewed by Darin Adler. Subclass SystemSoundDelegate, which will forward system sound requests to the UI process. * Sources.txt: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::systemBeep): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebSystemSoundDelegate.cpp: Added. (WebKit::WebSystemSoundDelegate::systemBeep): * WebProcess/WebSystemSoundDelegate.h: Added. * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Tools: Reviewed by Darin Adler. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKit/SystemBeep.mm: Added. (TEST): Canonical link: https://commits.webkit.org/231384@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-09 20:20:06 +00:00
WebProcess/WebSystemSoundDelegate.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
[WebAuthn] Implement SPI to tell UI clients to select assertion responses https://bugs.webkit.org/show_bug.cgi?id=206112 <rdar://problem/58495733> Reviewed by Alex Christensen. Source/WebKit: Covered by API tests. This patch adds a new delegate method in _WKWebAuthenticationPanelDelegate to tell UI clients to select an assertion response when multiple are returned from an authenticator. Here is the SPI: @protocol _WKWebAuthenticationPanelDelegate <NSObject> @optional ... - (void)panel:(_WKWebAuthenticationPanel *)panel selectAssertionResponse:(NSArray < _WKWebAuthenticationAssertionResponse *> *)responses completionHandler:(void (^)(_WKWebAuthenticationAssertionResponse *))completionHandler; ... @end A new interface is introduced to represent an authenticator assertion response: @interface _WKWebAuthenticationAssertionResponse : NSObject @property (nonatomic, readonly, copy) NSString *name; @property (nonatomic, readonly, copy) NSString *displayName; @property (nonatomic, readonly, copy) NSData *userHandle; @end Only members that can assist users to make a decision are exposed to UI clients. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIWebAuthenticationAssertionResponse.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (API::WebAuthenticationAssertionResponse::create): (API::WebAuthenticationAssertionResponse::WebAuthenticationAssertionResponse): * UIProcess/API/APIWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. (-[_WKWebAuthenticationAssertionResponse dealloc]): (-[_WKWebAuthenticationAssertionResponse name]): (-[_WKWebAuthenticationAssertionResponse displayName]): (-[_WKWebAuthenticationAssertionResponse userHandle]): (-[_WKWebAuthenticationAssertionResponse _apiObject]): * UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h. * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h: * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h: * UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm: (WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient): (WebKit::WebAuthenticationPanelClient::selectAssertionResponses const): * WebKit.xcodeproj/project.pbxproj: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm: (-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponses:completionHandler:]): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-multiple-accounts.html: Added. * TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html: Canonical link: https://commits.webkit.org/219365@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Web Automation: timeout underneath Automation.evaluateJavaScriptFunction in Selenium test frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs[Safari] https://bugs.webkit.org/show_bug.cgi?id=210162 <rdar://problem/60561009> Reviewed by Devin Rousso. Source/WebCore: * page/DOMWindow.h: Expose DOMWindow::{register, unregister}Observer. Source/WebKit: When an iframe is detached from the DOM, it is no longer exposed as a browsing context and it's not possible to Evaluate JavaScript or perform other commands with it. This patch adds frame lifecycle monitoring so that pending script evaluations are cancelled with FrameNotFound as soon as the iframe is detached from the DOM. This change also avoids running more commands with the frame if it's detached from its DOMWindow and ready to be GC'd. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Automation/WebAutomationDOMWindowObserver.h: Added. * WebProcess/Automation/WebAutomationDOMWindowObserver.cpp: Added. (WebKit::WebAutomationDOMWindowObserver::WebAutomationDOMWindowObserver): (WebKit::WebAutomationDOMWindowObserver::~WebAutomationDOMWindowObserver): (WebKit::WebAutomationDOMWindowObserver::frame const): (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInCachedFrame): (WebKit::WebAutomationDOMWindowObserver::willDestroyGlobalObjectInFrame): (WebKit::WebAutomationDOMWindowObserver::willDetachGlobalObjectFromFrame): This class is a stripped-down copy of DOMWindowExtension, which is the only other client of DOMWindow::Observer interface. When a frame is detached, destroyed, or navigates (global object detached), then call the callback and unregister. * WebProcess/Automation/WebAutomationSessionProxy.h: * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy): (WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): (WebKit::WebAutomationSessionProxy::willDestroyGlobalObjectForFrame): (WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): (WebKit::WebAutomationSessionProxy::ensureObserverForFrame): For non-main frames, ensure we add a frame observer if we are about to evaluate JavaScript upon the frame. This acts as a watchdog in case the frame becomes detached while waiting for pending JS evaluations. When a frame is detached, the JS evaluation may or may not complete. (WebKit::WebAutomationSessionProxy::selectOptionElement): Fix hilarious typo. * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::clearNowPlayingInfo): (WebKit::WebMediaStrategy::setNowPlayingInfo): Adding a new file seems to have exposed a few missing includes and namespace qualifiers. This is due to unified sources chunking. Canonical link: https://commits.webkit.org/223862@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-24 17:50:41 +00:00
WebProcess/Automation/WebAutomationDOMWindowObserver.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Cache/WebCacheStorageConnection.cpp
WebProcess/Cache/WebCacheStorageProvider.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Databases/WebDatabaseProvider.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Permission request API for MediaKeySystem access support https://bugs.webkit.org/show_bug.cgi?id=221187 Reviewed by Jer Noble. Source/WebCore: Support for user permission requesting when access to an EME MediaKeySystem is being requested by the page. This is similar to the mediaDevices access guards. Existing test media/encrypted-media/mock-MediaKeySystemAccess.html was updated to cover this new code path and WPE/GTK API tests as well. * CMakeLists.txt: * Headers.cmake: * Modules/encryptedmedia/MediaKeySystemClient.h: Added. * Modules/encryptedmedia/MediaKeySystemController.cpp: Added. (WebCore::MediaKeySystemController::supplementName): (WebCore::MediaKeySystemController::MediaKeySystemController): (WebCore::MediaKeySystemController::~MediaKeySystemController): (WebCore::provideMediaKeySystemTo): (WebCore::MediaKeySystemController::logRequestMediaKeySystemDenial): * Modules/encryptedmedia/MediaKeySystemController.h: Added. (WebCore::MediaKeySystemController::client const): (WebCore::MediaKeySystemController::from): (WebCore::MediaKeySystemController::requestMediaKeySystem): (WebCore::MediaKeySystemController::cancelMediaKeySystemRequest): * Modules/encryptedmedia/MediaKeySystemRequest.cpp: Added. (WebCore::MediaKeySystemRequest::create): (WebCore::MediaKeySystemRequest::MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::~MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const): (WebCore::MediaKeySystemRequest::start): (WebCore::MediaKeySystemRequest::allow): (WebCore::MediaKeySystemRequest::deny): (WebCore::MediaKeySystemRequest::stop): (WebCore::MediaKeySystemRequest::activeDOMObjectName const): (WebCore::MediaKeySystemRequest::document const): * Modules/encryptedmedia/MediaKeySystemRequest.h: Added. (WebCore::MediaKeySystemRequest::setAllowCallback): (WebCore::MediaKeySystemRequest::identifier const): (WebCore::MediaKeySystemRequest::keySystem const): * Modules/encryptedmedia/NavigatorEME.cpp: (WebCore::NavigatorEME::requestMediaKeySystemAccess): Source/WebKit: Add new IPC and C API exposing MediaKeySystem access permissions to the UIProcess. At least GTK/WPE would like to have API for asking permission to the user when EME's MediaKeyAccess is being requested by a page. On Apple platforms the permission is granted by default until a decision is made about supporting this in their APIUIClient. * CMakeLists.txt: * Headers.cmake: * Platform/Logging.h: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForMediaKeySystemPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp: Added. (WKMediaKeySystemPermissionCallbackGetTypeID): (WKMediaKeySystemPermissionCallbackComplete): * UIProcess/API/C/WKMediaKeySystemPermissionCallback.h: Added. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/MediaKeySystemPermissionRequest.h: Added. (WebKit::MediaKeySystemPermissionRequest::create): (WebKit::MediaKeySystemPermissionRequest::complete): (WebKit::MediaKeySystemPermissionRequest::keySystem const): (WebKit::MediaKeySystemPermissionRequest::MediaKeySystemPermissionRequest): (WebKit::MediaKeySystemPermissionCallback::create): (WebKit::MediaKeySystemPermissionCallback::complete): (WebKit::MediaKeySystemPermissionCallback::MediaKeySystemPermissionCallback): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::~MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::invalidatePendingRequests): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::grantRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::createRequestForFrame): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logChannel const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logger const): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::page const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): * UIProcess/MediaKeySystemPermissionRequestProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestProxy::MediaKeySystemPermissionRequestProxy): (WebKit::MediaKeySystemPermissionRequestProxy::allow): (WebKit::MediaKeySystemPermissionRequestProxy::deny): (WebKit::MediaKeySystemPermissionRequestProxy::invalidate): (WebKit::MediaKeySystemPermissionRequestProxy::doDefaultAction): * UIProcess/MediaKeySystemPermissionRequestProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestProxy::create): (WebKit::MediaKeySystemPermissionRequestProxy::isPending const): (WebKit::MediaKeySystemPermissionRequestProxy::mediaKeySystemID const): (WebKit::MediaKeySystemPermissionRequestProxy::mainFrameID const): (WebKit::MediaKeySystemPermissionRequestProxy::frameID const): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin const): (WebKit::MediaKeySystemPermissionRequestProxy::keySystem const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): (WebKit::WebPageProxy::mediaKeySystemPermissionRequestManager): (WebKit::WebPageProxy::requestMediaKeySystemPermissionByDefaultAction): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManager::MediaKeySystemPermissionRequestManager): (WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::sendMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasGranted): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasDenied): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: Added. * WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp: Added. (WebKit::WebMediaKeySystemClient::WebMediaKeySystemClient): (WebKit::WebMediaKeySystemClient::pageDestroyed): (WebKit::WebMediaKeySystemClient::requestMediaKeySystem): (WebKit::WebMediaKeySystemClient::cancelMediaKeySystemRequest): * WebProcess/WebCoreSupport/WebMediaKeySystemClient.h: Added. (WebKit::WebMediaKeySystemClient::~WebMediaKeySystemClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::mediaKeySystemWasGranted): (WebKit::WebPage::mediaKeySystemWasDenied): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::mediaKeySystemPermissionRequestManager): * WebProcess/WebPage/WebPage.messages.in: Tools: Add support for setting the permission request response from the TestRunner, for usage within layout tests. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsMediaKeySystemPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForMediaKeySystemPermissionRequest): (WTR::TestController::completeMediaKeySystemPermissionCheck): (WTR::TestController::setIsMediaKeySystemPermissionGranted): (WTR::TestController::createWebViewWithOptions): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Add basic coverage support for overriding the MediaKeySystem permission answer and thus have the promise rejection tested in this case. * media/encrypted-media/mock-MediaKeySystemAccess-expected.txt: * media/encrypted-media/mock-MediaKeySystemAccess.html: Canonical link: https://commits.webkit.org/233845@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-09 12:46:22 +00:00
WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp
WebProcess/FileAPI/BlobRegistryProxy.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/FullScreen/WebFullScreenManager.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Gamepad/WebGamepad.cpp
WebProcess/Gamepad/WebGamepadProvider.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp
WebProcess/Geolocation/WebGeolocationManager.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Unify most of the WebKit C API sources https://bugs.webkit.org/show_bug.cgi?id=189400 Reviewed by Alex Christensen. Unify and fix errors (mostly API:String vs. WTF::String mismatches). * Shared/APIWebArchiveResource.h: * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::constructedPathFilter): (API::constructedPath): (API::encodeContentRuleListMetaData): (API::decodeContentRuleListMetaData): (API::openAndMapContentRuleList): (API::writeDataToFile): (API::compiledToFile): (API::createExtension): (API::ContentRuleListStore::lookupContentRuleList): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers): (API::ContentRuleListStore::compileContentRuleList): (API::ContentRuleListStore::getContentRuleListSource): * UIProcess/API/APINavigation.cpp: (API::Navigation::loggingString const): * UIProcess/API/APIWebsiteDataStore.cpp: (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultMediaCacheDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: (API::WebsiteDataStore::defaultApplicationCacheDirectory): (API::WebsiteDataStore::defaultNetworkCacheDirectory): (API::WebsiteDataStore::defaultCacheStorageDirectory): (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): (API::WebsiteDataStore::defaultLocalStorageDirectory): (API::WebsiteDataStore::defaultMediaKeysStorageDirectory): (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): (API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation): (API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation): (API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory): (API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory): (API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory): (API::WebsiteDataStore::legacyDefaultLocalStorageDirectory): (API::WebsiteDataStore::legacyDefaultMediaCacheDirectory): (API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory): (API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory): * WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/204410@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp
WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp @no-unify
WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp @no-unify
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Web Inspector: consolidate UIProcess/WebProcess files into Inspector folders https://bugs.webkit.org/show_bug.cgi?id=206721 Reviewed by Alex Christensen and Don Olmstead. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/InspectorTargetProxy.h: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.h. * UIProcess/Inspector/InspectorTargetProxy.cpp: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.cpp. * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.messages.in. * UIProcess/Inspector/RemoteWebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.h. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.messages.in. * UIProcess/Inspector/WebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.h. * UIProcess/Inspector/WebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorUtilities.h: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.h. * UIProcess/Inspector/WebInspectorUtilities.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.cpp. * UIProcess/Inspector/WebPageDebuggable.h: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.h. * UIProcess/Inspector/WebPageDebuggable.cpp: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.cpp. * UIProcess/Inspector/WebPageInspectorController.h: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.h. * UIProcess/Inspector/WebPageInspectorController.cpp: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.cpp. * UIProcess/Inspector/glib/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.h. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.cpp. * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyClient.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp. * UIProcess/Inspector/ios/WKInspectorHighlightView.h: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.h. * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.mm. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm. * UIProcess/Inspector/mac/WKInspectorViewController.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.h. * UIProcess/Inspector/mac/WKInspectorViewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.mm. * UIProcess/Inspector/mac/WKInspectorWKWebView.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.h. * UIProcess/Inspector/mac/WKInspectorWKWebView.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.mm. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm. * UIProcess/Inspector/socket/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.h. * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.h. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp. * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/RemoteWebInspectorProxyWin.cpp. * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp. * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.messages.in. * WebProcess/Inspector/RemoteWebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h. * WebProcess/Inspector/RemoteWebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp. * WebProcess/Inspector/WebInspector.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.messages.in. * WebProcess/Inspector/WebInspector.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.h. * WebProcess/Inspector/WebInspector.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.cpp. * WebProcess/Inspector/WebInspectorClient.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.h. * WebProcess/Inspector/WebInspectorClient.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp. * WebProcess/Inspector/WebInspectorInterruptDispatcher.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in. * WebProcess/Inspector/WebInspectorInterruptDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.h. * WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp. * WebProcess/Inspector/WebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in. * WebProcess/Inspector/WebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.h. * WebProcess/Inspector/WebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp. * WebProcess/Inspector/WebPageInspectorTarget.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.h. * WebProcess/Inspector/WebPageInspectorTarget.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp. * WebProcess/Inspector/WebPageInspectorTargetController.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.h. * WebProcess/Inspector/WebPageInspectorTargetController.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.h. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.cpp. * WebProcess/Inspector/gtk/WebInspectorUIGtk.cpp: Renamed from Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp. * WebProcess/Inspector/mac/WebInspectorUIMac.mm: Renamed from Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm. * WebProcess/Inspector/win/WebInspectorUIWin.mm: Renamed from Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.mm. * UIProcess/API/APIAttachment.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: Add some missing includes. Canonical link: https://commits.webkit.org/219861@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing https://bugs.webkit.org/show_bug.cgi?id=217783 <rdar://problem/69968787> Reviewed by Devin Rousso. Source/WebCore: * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: In order for WebInspectorUIExtensionController to work with remote and local inspectors, it stores a weak pointer the inspector's InspectorFrontendClient. Expose the frontend's page so that the frontend API dispatcher can dispatch to it. Source/WebInspectorUI: * UserInterface/Main.html: Add new files. * UserInterface/Controllers/AppControllerBase.js: (WI.AppControllerBase): (WI.AppControllerBase.prototype.get extensionController): Hang the extension controller off of the global singleton, as there can only be one. * UserInterface/Controllers/WebInspectorExtensionController.js: (WI.WebInspectorExtensionController): (WI.WebInspectorExtensionController.prototype.registerExtension): (WI.WebInspectorExtensionController.prototype.unregisterExtension): Added. For now, just keep the UUIDs in a map and log the result. * UserInterface/Models/WebInspectorExtension.js: (WI.WebInspectorExtension): (WI.WebInspectorExtension.prototype.get extensionID): (WI.WebInspectorExtension.prototype.get displayName): Added. This is a data object for now. * UserInterface/Protocol/InspectorFrontendAPI.js: (InspectorFrontendAPI.loadCompleted): (InspectorFrontendAPI.registerExtension): (InspectorFrontendAPI.unregisterExtension): Added. Forward invocations to the extension controller. Source/WebKit: _WKInspectorExtension is new SPI that represents a Web Extension that uses the 'devtools' API to interact with Web Inspector. An extension is associated with its _WKInspectorExtensionHost. A WebKit client that supports Web Extensions can use this class to implement 'devtools' extension APIs. Add _WKInspectorExtensionHost methods to register and unregister an extension. Add plumbing so that the extension in registered in the frontend with WI.InspectorExtensionController. Later patches will flesh out the needed functionality to implement rest of the 'devtools' API. * Sources.txt: * SourcesCocoa.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * WebKit.xcodeproj/project.pbxproj: Add new files. * Scripts/webkit/messages.py: If a message includes InspectorExtensionError, then generate an include for InspectorExtensionTypes.h where it is declared. * Shared/API/APIObject.h: * Shared/Cocoa/APIObject.mm: (API::Object::newObject): New API object type. * Shared/InspectorExtensionTypes.h: Added error code enum and useful type aliases. * Shared/InspectorExtensionTypes.cpp: (WebKit::inspectorExtensionErrorToString): * UIProcess/API/APIInspectorExtension.h: * UIProcess/API/APIInspectorExtension.cpp: (API::InspectorExtension::create): (API::InspectorExtension::InspectorExtension): (API::InspectorExtension::~InspectorExtension): Added. This is a placeholder object that's used for the wrapper system, since we don't have single C++ objects for each extension to back the API object. * UIProcess/API/Cocoa/_WKInspector.h: * UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]): (-[_WKInspector unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/API/Cocoa/_WKInspectorExtension.h: * UIProcess/API/Cocoa/_WKInspectorExtension.mm: (-[_WKInspectorExtension initWithIdentifier:]): (-[_WKInspectorExtension dealloc]): (-[_WKInspectorExtension _apiObject]): (-[_WKInspectorExtension extensionID]): Added. This is a data object that's also used as a token to unregister the extension. * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Add new SPI. * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]): (-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]): Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process. * UIProcess/Inspector/RemoteWebInspectorProxy.h: * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Add FrontendLoaded. (WebKit::RemoteWebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: (WebKit::RemoteWebInspectorProxy::frontendLoaded): (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow): Set up the extension controller object after the frontend has been created. Hook up the FrontendLoaded event sent from Inspector web process so that the extension controller can be notified of when it's safe to message the frontend. * UIProcess/Inspector/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createFrontendPage): (WebKit::WebInspectorProxy::closeFrontendPageAndWindow): (WebKit::WebInspectorProxy::frontendLoaded): Set up the extension controller object after the frontend has been created. * UIProcess/Inspector/WebInspectorProxy.h: (WebKit::WebInspectorProxy::extensionController const): Added. * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h: * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: Added. (WebKit::WebInspectorUIExtensionControllerProxy::WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy): (WebKit::WebInspectorUIExtensionControllerProxy::whenFrontendHasLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendLoaded): (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension): (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension): Added. Forward API requests to the Web Inspector's web process to be evaluated in the frontend. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand): Add a more generic way to encode values to be passed as arguments to InspectorFrontendAPI.dispatch. * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::establishConnection): (WebKit::WebInspectorUI::closeWindow): * WebProcess/Inspector/WebInspectorUI.h: (WebKit::WebInspectorUI::frontendPage const): Added. (WebKit::WebInspectorUI::frontendAPIDispatcher): Added. * WebProcess/Inspector/WebInspectorUIExtensionController.h: * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Added. * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: Added. (WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController): (WebKit::WebInspectorUIExtensionController::registerExtension): (WebKit::WebInspectorUIExtensionController::unregisterExtension): (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult): Handle incoming messages by forwarding the associated command to WI.WebExtensionController via InspectorFrontendAPI evaluations. * UIProcess/API/Cocoa/_WKUserStyleSheet.h: * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Fallout from unified build chunking shifts. * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: (WebKit::LocalAuthenticatorInternal::getExistingCredentials): (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification): Fallout from unified build chunking shifts, but more. Tools: Add API tests to exercise new methods of the _WKInspectorExtensionHost protocol. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: New test file. * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: Added. (resetGlobalState): (-[UIDelegateForTestingInspectorExtensionHost _webView:didAttachLocalInspector:]): (TEST): Canonical link: https://commits.webkit.org/231480@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-11 21:44:38 +00:00
WebProcess/Inspector/WebInspectorUIExtensionController.cpp
Web Inspector: consolidate UIProcess/WebProcess files into Inspector folders https://bugs.webkit.org/show_bug.cgi?id=206721 Reviewed by Alex Christensen and Don Olmstead. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformFTW.cmake: * PlatformWin.cmake: * Sources.txt: * SourcesCocoa.txt: * SourcesGTK.txt: * WebKit.xcodeproj/project.pbxproj: * UIProcess/Inspector/InspectorTargetProxy.h: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.h. * UIProcess/Inspector/InspectorTargetProxy.cpp: Renamed from Source/WebKit/UIProcess/InspectorTargetProxy.cpp. * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.messages.in. * UIProcess/Inspector/RemoteWebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.h. * UIProcess/Inspector/RemoteWebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorProxy.messages.in: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.messages.in. * UIProcess/Inspector/WebInspectorProxy.h: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.h. * UIProcess/Inspector/WebInspectorProxy.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorProxy.cpp. * UIProcess/Inspector/WebInspectorUtilities.h: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.h. * UIProcess/Inspector/WebInspectorUtilities.cpp: Renamed from Source/WebKit/UIProcess/WebInspectorUtilities.cpp. * UIProcess/Inspector/WebPageDebuggable.h: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.h. * UIProcess/Inspector/WebPageDebuggable.cpp: Renamed from Source/WebKit/UIProcess/WebPageDebuggable.cpp. * UIProcess/Inspector/WebPageInspectorController.h: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.h. * UIProcess/Inspector/WebPageInspectorController.cpp: Renamed from Source/WebKit/UIProcess/WebPageInspectorController.cpp. * UIProcess/Inspector/glib/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.h. * UIProcess/Inspector/glib/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/glib/RemoteInspectorClient.cpp. * UIProcess/Inspector/gtk/RemoteWebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyGtk.cpp. * UIProcess/Inspector/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit/UIProcess/gtk/WebInspectorProxyClient.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.h: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.h. * UIProcess/Inspector/gtk/WebKitInspectorWindow.cpp: Renamed from Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp. * UIProcess/Inspector/ios/WKInspectorHighlightView.h: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.h. * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: Renamed from Source/WebKit/UIProcess/WKInspectorHighlightView.mm. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h. * UIProcess/Inspector/ios/WKInspectorNodeSearchGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm. * UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm. * UIProcess/Inspector/mac/WKInspectorViewController.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.h. * UIProcess/Inspector/mac/WKInspectorViewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorViewController.mm. * UIProcess/Inspector/mac/WKInspectorWKWebView.h: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.h. * UIProcess/Inspector/mac/WKInspectorWKWebView.mm: Renamed from Source/WebKit/UIProcess/mac/WKInspectorWKWebView.mm. * UIProcess/Inspector/mac/WebInspectorProxyMac.mm: Renamed from Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm. * UIProcess/Inspector/socket/RemoteInspectorClient.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.h. * UIProcess/Inspector/socket/RemoteInspectorClient.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorClient.cpp. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.h: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.h. * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Renamed from Source/WebKit/UIProcess/socket/RemoteInspectorProtocolHandler.cpp. * UIProcess/Inspector/win/RemoteWebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/RemoteWebInspectorProxyWin.cpp. * UIProcess/Inspector/win/WebInspectorProxyWin.cpp: Renamed from Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp. * WebProcess/Inspector/RemoteWebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.messages.in. * WebProcess/Inspector/RemoteWebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.h. * WebProcess/Inspector/RemoteWebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp. * WebProcess/Inspector/WebInspector.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.messages.in. * WebProcess/Inspector/WebInspector.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.h. * WebProcess/Inspector/WebInspector.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspector.cpp. * WebProcess/Inspector/WebInspectorClient.h: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.h. * WebProcess/Inspector/WebInspectorClient.cpp: Renamed from Source/WebKit/WebProcess/WebCoreSupport/WebInspectorClient.cpp. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h. * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp. * WebProcess/Inspector/WebInspectorInterruptDispatcher.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in. * WebProcess/Inspector/WebInspectorInterruptDispatcher.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.h. * WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorInterruptDispatcher.cpp. * WebProcess/Inspector/WebInspectorUI.messages.in: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in. * WebProcess/Inspector/WebInspectorUI.h: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.h. * WebProcess/Inspector/WebInspectorUI.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp. * WebProcess/Inspector/WebPageInspectorTarget.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.h. * WebProcess/Inspector/WebPageInspectorTarget.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp. * WebProcess/Inspector/WebPageInspectorTargetController.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.h. * WebProcess/Inspector/WebPageInspectorTargetController.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.h: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.h. * WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp: Renamed from Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetFrontendChannel.cpp. * WebProcess/Inspector/gtk/WebInspectorUIGtk.cpp: Renamed from Source/WebKit/WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp. * WebProcess/Inspector/mac/WebInspectorUIMac.mm: Renamed from Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm. * WebProcess/Inspector/win/WebInspectorUIWin.mm: Renamed from Source/WebKit/WebProcess/WebPage/win/WebInspectorUIWin.mm. * UIProcess/API/APIAttachment.h: * UIProcess/API/Cocoa/WKWebViewTesting.mm: Add some missing includes. Canonical link: https://commits.webkit.org/219861@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-28 01:13:27 +00:00
WebProcess/Inspector/WebPageInspectorTarget.cpp
WebProcess/Inspector/WebPageInspectorTargetController.cpp
WebProcess/Inspector/WebPageInspectorTargetFrontendChannel.cpp
[macOS] Add MediaSessionCoordinator API test https://bugs.webkit.org/show_bug.cgi?id=224140 <rdar://problem/76171173> Reviewed by Jer Noble. Source/WebKit: * Sources.txt: Include RemoteMediaSessionCoordinatorProxy.cpp and RemoteMediaSessionCoordinator.cpp so they don't have to be included in the Xcode project. * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: Declare enums, struct, and protocols necessary to implement and use an object derived from MediaSessionCoordinatorProxyPrivate. * UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]): New private method to create a MediaSessionCoordinatorProxyPrivate. (-[WKMediaSessionCoordinatorHelper initWithCoordinator:]): (-[WKMediaSessionCoordinatorHelper seekSessionToTime:withCompletion:]): (-[WKMediaSessionCoordinatorHelper playSessionWithCompletion:]): (-[WKMediaSessionCoordinatorHelper pauseSessionWithCompletion:]): (-[WKMediaSessionCoordinatorHelper setSessionTrack:withCompletion:]): * UIProcess/Cocoa/WebViewImpl.h: (WebKit::WebViewImpl::mediaSessionCoordinatorForTesting): MediaSessionCoordinatorProxyPrivate getter. * UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::setMediaSessionCoordinatorForTesting): Setter for MediaSessionCoordinatorProxyPrivate drived object. * UIProcess/Media/MediaSessionCoordinatorProxyPrivate.h: Add typedef for the completion handler used by many coordinator proxy methods. * UIProcess/Media/RemoteMediaSessionCoordinatorProxy.cpp: (WebKit::RemoteMediaSessionCoordinatorProxy::RemoteMediaSessionCoordinatorProxy): Set the private coordinator client so calls to the session can be forwarded. (WebKit::RemoteMediaSessionCoordinatorProxy::join): Use MediaSessionCommandCompletionHandler. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSeekTo): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePlay): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatePause): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinateSetTrack): Ditto. (WebKit::RemoteMediaSessionCoordinatorProxy::coordinatorStateChanged): Ditto. * UIProcess/Media/RemoteMediaSessionCoordinatorProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createMediaSessionCoordinator): Change completion handler parameter to return a bool instead of a RemoteMediaSessionCoordinatorProxy as the client interface provides all of the session access needed. * UIProcess/WebPageProxy.h: * WebKit.xcodeproj/project.pbxproj: Remove RemoteMediaSessionCoordinatorProxy.cpp and RemoteMediaSessionCoordinator.cpp * WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp: (WebKit::RemoteMediaSessionCoordinator::join): Use ExceptionData's toException() method instead of creating an Exception directly. Remove the destination ID parameter to sendWithAsyncReply so messageSenderDestinationID() will be used. (WebKit::RemoteMediaSessionCoordinator::leave): Ditto. (WebKit::RemoteMediaSessionCoordinator::seekTo) Ditto.: (WebKit::RemoteMediaSessionCoordinator::play): Ditto. (WebKit::RemoteMediaSessionCoordinator::pause): Ditto. (WebKit::RemoteMediaSessionCoordinator::setTrack): Ditto. (WebKit::RemoteMediaSessionCoordinator::positionStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::readyStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::playbackStateChanged): Ditto. (WebKit::RemoteMediaSessionCoordinator::coordinatorStateChanged): Ditto. Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/TestWebKitAPI.xcodeproj/xcshareddata/xcschemes/TestWebKitAPI.xcscheme: * TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm: Added. (-[_WKMockMediaSessionCoordinator lastStateChange]): (-[_WKMockMediaSessionCoordinator lastMethodCalled]): (-[_WKMockMediaSessionCoordinator identifier]): (-[_WKMockMediaSessionCoordinator joinWithCompletion:]): (-[_WKMockMediaSessionCoordinator leave]): (-[_WKMockMediaSessionCoordinator seekTo:withCompletion:]): (-[_WKMockMediaSessionCoordinator playWithCompletion:]): (-[_WKMockMediaSessionCoordinator pauseWithCompletion:]): (-[_WKMockMediaSessionCoordinator setTrack:withCompletion:]): (-[_WKMockMediaSessionCoordinator positionStateChanged:]): (-[_WKMockMediaSessionCoordinator readyStateChanged:]): (-[_WKMockMediaSessionCoordinator playbackStateChanged:]): (-[_WKMockMediaSessionCoordinator coordinatorStateChanged:]): (-[_WKMockMediaSessionCoordinator seekSessionToTime:]): (-[_WKMockMediaSessionCoordinator playSession]): (-[_WKMockMediaSessionCoordinator pauseSession]): (-[_WKMockMediaSessionCoordinator setSessionTrack:]): (TestWebKitAPI::MediaSessionCoordinatorTest::createCoordinator): (TestWebKitAPI::MediaSessionCoordinatorTest::webView const): (TestWebKitAPI::MediaSessionCoordinatorTest::coordinator const): (TestWebKitAPI::MediaSessionCoordinatorTest::loadPageAndBecomeReady): (TestWebKitAPI::MediaSessionCoordinatorTest::runScriptWithUserGesture): (TestWebKitAPI::MediaSessionCoordinatorTest::play): (TestWebKitAPI::MediaSessionCoordinatorTest::pause): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForEventMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::eventListenerWasCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::clearEventListenerState): (TestWebKitAPI::MediaSessionCoordinatorTest::executeUntil): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForEventListenerToBeCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForMessagesPosted): (TestWebKitAPI::MediaSessionCoordinatorTest::clearMessagesPosted): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForSessionHandlerMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::sessionHandlerWasCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForSessionHandlerToBeCalled): (TestWebKitAPI::MediaSessionCoordinatorTest::listenForPromiseMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::clearPromiseMessages): (TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasResolved): (TestWebKitAPI::MediaSessionCoordinatorTest::promiseWasRejected): (TestWebKitAPI::MediaSessionCoordinatorTest::waitForPromise): (TestWebKitAPI::TEST_F): * TestWebKitAPI/Tests/WebKitCocoa/media-remote.html: Canonical link: https://commits.webkit.org/236193@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-06 19:06:53 +00:00
WebProcess/MediaSession/RemoteMediaSessionCoordinator.cpp
WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp
WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Implement ImageBuffer shareable backends https://bugs.webkit.org/show_bug.cgi?id=207233 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-27 Reviewed by Simon Fraser. Source/WebCore: * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/PlatformImageBufferBackend.h: Added. Define the base ImageBufferBackend for each platform. ImageBufferShareableBitmapBackend in WebKit needs to have access to basic ImageBufferBackend functionalities specific to the platform. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::create): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: Use WTF::makeUnique and make the constructor public. Source/WebKit: RemoteImageBufferProxy will create a shareable backend in the GPUProcess. Then it will give access to this backend to RemoteImageBuffer in the WebProcess by sending an ImageBufferBackendHandle. * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/ImageBufferBackendHandle.h: Added. This is variant of shareable handles to the ImageBufferBackend data. * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp: Added. (WebKit::ImageBufferShareableBitmapBackend::create): The first create method will be called to create the backend of RemoteImageBufferProxy GPUProcess. The second create method will be called to create the backend of RemoteImageBuffer in the WebProcess. (WebKit::ImageBufferShareableBitmapBackend::ImageBufferShareableBitmapBackend): (WebKit::ImageBufferShareableBitmapBackend::createImageBufferBackendHandle const): Creates an ImageBufferBackendHandle which will be sent from the GPUProcess to the WebProcess. (WebKit::ImageBufferShareableBitmapBackend::copyNativeImage const): (WebKit::ImageBufferShareableBitmapBackend::copyImage const): (WebKit::ImageBufferShareableBitmapBackend::toBGRAData const): (WebKit::ImageBufferShareableBitmapBackend::getImageData const): (WebKit::ImageBufferShareableBitmapBackend::putImageData): * WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h: Added. * WebProcess/GPU/graphics/PlatformImageBufferShareableBackend.h: Added. Defines the platform shareable ImageBufferBackend types. * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp: Added. (WebKit::ImageBufferShareableIOSurfaceBackend::create): (WebKit::ImageBufferShareableIOSurfaceBackend::createImageBufferBackendHandle const): * WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.h: Added. Because ImageBufferBackendHandle has to be defined in WebKit, sharing the IOSurface backend has to be implemented in WebKit. * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: * WebProcess/Network/WebSocketChannel.cpp: * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: Unified sources gardening. Canonical link: https://commits.webkit.org/221275@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-28 01:35:21 +00:00
WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
Source/WebCore: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Extracts an interface GraphicsContextGLIOSurfaceSwapChain which is used to submit IOSurfaces from GraphicsContextGLOpenGL. For web process WebGL, these go to WebGLLayer. For GPU process WebGL, the IOSurfaces go to the prepareForDisplay caller, e.g. the RemoteGraphicsContextGL, which then return the IOSurfaces back to Web process side. RemoteGraphicsContextGLProxy will send them to WebGLLayer. No new tests, tested by existing webgl tests once the implementation works. * PlatformMac.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::getQueryParameter): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::getSamplerParameter): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): (WebCore::WebGL2RenderingContext::readPixels): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::readPixels): * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::updateCache): * page/Chrome.cpp: (WebCore::Chrome::createGraphicsContextGL const): (WebCore::Chrome::windowScreenDidChange): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createGraphicsContextGL const): * platform/HostWindow.h: * platform/RuntimeApplicationChecks.h: (WebCore::isInGPUProcess): * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::isInGPUProcess): * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::create): * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: (GCGLSpan::GCGLSpan): (GCGLSpan<GCGLvoid>::GCGLSpan): * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: Added. (WebCore::RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase): (WebCore::RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL const): (WebCore::RemoteGraphicsContextGLProxyBase::platformTexture const): (WebCore::RemoteGraphicsContextGLProxyBase::getExtensions): (WebCore::RemoteGraphicsContextGLProxyBase::setContextVisibility): (WebCore::RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation const): (WebCore::RemoteGraphicsContextGLProxyBase::isGLES2Compliant const): (WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged): (WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): (WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): (WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): (WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas): (WebCore::RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer): (WebCore::RemoteGraphicsContextGLProxyBase::supports): (WebCore::RemoteGraphicsContextGLProxyBase::ensureEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::isEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::initialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): * platform/graphics/RemoteGraphicsContextGLProxyBase.h: Added. * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Added. * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::InitializeEGLDisplay): (WebCore::GraphicsContextGLOpenGL::create): (WebCore::GraphicsContextGLOpenGL::createShared): (WebCore::GraphicsContextGLOpenGL::createForGPUProcess): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const): (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: Added. (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): (WebCore::RemoteGraphicsContextGLProxyBase::asCV): (WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: (-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): (-[WebGLLayer swapChain]): (-[WebGLLayer prepareForDisplay]): (-[WebGLLayer display]): (WebGLLayerSwapChain::present): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Source/WebKit: Implement RemoteWebGLBackend https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Implement the RemoteGraphicsContextGL in WebKit side. This class will forward calls received via IPC to the GraphicsContextGLOpenGL. At the moment RemoteGraphicsContextGL instance is a direct child of GPUConnectionToWebProcess. Compositing is implemented only for PLATFORM(COCOA). Missing: - Simulated context loss - Simulated context change - Paint WebGL contents to 2D canvas - Upload video to WebGL - Upload canvas to WebGL * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createGraphicsContextGL): (WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: Added. (WebKit::RemoteGraphicsContextGL::create): (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::gpuConnectionToWebProcess const): (WebKit::RemoteGraphicsContextGL::messageSenderConnection const): (WebKit::RemoteGraphicsContextGL::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGL::didComposite): (WebKit::RemoteGraphicsContextGL::forceContextLost): (WebKit::RemoteGraphicsContextGL::recycleContext): (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): (WebKit::RemoteGraphicsContextGL::recycleBuffer): (WebKit::RemoteGraphicsContextGL::present): (WebKit::RemoteGraphicsContextGL::detachClient): (WebKit::RemoteGraphicsContextGL::reshape): (WebKit::RemoteGraphicsContextGL::prepareForDisplay): (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged): * GPUProcess/graphics/RemoteGraphicsContextGL.h: Added. * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: Added. * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: Added. (setFailNextGPUStatusCheck): (synthesizeGLError): (moveErrorsToSyntheticErrorList): (activeTexture): (attachShader): (bindAttribLocation): (bindBuffer): (bindFramebuffer): (bindRenderbuffer): (bindTexture): (blendColor): (blendEquation): (blendEquationSeparate): (blendFunc): (blendFuncSeparate): (checkFramebufferStatus): (clear): (clearColor): (clearDepth): (clearStencil): (colorMask): (compileShader): (copyTexImage2D): (copyTexSubImage2D): (createBuffer): (createFramebuffer): (createProgram): (createRenderbuffer): (createShader): (createTexture): (cullFace): (deleteBuffer): (deleteFramebuffer): (deleteProgram): (deleteRenderbuffer): (deleteShader): (deleteTexture): (depthFunc): (depthMask): (depthRange): (detachShader): (disable): (disableVertexAttribArray): (drawArrays): (drawElements): (enable): (enableVertexAttribArray): (finish): (flush): (framebufferRenderbuffer): (framebufferTexture2D): (frontFace): (generateMipmap): (getActiveAttrib): (getActiveUniform): (getAttribLocation): (getBufferParameteri): (getString): (getFloatv): (getIntegerv): (getInteger64): (getInteger64i): (getProgrami): (getBooleanv): (getError): (getFramebufferAttachmentParameteri): (getProgramInfoLog): (getRenderbufferParameteri): (getShaderi): (getShaderInfoLog): (getShaderPrecisionFormat): (getShaderSource): (getTexParameterf): (getTexParameteri): (getUniformfv): (getUniformiv): (getUniformuiv): (getUniformLocation): (getVertexAttribOffset): (hint): (isBuffer): (isEnabled): (isFramebuffer): (isProgram): (isRenderbuffer): (isShader): (isTexture): (lineWidth): (linkProgram): (pixelStorei): (polygonOffset): (renderbufferStorage): (sampleCoverage): (scissor): (shaderSource): (stencilFunc): (stencilFuncSeparate): (stencilMask): (stencilMaskSeparate): (stencilOp): (stencilOpSeparate): (texParameterf): (texParameteri): (uniform1f): (uniform1fv): (uniform1i): (uniform1iv): (uniform2f): (uniform2fv): (uniform2i): (uniform2iv): (uniform3f): (uniform3fv): (uniform3i): (uniform3iv): (uniform4f): (uniform4fv): (uniform4i): (uniform4iv): (uniformMatrix2fv): (uniformMatrix3fv): (uniformMatrix4fv): (useProgram): (validateProgram): (vertexAttrib1f): (vertexAttrib1fv): (vertexAttrib2f): (vertexAttrib2fv): (vertexAttrib3f): (vertexAttrib3fv): (vertexAttrib4f): (vertexAttrib4fv): (vertexAttribPointer): (viewport): (bufferData0): (bufferData1): (bufferSubData): (readnPixels0): (readnPixels1): (texImage2D0): (texImage2D1): (texSubImage2D0): (texSubImage2D1): (compressedTexImage2D0): (compressedTexImage2D1): (compressedTexSubImage2D0): (compressedTexSubImage2D1): (drawArraysInstanced): (drawElementsInstanced): (vertexAttribDivisor): (createVertexArray): (deleteVertexArray): (isVertexArray): (bindVertexArray): (copyBufferSubData): (getBufferSubData): (blitFramebuffer): (framebufferTextureLayer): (invalidateFramebuffer): (invalidateSubFramebuffer): (readBuffer): (renderbufferStorageMultisample): (texStorage2D): (texStorage3D): (texImage3D0): (texImage3D1): (texSubImage3D0): (texSubImage3D1): (copyTexSubImage3D): (compressedTexImage3D0): (compressedTexImage3D1): (compressedTexSubImage3D0): (compressedTexSubImage3D1): (getFragDataLocation): (uniform1ui): (uniform2ui): (uniform3ui): (uniform4ui): (uniform1uiv): (uniform2uiv): (uniform3uiv): (uniform4uiv): (uniformMatrix2x3fv): (uniformMatrix3x2fv): (uniformMatrix2x4fv): (uniformMatrix4x2fv): (uniformMatrix3x4fv): (uniformMatrix4x3fv): (vertexAttribI4i): (vertexAttribI4iv): (vertexAttribI4ui): (vertexAttribI4uiv): (vertexAttribIPointer): (drawRangeElements): (drawBuffers): (clearBufferiv): (clearBufferuiv): (clearBufferfv): (clearBufferfi): (createQuery): (deleteQuery): (isQuery): (beginQuery): (endQuery): (getQuery): (getQueryObjectui): (createSampler): (deleteSampler): (isSampler): (bindSampler): (samplerParameteri): (samplerParameterf): (getSamplerParameterf): (getSamplerParameteri): (fenceSync): (isSync): (deleteSync): (clientWaitSync): (waitSync): (getSynci): (createTransformFeedback): (deleteTransformFeedback): (isTransformFeedback): (bindTransformFeedback): (beginTransformFeedback): (endTransformFeedback): (transformFeedbackVaryings): (getTransformFeedbackVarying): (pauseTransformFeedback): (resumeTransformFeedback): (bindBufferBase): (bindBufferRange): (getUniformIndices): (getActiveUniforms): (getUniformBlockIndex): (getActiveUniformBlockName): (uniformBlockBinding): (getActiveUniformBlockiv): (getGraphicsResetStatusARB): (blitFramebufferANGLE): (renderbufferStorageMultisampleANGLE): (createVertexArrayOES): (deleteVertexArrayOES): (isVertexArrayOES): (bindVertexArrayOES): (getTranslatedShaderSourceANGLE): (insertEventMarkerEXT): (pushGroupMarkerEXT): (popGroupMarkerEXT): (drawBuffersEXT): (drawArraysInstancedANGLE): (drawElementsInstancedANGLE): (vertexAttribDivisorANGLE): * GPUProcess/mac/GPUProcessMac.mm: (WebKit::GPUProcess::initializeProcess): * GPUProcess/media/RemoteLegacyCDMProxy.h: * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: * GPUProcess/media/RemoteMediaResourceManager.cpp: * GPUProcess/media/RemoteMediaResourceManager.h: * GPUProcess/media/RemoteMediaSourceProxy.h: * GPUProcess/media/RemoteSourceBufferProxy.cpp: * GPUProcess/media/RemoteSourceBufferProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: * GPUProcess/webrtc/RemoteMediaRecorder.h: * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/Download.h: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/DownloadManager.h: * NetworkProcess/NetworkSocketChannel.cpp: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/NetworkSocketStream.h: * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: * NetworkProcess/soup/WebSocketTaskSoup.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * Platform/IPC/ArgumentCoders.h: * Platform/IPC/ArrayReference.h: Copied from Source/WebKit/Platform/IPC/DataReference.h. (IPC::ArrayReference::ArrayReference): (IPC::ArrayReference::isEmpty const): (IPC::ArrayReference::size const): (IPC::ArrayReference::data const): (IPC::ArrayReference::vector const): * Platform/IPC/Connection.h: (IPC::Connection::sendSync): * Platform/IPC/DataReference.h: * Platform/IPC/Decoder.cpp: (IPC::Decoder::decodeFixedLengthReference): * Platform/IPC/Decoder.h: * Platform/IPC/Encoder.cpp: (IPC::Encoder::wrapForTesting): * Platform/IPC/Encoder.h: * Platform/IPC/HandleMessage.h: * Platform/IPC/MessageSender.h: (IPC::MessageSender::sendSync): * Platform/IPC/SharedBufferCopy.cpp: (IPC::SharedBufferCopy::decode): * Platform/IPC/SharedBufferDataReference.cpp: * Platform/IPC/StringReference.cpp: * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * Scripts/webkit/messages.py: * Shared/API/APIData.cpp: * Shared/AuxiliaryProcess.h: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cf/ArgumentCodersCF.cpp: * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder<CertificateInfo>::encode): (IPC::ArgumentCoder<CertificateInfo>::decode): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::sendSync): * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: * UIProcess/PageClient.h: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: * UIProcess/WebURLSchemeHandler.h: * UIProcess/WebURLSchemeTask.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h: Renamed from Source/WebKit/Platform/IPC/DataReference.cpp. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::create): (WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::messageSenderConnection const): (WebKit::RemoteGraphicsContextGLProxy::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGLProxy::reshape): (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): (WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGLProxy::notifyMarkContextChanged): (WebKit::RemoteGraphicsContextGLProxy::simulateContextChanged): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): (WebKit::RemoteGraphicsContextGLProxy::wasCreated): (WebKit::RemoteGraphicsContextGLProxy::wasLost): (WebKit::RemoteGraphicsContextGLProxy::wasChanged): (WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: Added. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck): (WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError): (WebKit::RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList): (WebKit::RemoteGraphicsContextGLProxy::activeTexture): (WebKit::RemoteGraphicsContextGLProxy::attachShader): (WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::bindBuffer): (WebKit::RemoteGraphicsContextGLProxy::bindFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::bindRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::bindTexture): (WebKit::RemoteGraphicsContextGLProxy::blendColor): (WebKit::RemoteGraphicsContextGLProxy::blendEquation): (WebKit::RemoteGraphicsContextGLProxy::blendEquationSeparate): (WebKit::RemoteGraphicsContextGLProxy::blendFunc): (WebKit::RemoteGraphicsContextGLProxy::blendFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::checkFramebufferStatus): (WebKit::RemoteGraphicsContextGLProxy::clear): (WebKit::RemoteGraphicsContextGLProxy::clearColor): (WebKit::RemoteGraphicsContextGLProxy::clearDepth): (WebKit::RemoteGraphicsContextGLProxy::clearStencil): (WebKit::RemoteGraphicsContextGLProxy::colorMask): (WebKit::RemoteGraphicsContextGLProxy::compileShader): (WebKit::RemoteGraphicsContextGLProxy::copyTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::createBuffer): (WebKit::RemoteGraphicsContextGLProxy::createFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::createProgram): (WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::createShader): (WebKit::RemoteGraphicsContextGLProxy::createTexture): (WebKit::RemoteGraphicsContextGLProxy::cullFace): (WebKit::RemoteGraphicsContextGLProxy::deleteBuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteProgram): (WebKit::RemoteGraphicsContextGLProxy::deleteRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteShader): (WebKit::RemoteGraphicsContextGLProxy::deleteTexture): (WebKit::RemoteGraphicsContextGLProxy::depthFunc): (WebKit::RemoteGraphicsContextGLProxy::depthMask): (WebKit::RemoteGraphicsContextGLProxy::depthRange): (WebKit::RemoteGraphicsContextGLProxy::detachShader): (WebKit::RemoteGraphicsContextGLProxy::disable): (WebKit::RemoteGraphicsContextGLProxy::disableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::drawArrays): (WebKit::RemoteGraphicsContextGLProxy::drawElements): (WebKit::RemoteGraphicsContextGLProxy::enable): (WebKit::RemoteGraphicsContextGLProxy::enableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::finish): (WebKit::RemoteGraphicsContextGLProxy::flush): (WebKit::RemoteGraphicsContextGLProxy::framebufferRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTexture2D): (WebKit::RemoteGraphicsContextGLProxy::frontFace): (WebKit::RemoteGraphicsContextGLProxy::generateMipmap): (WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniform): (WebKit::RemoteGraphicsContextGLProxy::getAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getString): (WebKit::RemoteGraphicsContextGLProxy::getFloatv): (WebKit::RemoteGraphicsContextGLProxy::getIntegerv): (WebKit::RemoteGraphicsContextGLProxy::getInteger64): (WebKit::RemoteGraphicsContextGLProxy::getInteger64i): (WebKit::RemoteGraphicsContextGLProxy::getProgrami): (WebKit::RemoteGraphicsContextGLProxy::getBooleanv): (WebKit::RemoteGraphicsContextGLProxy::getError): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri): (WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getRenderbufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getShaderi): (WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): (WebKit::RemoteGraphicsContextGLProxy::getShaderSource): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterf): (WebKit::RemoteGraphicsContextGLProxy::getTexParameteri): (WebKit::RemoteGraphicsContextGLProxy::getUniformfv): (WebKit::RemoteGraphicsContextGLProxy::getUniformiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformuiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformLocation): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribOffset): (WebKit::RemoteGraphicsContextGLProxy::hint): (WebKit::RemoteGraphicsContextGLProxy::isBuffer): (WebKit::RemoteGraphicsContextGLProxy::isEnabled): (WebKit::RemoteGraphicsContextGLProxy::isFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::isProgram): (WebKit::RemoteGraphicsContextGLProxy::isRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::isShader): (WebKit::RemoteGraphicsContextGLProxy::isTexture): (WebKit::RemoteGraphicsContextGLProxy::lineWidth): (WebKit::RemoteGraphicsContextGLProxy::linkProgram): (WebKit::RemoteGraphicsContextGLProxy::pixelStorei): (WebKit::RemoteGraphicsContextGLProxy::polygonOffset): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorage): (WebKit::RemoteGraphicsContextGLProxy::sampleCoverage): (WebKit::RemoteGraphicsContextGLProxy::scissor): (WebKit::RemoteGraphicsContextGLProxy::shaderSource): (WebKit::RemoteGraphicsContextGLProxy::stencilFunc): (WebKit::RemoteGraphicsContextGLProxy::stencilFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilMask): (WebKit::RemoteGraphicsContextGLProxy::stencilMaskSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilOp): (WebKit::RemoteGraphicsContextGLProxy::stencilOpSeparate): (WebKit::RemoteGraphicsContextGLProxy::texParameterf): (WebKit::RemoteGraphicsContextGLProxy::texParameteri): (WebKit::RemoteGraphicsContextGLProxy::uniform1f): (WebKit::RemoteGraphicsContextGLProxy::uniform1fv): (WebKit::RemoteGraphicsContextGLProxy::uniform1i): (WebKit::RemoteGraphicsContextGLProxy::uniform1iv): (WebKit::RemoteGraphicsContextGLProxy::uniform2f): (WebKit::RemoteGraphicsContextGLProxy::uniform2fv): (WebKit::RemoteGraphicsContextGLProxy::uniform2i): (WebKit::RemoteGraphicsContextGLProxy::uniform2iv): (WebKit::RemoteGraphicsContextGLProxy::uniform3f): (WebKit::RemoteGraphicsContextGLProxy::uniform3fv): (WebKit::RemoteGraphicsContextGLProxy::uniform3i): (WebKit::RemoteGraphicsContextGLProxy::uniform3iv): (WebKit::RemoteGraphicsContextGLProxy::uniform4f): (WebKit::RemoteGraphicsContextGLProxy::uniform4fv): (WebKit::RemoteGraphicsContextGLProxy::uniform4i): (WebKit::RemoteGraphicsContextGLProxy::uniform4iv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4fv): (WebKit::RemoteGraphicsContextGLProxy::useProgram): (WebKit::RemoteGraphicsContextGLProxy::validateProgram): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribPointer): (WebKit::RemoteGraphicsContextGLProxy::viewport): (WebKit::RemoteGraphicsContextGLProxy::bufferData): (WebKit::RemoteGraphicsContextGLProxy::bufferSubData): (WebKit::RemoteGraphicsContextGLProxy::readnPixels): (WebKit::RemoteGraphicsContextGLProxy::texImage2D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstanced): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstanced): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisor): (WebKit::RemoteGraphicsContextGLProxy::createVertexArray): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArray): (WebKit::RemoteGraphicsContextGLProxy::isVertexArray): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArray): (WebKit::RemoteGraphicsContextGLProxy::copyBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::blitFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTextureLayer): (WebKit::RemoteGraphicsContextGLProxy::invalidateFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::invalidateSubFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::readBuffer): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisample): (WebKit::RemoteGraphicsContextGLProxy::texStorage2D): (WebKit::RemoteGraphicsContextGLProxy::texStorage3D): (WebKit::RemoteGraphicsContextGLProxy::texImage3D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation): (WebKit::RemoteGraphicsContextGLProxy::uniform1ui): (WebKit::RemoteGraphicsContextGLProxy::uniform2ui): (WebKit::RemoteGraphicsContextGLProxy::uniform3ui): (WebKit::RemoteGraphicsContextGLProxy::uniform4ui): (WebKit::RemoteGraphicsContextGLProxy::uniform1uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform2uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform3uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform4uiv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4i): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4iv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4ui): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4uiv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribIPointer): (WebKit::RemoteGraphicsContextGLProxy::drawRangeElements): (WebKit::RemoteGraphicsContextGLProxy::drawBuffers): (WebKit::RemoteGraphicsContextGLProxy::clearBufferiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferuiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfi): (WebKit::RemoteGraphicsContextGLProxy::createQuery): (WebKit::RemoteGraphicsContextGLProxy::deleteQuery): (WebKit::RemoteGraphicsContextGLProxy::isQuery): (WebKit::RemoteGraphicsContextGLProxy::beginQuery): (WebKit::RemoteGraphicsContextGLProxy::endQuery): (WebKit::RemoteGraphicsContextGLProxy::getQuery): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui): (WebKit::RemoteGraphicsContextGLProxy::createSampler): (WebKit::RemoteGraphicsContextGLProxy::deleteSampler): (WebKit::RemoteGraphicsContextGLProxy::isSampler): (WebKit::RemoteGraphicsContextGLProxy::bindSampler): (WebKit::RemoteGraphicsContextGLProxy::samplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::fenceSync): (WebKit::RemoteGraphicsContextGLProxy::isSync): (WebKit::RemoteGraphicsContextGLProxy::deleteSync): (WebKit::RemoteGraphicsContextGLProxy::clientWaitSync): (WebKit::RemoteGraphicsContextGLProxy::waitSync): (WebKit::RemoteGraphicsContextGLProxy::getSynci): (WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::deleteTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::isTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::beginTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::endTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings): (WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying): (WebKit::RemoteGraphicsContextGLProxy::pauseTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::resumeTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindBufferBase): (WebKit::RemoteGraphicsContextGLProxy::bindBufferRange): (WebKit::RemoteGraphicsContextGLProxy::getUniformIndices): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniforms): (WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName): (WebKit::RemoteGraphicsContextGLProxy::uniformBlockBinding): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockiv): (WebKit::RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB): (WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): (WebKit::RemoteGraphicsContextGLProxy::createVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::isVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE): (WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::drawBuffersEXT): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativ): (WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess): * WebProcess/GPU/media/RemoteAudioSession.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: * WebProcess/GPU/media/SourceBufferPrivateRemote.h: * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebSocketChannel.cpp: * WebProcess/Network/WebSocketChannel.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.h: * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createGraphicsContextGL const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForWebGL): (WebKit::WebProcess::shouldUseRemoteRenderingForWebGL const): * WebProcess/WebProcess.h: Tools: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC and is incomplete. Add the code generator to generate the implementation. Currently the generator generates a WebKit IPC implementation. The input definition to the generator is the proxy implementation header files. The output of the generator is - WebKit IPC message definition file - Message sender code - Message receiver and payload invocation code The generator converts GraphicsContextGL GCGL -prefixed types to sized IPC types. The generator is invoked during development time and the results are stored in the repository. * Scripts/generate-gpup-webgl: Added. LayoutTests: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Adds test expectations for the missing functionality. Does not yet enable the tests that actually pass but which were skipped before the implementation. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/232258@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 18:32:29 +00:00
WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
[GPU Process] Exchange RemoteImageBuffer and RemoteImageBufferProxy https://bugs.webkit.org/show_bug.cgi?id=217809 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-10-16 Reviewed by Simon Fraser. The names of the GPU rendering classes have been confusing. RemoteImageBuffer should be the real object in the GPU Process because it owns the backend. And RemoteImageBufferProxy should be a proxy to this object in the Web Process. So we are going to exchange the following classes: -- RemoteImageBuffer <-> RemoteImageBufferProxy -- RemoteRenderingBackend <-> RemoteRenderingBackendProxy -- RemoteImageBufferMessageHandler <-> RemoteImageBufferMessageHandlerProxy * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createRenderingBackend): (WebKit::GPUConnectionToWebProcess::releaseRenderingBackend): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/graphics/PlatformRemoteImageBuffer.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/PlatformRemoteImageBuffer.h. * GPUProcess/graphics/RemoteImageBuffer.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferProxy.h. (WebKit::RemoteImageBuffer::create): (WebKit::RemoteImageBuffer::RemoteImageBuffer): (WebKit::RemoteImageBuffer::~RemoteImageBuffer): (WebKit::RemoteImageBuffer::apply): * GPUProcess/graphics/RemoteImageBufferMessageHandler.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.cpp. (WebKit::RemoteImageBufferMessageHandler::RemoteImageBufferMessageHandler): (WebKit::RemoteImageBufferMessageHandler::createBackend): (WebKit::RemoteImageBufferMessageHandler::commitFlushContext): * GPUProcess/graphics/RemoteImageBufferMessageHandler.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h. (WebKit::RemoteImageBufferMessageHandler::backend): * GPUProcess/graphics/RemoteRenderingBackend.cpp: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.cpp. (WebKit::RemoteRenderingBackend::create): (WebKit::RemoteRenderingBackend::RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::~RemoteRenderingBackend): (WebKit::RemoteRenderingBackend::messageSenderConnection const): (WebKit::RemoteRenderingBackend::messageSenderDestinationID const): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::releaseRemoteResource): (WebKit::RemoteRenderingBackend::getImageData): (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContext): (WebKit::RemoteRenderingBackend::flushImageBufferDrawingContextAndCommit): (WebKit::RemoteRenderingBackend::gpuConnectionToWebProcess const): * GPUProcess/graphics/RemoteRenderingBackend.h: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.h. (WebKit::RemoteRenderingBackend::renderingBackendIdentifier const): * GPUProcess/graphics/RemoteRenderingBackend.messages.in: Renamed from Source/WebKit/GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in. * GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/PlatformRemoteImageBufferProxy.h: Renamed from Source/WebKit/GPUProcess/graphics/PlatformRemoteImageBufferProxy.h. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.cpp: Removed. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp: Added. (WebKit::RemoteImageBufferMessageHandlerProxy::RemoteImageBufferMessageHandlerProxy): (WebKit::RemoteImageBufferMessageHandlerProxy::~RemoteImageBufferMessageHandlerProxy): (WebKit::RemoteImageBufferMessageHandlerProxy::getImageData const): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCreateImageBufferBackend): (WebKit::RemoteImageBufferMessageHandlerProxy::waitForCommitImageBufferFlushContext): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContext): (WebKit::RemoteImageBufferMessageHandlerProxy::flushDrawingContextAndWaitCommit): (WebKit::RemoteImageBufferMessageHandlerProxy::commitFlushContext): * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h. (WebKit::RemoteImageBufferMessageHandlerProxy::remoteResourceIdentifier const): (WebKit::RemoteImageBufferMessageHandlerProxy::isPendingFlush const): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteImageBuffer.h. (WebKit::RemoteImageBufferProxy::create): (WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::putImageData): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.cpp. (WebKit::RemoteRenderingBackendProxy::create): (WebKit::RemoteRenderingBackendProxy::RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy): (WebKit::RemoteRenderingBackendProxy::messageSenderConnection const): (WebKit::RemoteRenderingBackendProxy::messageSenderDestinationID const): (WebKit::RemoteRenderingBackendProxy::waitForCreateImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::waitForCommitImageBufferFlushContext): (WebKit::RemoteRenderingBackendProxy::createImageBuffer): (WebKit::RemoteRenderingBackendProxy::releaseRemoteResource): (WebKit::RemoteRenderingBackendProxy::createImageBufferBackend): (WebKit::RemoteRenderingBackendProxy::commitImageBufferFlushContext): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.h. (WebKit::RemoteRenderingBackendProxy::renderingBackendIdentifier const): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: Renamed from Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::ensureRemoteRenderingBackendProxy const): (WebKit::WebChromeClient::createImageBuffer const): (WebKit::WebChromeClient::ensureRemoteRenderingBackend const): Deleted. * WebProcess/WebCoreSupport/WebChromeClient.h: Canonical link: https://commits.webkit.org/230574@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 22:20:58 +00:00
WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
[GPU Process]: Introduce RemoteResourceCacheProxy to manage the remote resources in Web Process https://bugs.webkit.org/show_bug.cgi?id=217558 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-10-26 Reviewed by Simon Fraser. Source/WebCore: Rename Recorder::Observer to Recorder::Delegate because it will be responsible for creating DisplayListItems in future patches. So it will not be just an observer. Also do not make DisplayList::ImageBuffer a superclass of it. RemoteImageBufferProxy, which is a superclass of DisplayList::ImageBuffer, will be the superclass of Recorder::Delegate. Make ImageBufferBackend::isAccelerated a static member instead of a virtual method. RemoteRenderingBackendProxy would want to know whether the backend of an ImageBuffer isAccelerated or not without having to create it. ImageBufferBackend::isAccelerated will be set to false and ImageBufferIOSurfaceBackend::isAccelerated will be set to true. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ConcreteImageBuffer.h: * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::renderingResourceIdentifier const): * platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::isAccelerated const): Deleted. * platform/graphics/RenderingResourceIdentifier.h: Renamed from Source/WebCore/platform/graphics/RemoteResourceIdentifier.h. * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::isAccelerated const): Deleted. * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * platform/graphics/displaylists/DisplayListDrawingContext.cpp: (WebCore::DisplayList::DrawingContext::DrawingContext): * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::DrawingContext): * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::ImageBuffer): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::Recorder): (WebCore::DisplayList::Recorder::willAppendItem): * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::Delegate::~Delegate): (WebCore::DisplayList::Recorder::Observer::~Observer): Deleted. (WebCore::DisplayList::Recorder::Observer::willAppendItem): Deleted. Source/WebKit: Remove RemoteImageBufferMessageHandlerProxy and move sending the messages to RemoteRenderingBackendProxy. To allow casting ImageBuffer to RemoteImageBufferProxy, a new method named remoteResourceIdentifier() is added to IamgeBuffer and it is only overridden by RemoteImageBufferProxy. This method is used in SPECIALIZE_TYPE_TRAITS macros along with IamgeBuffer::isAccelerated(). Introduce RemoteResourceCacheProxy which will manage caching and releasing the RemoteImageBufferProxy. Caching NativeImage will be added to it in future patches. More about controlling the life cycles of remote resources will be added also when supporting drawing remote resources to remote client in future patches. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::create): (WebKit::RemoteImageBuffer::RemoteImageBuffer): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::imageBufferBackendWasCreated): (WebKit::RemoteRenderingBackend::flushDisplayListWasCommitted): (WebKit::RemoteRenderingBackend::createImageBuffer): (WebKit::RemoteRenderingBackend::flushDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackend::getImageData): (WebKit::RemoteRenderingBackend::releaseRemoteResource): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/graphics/RemoteRenderingBackend.messages.in: * GPUProcess/graphics/RemoteResourceCache.cpp: (WebKit::RemoteResourceCache::cacheImageBuffer): (WebKit::RemoteResourceCache::cachedImageBuffer): (WebKit::RemoteResourceCache::releaseRemoteResource): * GPUProcess/graphics/RemoteResourceCache.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/PlatformRemoteImageBufferProxy.h: (isType): * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.cpp: Removed. * WebProcess/GPU/graphics/RemoteImageBufferMessageHandlerProxy.h: Removed. * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::create): (WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::createBackend): (WebKit::RemoteImageBufferProxy::commitFlushDisplayList): (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): (WebKit::RemoteImageBufferProxy::isPendingFlush const): (WebKit::RemoteImageBufferProxy::timeoutWaitForFlushDisplayListWasCommitted): (WebKit::RemoteImageBufferProxy::flushDrawingContextAndCommit): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createImageBuffer): (WebKit::RemoteRenderingBackendProxy::getImageData): (WebKit::RemoteRenderingBackendProxy::flushDisplayList): (WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackendProxy::releaseRemoteResource): (WebKit::RemoteRenderingBackendProxy::imageBufferBackendWasCreated): (WebKit::RemoteRenderingBackendProxy::flushDisplayListWasCommitted): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: (WebKit::RemoteRenderingBackendProxy::remoteResourceCacheProxy): (WebKit::RemoteRenderingBackendProxy::renderingBackendIdentifier const): Deleted. * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: * WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: Copied from Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp. (WebKit::RemoteResourceCacheProxy::RemoteResourceCacheProxy): (WebKit::RemoteResourceCacheProxy::cacheImageBuffer): (WebKit::RemoteResourceCacheProxy::cachedImageBuffer): (WebKit::RemoteResourceCacheProxy::releaseImageBuffer): * WebProcess/GPU/graphics/RemoteResourceCacheProxy.h: Copied from Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h. Canonical link: https://commits.webkit.org/230913@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-27 04:39:55 +00:00
WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
Expose audio tracks for media files in the GPUProcess https://bugs.webkit.org/show_bug.cgi?id=206152 <rdar://problem/58513227> Reviewed by youenn fablet. Source/WebCore: No new tests, un-skipped existing tests that pass because of this change. * platform/graphics/AudioTrackPrivate.h: * platform/graphics/TrackPrivateBase.h: Source/WebKit: * GPUProcess/media/RemoteAudioTrackProxy.cpp: Added. (WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy): (WebKit::RemoteAudioTrackProxy::configuration): (WebKit::RemoteAudioTrackProxy::configurationChanged): (WebKit::RemoteAudioTrackProxy::willRemove): (WebKit::RemoteAudioTrackProxy::enabledChanged): (WebKit::RemoteAudioTrackProxy::idChanged): (WebKit::RemoteAudioTrackProxy::labelChanged): (WebKit::RemoteAudioTrackProxy::languageChanged): * GPUProcess/media/RemoteAudioTrackProxy.h: Added. * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::setRate): (WebKit::RemoteMediaPlayerManagerProxy::audioTrackSetEnabled): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack): (WebKit::RemoteMediaPlayerProxy::audioTrackSetEnabled): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/TrackPrivateRemoteConfiguration.h: Added. (WebKit::TrackPrivateRemoteConfiguration::encode const): (WebKit::TrackPrivateRemoteConfiguration::decode): * GPUProcess/media/TrackPrivateRemoteIdentifier.h: Added. * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: Added. (WebKit::AudioTrackPrivateRemote::AudioTrackPrivateRemote): (WebKit::AudioTrackPrivateRemote::setEnabled): (WebKit::AudioTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/AudioTrackPrivateRemote.h: Added. (WebKit::AudioTrackPrivateRemote::create): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::timeChanged): (WebKit::RemoteMediaPlayerManager::durationChanged): (WebKit::RemoteMediaPlayerManager::engineFailedToLoad): (WebKit::RemoteMediaPlayerManager::characteristicChanged): (WebKit::RemoteMediaPlayerManager::sizeChanged): (WebKit::RemoteMediaPlayerManager::addRemoteAudioTrack): (WebKit::RemoteMediaPlayerManager::removeRemoteAudioTrack): (WebKit::RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged): (WebKit::RemoteMediaPlayerManager::updateCachedState): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/219281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-13 22:27:39 +00:00
WebProcess/GPU/media/AudioTrackPrivateRemote.cpp
WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
[Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process https://bugs.webkit.org/show_bug.cgi?id=218912 Reviewed by Eric Carlson. Source/WebCore: This patch makes the MSE version of MediaPlayer::load() the same as the one in MediaPlayerPrivate to support running MSE MediaPlayerPrivate(s) in the GPU process. No new tests, no functional change yet. * Headers.cmake: * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::createSourceBufferPrivate): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): * WebCore.xcodeproj/project.pbxproj: * platform/ContentType.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/MediaSourcePrivate.h: * platform/graphics/SourceBufferPrivateClient.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::load): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::load): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::addSourceBuffer): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::load): * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::append): Source/WebKit: Add MediaSourcePrivateRemote/RemoteMediaSourceProxy and SourceBufferPrivateRemote/RemoteSourceBufferProxy, and setup IPC connections for them. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcessSessionParameters.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::loadMediaSource): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteMediaSourceProxy.cpp: Added. (WebKit::RemoteMediaSourceProxy::RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::~RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::setPrivateAndOpen): (WebKit::RemoteMediaSourceProxy::duration const): (WebKit::RemoteMediaSourceProxy::buffered const): (WebKit::RemoteMediaSourceProxy::seekToTime): (WebKit::RemoteMediaSourceProxy::monitorSourceBuffers): (WebKit::RemoteMediaSourceProxy::setLogIdentifier): (WebKit::RemoteMediaSourceProxy::failedToCreateRenderer): (WebKit::RemoteMediaSourceProxy::addSourceBuffer): * GPUProcess/media/RemoteMediaSourceProxy.h: Added. * GPUProcess/media/RemoteMediaSourceProxy.messages.in: Added. * GPUProcess/media/RemoteSourceBufferIdentifier.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.cpp: Added. (WebKit::RemoteSourceBufferProxy::create): (WebKit::RemoteSourceBufferProxy::RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::~RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError): (WebKit::RemoteSourceBufferProxy::append): * GPUProcess/media/RemoteSourceBufferProxy.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.messages.in: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::load): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: Added. (WebKit::MediaSourcePrivateRemote::create): (WebKit::MediaSourcePrivateRemote::MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::~MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::durationChanged): (WebKit::MediaSourcePrivateRemote::markEndOfStream): (WebKit::MediaSourcePrivateRemote::unmarkEndOfStream): (WebKit::MediaSourcePrivateRemote::readyState const): (WebKit::MediaSourcePrivateRemote::setReadyState): (WebKit::MediaSourcePrivateRemote::waitForSeekCompleted): (WebKit::MediaSourcePrivateRemote::seekCompleted): (WebKit::MediaSourcePrivateRemote::logChannel const): * WebProcess/GPU/media/MediaSourcePrivateRemote.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaSourceIdentifier.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: Added. (WebKit::SourceBufferPrivateRemote::create): (WebKit::SourceBufferPrivateRemote::SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::~SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::setClient): (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::abort): (WebKit::SourceBufferPrivateRemote::resetParserState): (WebKit::SourceBufferPrivateRemote::removedFromMediaSource): (WebKit::SourceBufferPrivateRemote::readyState const): (WebKit::SourceBufferPrivateRemote::setReadyState): (WebKit::SourceBufferPrivateRemote::flush): (WebKit::SourceBufferPrivateRemote::enqueueSample): (WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::setActive): (WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): (WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::canSwitchToType): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete): (WebKit::SourceBufferPrivateRemote::logChannel const): * WebProcess/GPU/media/SourceBufferPrivateRemote.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: Added. Canonical link: https://commits.webkit.org/231660@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 17:25:27 +00:00
WebProcess/GPU/media/MediaSourcePrivateRemote.cpp
Create AudioDestination in the GPU process https://bugs.webkit.org/show_bug.cgi?id=208179 Reviewed by Jer Noble. Source/WebCore: Add an abstraction around the creation of AudioDestination using newly introduced mediaStrategy. * Headers.cmake: * Modules/webaudio/DefaultAudioDestinationNode.cpp: (WebCore::DefaultAudioDestinationNode::createDestination): Use MediaStrategy::createAudioDestination * WebCore.xcodeproj/project.pbxproj: * platform/MediaStrategy.h: Added. (WebCore::MediaStrategy): Added. * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::mediaStrategy): Added. * platform/audio/AudioBus.h: * platform/audio/AudioDestination.h: Source/WebKit: Create AudioDestination in the GPU process instead of the WebContent process for WebAudio API when the Media-in-GPU-process feature is enabled. To do this, WebMediaStrategy, a concrete implementation of MediaStrategy, in the WebContent process gets a boolean flag indicating whether the GPU process should be used for AudioDestination or not. When the flag is set, we create RemoteAudioDestinationProxy instead of AudioDestination in WebContent process. Each RemoteAudioDestinationProxy talks to RemoteAudioDestinationManager in the GPU process and creates a corresponding RemoteAudioDestination which in turn creates WebCore's AudioDestination in the GPU process. RemoteAudioDestination is itself an AudioIOCallback for AudioDestination it creates, and delegates its callback to WebContent process' RemoteAudioDestinationProxy as needed. In this initial patch, we send RemoteAudioDestinationProxy::RenderBuffer IPC call to the WebContent process for each render call we get from CoreAudio for simplicity using newly introduced RemoteAudioBusData, which holds a SharedMemory for each channel in the audio bus. We will eliminate this IPC overhead in a follow up patch using CARingBuffer. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::remoteAudioDestinationManager): Added. (WebKit::GPUConnectionToWebProcess::didReceiveMessage): Added the code to dispatch messages to RemoteAudioDestinationManager. (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): Ditto. * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteAudioDestinationManager.cpp: Added. (WebKit::RemoteAudioDestination): Added. This class is the backing object which creates WebCore's AudioDestination and actually talks to CoreAudio in GPU process. (WebKit::RemoteAudioDestination::create): Added. (WebKit::RemoteAudioDestination::~RemoteAudioDestination): Added. (WebKit::RemoteAudioDestination::scheduleGracefulShutdownIfNeeded): Delays the deletion of this object until the audio threads stops running. (WebKit::RemoteAudioDestination::start): Added. (WebKit::RemoteAudioDestination::stop): Added. (WebKit::RemoteAudioDestination::isPlaying): Added. (WebKit::RemoteAudioDestination::RemoteAudioDestination): Added. (WebKit::RemoteAudioDestination::render): Sends a sync IPC to the WebContent process' RemoteAudioDestinationProxy to fill the audio buffer. Note that this function gets called in audio thread. (WebKit::RemoteAudioDestination::isPlayingDidChange): Added. (WebKit::RemoteAudioDestinationManager): Added. This class manages all RemoteAudioDestination objects owned by a single WebContent process. (WebKit::RemoteAudioDestinationManager::RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::~RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::createAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::deleteAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::startAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::stopAudioDestination): Added. * GPUProcess/media/RemoteAudioDestinationManager.h: Added. (WebKit::RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess): Added. (WebKit::RemoteAudioDestinationManager::didReceiveMessageFromWebProcess): Added. * GPUProcess/media/RemoteAudioDestinationManager.messages.in: Added. * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createMediaStrategy): Added. Returns nullptr since Networking process has no business running AudioDestination. * NetworkProcess/NetworkProcessPlatformStrategies.h: (WebKit::NetworkProcessPlatformStrategies): * PlatformMac.cmake: * Scripts/webkit/messages.py: * Shared/RemoteAudioDestinationIdentifier.h: Added. (WebKit::RemoteAudioDestinationIdentifierType): Added. (WebKit::RemoteAudioDestinationIdentifier): Added. The identifier for each RemoteAudioDestination and RemoteAudioDestinationProxy (corresponding objects of each class use the same ID to communicate). * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioBusData.h: Added. (WebKit::RemoteAudioBusData): Added. Encodes the information about each render call. (WebKit::RemoteAudioBusData::encode const): Added. (WebKit::RemoteAudioBusData::decode): Added. * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: Added. (WebKit::RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::create): Added. (WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::~RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::start): Added. (WebKit::RemoteAudioDestinationProxy::stop): Added. (WebKit::RemoteAudioDestinationProxy::renderBuffer): Added. Calls WebCore's AudioIOCallback to fill the audio buffer given by the GPU process. (WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: Added. (WebKit::RemoteAudioDestinationProxy::didReceiveMessageFromGPUProcess): Added. (WebKit::RemoteAudioDestinationProxy::isPlaying): Added. (WebKit::RemoteAudioDestinationProxy::sampleRate): Added. * WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in: Added. * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Fixed the unified builds. * WebProcess/GPU/media/TextTrackPrivateRemote.h: Ditto. * WebProcess/GPU/media/WebMediaStrategy.cpp: Added. (WebKit::WebMediaStrategy::createAudioDestination): Added. * WebProcess/GPU/media/WebMediaStrategy.h: Added. (WebKit::WebMediaStrategy): Added. (WebKit::WebMediaStrategy::setUseGPUProcess): Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: Fixed the unified builds. * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Fixed the unified builds. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createMediaStrategy): Added. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Sets WebMediaStrategy's flag to use GPU process. Source/WebKitLegacy/mac: Added WebMediaStrategy which is a wrapper around AudioDestination::create. * WebCoreSupport/WebPlatformStrategies.h: * WebCoreSupport/WebPlatformStrategies.mm: (WebMediaStrategy): Added. (WebPlatformStrategies::createMediaStrategy): Source/WebKitLegacy/win: Added WebMediaStrategy which is a wrapper around AudioDestination::create. * WebCoreSupport/WebPlatformStrategies.cpp: (WebMediaStrategy): Added. (WebPlatformStrategies::createMediaStrategy): * WebCoreSupport/WebPlatformStrategies.h: Canonical link: https://commits.webkit.org/221234@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-27 03:51:17 +00:00
WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp
Move AudioHardwareListener into the GPU Process https://bugs.webkit.org/show_bug.cgi?id=221455 Reviewed by Eric Carlson. Source/WebCore: Allow clients to override the creation method for AudioHardwareListener::create(). * platform/audio/AudioHardwareListener.cpp: (WebCore::audioHardwareListenerCreationFunction): (WebCore::AudioHardwareListener::setCreationFunction): (WebCore::AudioHardwareListener::resetCreationFunction): (WebCore::AudioHardwareListener::create): * platform/audio/AudioHardwareListener.h: * platform/audio/mac/AudioHardwareListenerMac.cpp: (WebCore::AudioHardwareListener::create): Deleted. Source/WebKit: Add a new Remote pair of classes, RemoteAudioHardwareListener/Proxy. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createAudioHardwareListener): (WebKit::GPUConnectionToWebProcess::releaseAudioHardwareListener): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/media/RemoteAudioHardwareListenerProxy.cpp: (WebKit::RemoteAudioHardwareListenerProxy::RemoteAudioHardwareListenerProxy): (WebKit::RemoteAudioHardwareListenerProxy::audioHardwareDidBecomeActive): (WebKit::RemoteAudioHardwareListenerProxy::audioHardwareDidBecomeInactive): (WebKit::RemoteAudioHardwareListenerProxy::audioOutputDeviceChanged): * GPUProcess/media/RemoteAudioHardwareListenerProxy.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioHardwareListener.cpp: Added. (WebKit::RemoteAudioHardwareListener::create): (WebKit::RemoteAudioHardwareListener::RemoteAudioHardwareListener): (WebKit::RemoteAudioHardwareListener::~RemoteAudioHardwareListener): (WebKit::RemoteAudioHardwareListener::gpuProcessConnectionDidClose): (WebKit::RemoteAudioHardwareListener::audioHardwareDidBecomeActive): (WebKit::RemoteAudioHardwareListener::audioHardwareDidBecomeInactive): (WebKit::RemoteAudioHardwareListener::audioOutputDeviceChanged): * WebProcess/GPU/media/RemoteAudioHardwareListener.h: * WebProcess/GPU/media/RemoteAudioHardwareListener.messages.in: * WebProcess/GPU/media/RemoteAudioHardwareListenerIdentifier.h: * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/233954@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-11 07:24:24 +00:00
WebProcess/GPU/media/RemoteAudioHardwareListener.cpp
[GPUP] Implement RemoteAudioSession https://bugs.webkit.org/show_bug.cgi?id=208583 Reviewed by Alex Christensen. Source/WebCore: Add EnumTraits for all the enumerations inside AudioSession. Make many AudioSession methods virtual, so they can be overridden in the case where the GPU process is enabled. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/audio/AudioSession.cpp: (WebCore::AudioSession::create): (WebCore::AudioSession::sharedSession): * platform/audio/AudioSession.h: Source/WebKit: Add a subclass of AudioSession which, instead of modifying the audio behavior of the current process, modifies the audio behavior of the GPU Process. And, in the GPU Process, since it represents the audio behavior of potentially multiple separate WebContent processes. Override the default shared AudioSession at WebProcess initialization time. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): (WebKit::GPUConnectionToWebProcess::audioSessionProxy): (WebKit::GPUConnectionToWebProcess::ensureAudioSession): (WebKit::GPUConnectionToWebProcess::legacyCdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): (WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): (WebKit::GPUProcess::audioSessionManager const): * GPUProcess/GPUProcess.h: * GPUProcess/media/RemoteAudioSessionProxy.cpp: Added. (WebKit::RemoteAudioSessionProxy::create): (WebKit::RemoteAudioSessionProxy::RemoteAudioSessionProxy): (WebKit::RemoteAudioSessionProxy::processIdentifier): (WebKit::RemoteAudioSessionProxy::configuration): (WebKit::RemoteAudioSessionProxy::setCategory): (WebKit::RemoteAudioSessionProxy::setPreferredBufferSize): (WebKit::RemoteAudioSessionProxy::tryToSetActive): (WebKit::RemoteAudioSessionProxy::beginInterruption): (WebKit::RemoteAudioSessionProxy::endInterruption): (WebKit::RemoteAudioSessionProxy::audioSessionManager): (WebKit::RemoteAudioSessionProxy::connection): * GPUProcess/media/RemoteAudioSessionProxy.h: Added. (WebKit::RemoteAudioSessionProxy::category const): (WebKit::RemoteAudioSessionProxy::routeSharingPolicy const): (WebKit::RemoteAudioSessionProxy::preferredBufferSize const): (WebKit::RemoteAudioSessionProxy::isActive const): * GPUProcess/media/RemoteAudioSessionProxy.messages.in: * GPUProcess/media/RemoteAudioSessionProxyManager.cpp: Added. (WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager): (WebKit::RemoteAudioSessionProxyManager::addProxy): (WebKit::RemoteAudioSessionProxyManager::removeProxy): (WebKit::RemoteAudioSessionProxyManager::getProxy): (WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess): (WebKit::RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess): (WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess): * GPUProcess/media/RemoteAudioSessionProxyManager.h: (WebKit::RemoteAudioSessionProxyManager::session const): * GPUProcess/media/RemoteAudioSessionProxyManager.messages.in: * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioSession.cpp: Added. (WebKit::RemoteAudioSession::create): (WebKit::RemoteAudioSession::RemoteAudioSession): (WebKit::RemoteAudioSession::connection): (WebKit::RemoteAudioSession::setCategory): (WebKit::RemoteAudioSession::setPreferredBufferSize): (WebKit::RemoteAudioSession::tryToSetActiveInternal): (WebKit::RemoteAudioSession::configurationChanged): (WebKit::RemoteAudioSession::beginInterruption): (WebKit::RemoteAudioSession::endInterruption): * WebProcess/GPU/media/RemoteAudioSession.h: Added. * WebProcess/GPU/media/RemoteAudioSession.messages.in: * WebProcess/GPU/media/RemoteAudioSessionConfiguration.h: Added. (WebKit::RemoteAudioSessionConfiguration::encode const): (WebKit::RemoteAudioSessionConfiguration::decode): * WebProcess/GPU/media/RemoteAudioSessionIdentifier.h: Source/WTF: Add UniqueRef to the list of forward-declared template types. * wtf/Forward.h: Canonical link: https://commits.webkit.org/221567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-05 19:43:12 +00:00
WebProcess/GPU/media/RemoteAudioSession.cpp
[GPUP] Implement Modern EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208090 Reviewed by Eric Carlson. Source/WebCore: Add export macros to CDMFactory::registeredFactories(). * platform/encryptedmedia/CDMFactory.h: Source/WebKit: Add support for RemoteCDMFactory, RemateCDM, RemoteCDMInstance, RemoteCDMInstanceSession, and all of their associated Proxy objects. Allow the existing CDMFactory machinery to work normally when the GPU process is disabled, by making initialization of the CDM factories contingent upon the "use GPU" setting. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::cdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteCDMFactoryProxy.cpp: Added. (WebKit::RemoteCDMFactoryProxy::RemoteCDMFactoryProxy): (WebKit::factoryForKeySystem): (WebKit::RemoteCDMFactoryProxy::createCDM): (WebKit::RemoteCDMFactoryProxy::supportsKeySystem): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMInstanceMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveCDMInstanceSessionMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMInstanceMessage): (WebKit::RemoteCDMFactoryProxy::didReceiveSyncCDMInstanceSessionMessage): (WebKit::RemoteCDMFactoryProxy::addProxy): (WebKit::RemoteCDMFactoryProxy::removeProxy): (WebKit::RemoteCDMFactoryProxy::addInstance): (WebKit::RemoteCDMFactoryProxy::removeInstance): (WebKit::RemoteCDMFactoryProxy::getInstance): (WebKit::RemoteCDMFactoryProxy::addSession): (WebKit::RemoteCDMFactoryProxy::removeSession): * GPUProcess/media/RemoteCDMFactoryProxy.h: Added. * GPUProcess/media/RemoteCDMFactoryProxy.messages.in: Added. * GPUProcess/media/RemoteCDMInstanceProxy.cpp: Added. (WebKit::RemoteCDMInstanceProxy::create): (WebKit::RemoteCDMInstanceProxy::RemoteCDMInstanceProxy): (WebKit::RemoteCDMInstanceProxy::initializeWithConfiguration): (WebKit::RemoteCDMInstanceProxy::setServerCertificate): (WebKit::RemoteCDMInstanceProxy::setStorageDirectory): (WebKit::RemoteCDMInstanceProxy::createSession): * GPUProcess/media/RemoteCDMInstanceProxy.h: Added. (WebKit::RemoteCDMInstanceProxy::configuration const): (WebKit::RemoteCDMInstanceProxy::instance): * GPUProcess/media/RemoteCDMInstanceProxy.messages.in: Added. * GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp: Added. (WebKit::RemoteCDMInstanceSessionProxy::create): (WebKit::RemoteCDMInstanceSessionProxy::RemoteCDMInstanceSessionProxy): (WebKit::RemoteCDMInstanceSessionProxy::~RemoteCDMInstanceSessionProxy): (WebKit::RemoteCDMInstanceSessionProxy::requestLicense): (WebKit::RemoteCDMInstanceSessionProxy::updateLicense): (WebKit::RemoteCDMInstanceSessionProxy::loadSession): (WebKit::RemoteCDMInstanceSessionProxy::closeSession): (WebKit::RemoteCDMInstanceSessionProxy::removeSessionData): (WebKit::RemoteCDMInstanceSessionProxy::storeRecordOfKeyUsage): (WebKit::RemoteCDMInstanceSessionProxy::updateKeyStatuses): (WebKit::RemoteCDMInstanceSessionProxy::sendMessage): (WebKit::RemoteCDMInstanceSessionProxy::sessionIdChanged): * GPUProcess/media/RemoteCDMInstanceSessionProxy.h: Added. * GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in: Added. * GPUProcess/media/RemoteCDMProxy.cpp: Added. (WebKit::RemoteCDMProxy::create): (WebKit::RemoteCDMProxy::RemoteCDMProxy): (WebKit::RemoteCDMProxy::supportsInitData): (WebKit::RemoteCDMProxy::sanitizeResponse): (WebKit::RemoteCDMProxy::sanitizeSessionId): (WebKit::RemoteCDMProxy::getSupportedConfiguration): (WebKit::RemoteCDMProxy::createInstance): (WebKit::RemoteCDMProxy::loadAndInitialize): * GPUProcess/media/RemoteCDMProxy.h: Added. (WebKit::RemoteCDMProxy::configuration const): (WebKit::RemoteCDMProxy::factory const): * GPUProcess/media/RemoteCDMProxy.messages.in: Added. * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerInitializationDataEncountered): (WebKit::RemoteMediaPlayerProxy::cdmInstanceAttached): (WebKit::RemoteMediaPlayerProxy::cdmInstanceDetached): (WebKit::RemoteMediaPlayerProxy::attemptToDecryptWithInstance): (WebKit::RemoteMediaPlayerProxy::setShouldContinueAfterKeyNeeded): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::CDMInstanceSession::Message>::encode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::Message>::decode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::encode): (IPC::ArgumentCoder<WebCore::CDMInstanceSession::KeyStatusVector>::decode): * Shared/WebCoreArgumentCoders.h: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveMessage): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::cdmInstanceAttached): (WebKit::MediaPlayerPrivateRemote::cdmInstanceDetached): (WebKit::MediaPlayerPrivateRemote::attemptToDecryptWithInstance): (WebKit::MediaPlayerPrivateRemote::initializationDataEncountered): (WebKit::MediaPlayerPrivateRemote::setShouldContinueAfterKeyNeeded): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteCDM.cpp: Added. (WebKit::RemoteCDM::create): (WebKit::RemoteCDM::RemoteCDM): (WebKit::RemoteCDM::getSupportedConfiguration): (WebKit::RemoteCDM::supportsConfiguration const): (WebKit::RemoteCDM::supportsConfigurationWithRestrictions const): (WebKit::RemoteCDM::supportsSessionTypeWithConfiguration const): (WebKit::RemoteCDM::supportsInitData const): (WebKit::RemoteCDM::distinctiveIdentifiersRequirement const): (WebKit::RemoteCDM::persistentStateRequirement const): (WebKit::RemoteCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable const): (WebKit::RemoteCDM::createInstance): (WebKit::RemoteCDM::loadAndInitialize): (WebKit::RemoteCDM::sanitizeResponse const): (WebKit::RemoteCDM::sanitizeSessionId const): * WebProcess/GPU/media/RemoteCDM.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: Added. (WebKit::RemoteCDMConfiguration::encode const): (WebKit::RemoteCDMConfiguration::decode): * WebProcess/GPU/media/RemoteCDMFactory.cpp: Added. (WebKit::RemoteCDMFactory::RemoteCDMFactory): (WebKit::RemoteCDMFactory::updatePreferences): (WebKit::RemoteCDMFactory::supplementName): (WebKit::RemoteCDMFactory::gpuProcessConnection): (WebKit::RemoteCDMFactory::supportsKeySystem): (WebKit::RemoteCDMFactory::createCDM): (WebKit::RemoteCDMFactory::addSession): (WebKit::RemoteCDMFactory::removeSession): (WebKit::RemoteCDMFactory::didReceiveSessionMessage): * WebProcess/GPU/media/RemoteCDMFactory.h: Added. * WebProcess/GPU/media/RemoteCDMIdentifier.h: Added. * WebProcess/GPU/media/RemoteCDMInstance.cpp: Added. (WebKit::RemoteCDMInstance::create): (WebKit::RemoteCDMInstance::RemoteCDMInstance): (WebKit::RemoteCDMInstance::initializeWithConfiguration): (WebKit::RemoteCDMInstance::setServerCertificate): (WebKit::RemoteCDMInstance::setStorageDirectory): (WebKit::RemoteCDMInstance::createSession): * WebProcess/GPU/media/RemoteCDMInstance.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: Added. (WebKit::RemoteCDMInstanceConfiguration::encode const): (WebKit::RemoteCDMInstanceConfiguration::decode): * WebProcess/GPU/media/RemoteCDMInstanceIdentifier.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceSession.cpp: Added. (WebKit::RemoteCDMInstanceSession::create): (WebKit::RemoteCDMInstanceSession::RemoteCDMInstanceSession): (WebKit::RemoteCDMInstanceSession::requestLicense): (WebKit::RemoteCDMInstanceSession::updateLicense): (WebKit::RemoteCDMInstanceSession::loadSession): (WebKit::RemoteCDMInstanceSession::closeSession): (WebKit::RemoteCDMInstanceSession::removeSessionData): (WebKit::RemoteCDMInstanceSession::storeRecordOfKeyUsage): (WebKit::RemoteCDMInstanceSession::updateKeyStatuses): (WebKit::RemoteCDMInstanceSession::sendMessage): (WebKit::RemoteCDMInstanceSession::sessionIdChanged): * WebProcess/GPU/media/RemoteCDMInstanceSession.h: Added. * WebProcess/GPU/media/RemoteCDMInstanceSession.messages.in: Added. * WebProcess/GPU/media/RemoteCDMInstanceSessionIdentifier.h: Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: Canonical link: https://commits.webkit.org/221506@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[GPUP] Implement Legacy EME API in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=208402 Reviewed by Eric Carlson. Add support for RemoteLegacyCDMFactory, RemateLegacyCDM,RemoteLegacyCDMSession, and all of their associated Proxy objects. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::legacyCdmFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): (WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: Added. (WebKit::RemoteLegacyCDMFactoryProxy::RemoteLegacyCDMFactoryProxy): (WebKit::RemoteLegacyCDMFactoryProxy::createCDM): (WebKit::RemoteLegacyCDMFactoryProxy::supportsKeySystem): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMSessionMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMMessage): (WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMSessionMessage): (WebKit::RemoteLegacyCDMFactoryProxy::addProxy): (WebKit::RemoteLegacyCDMFactoryProxy::removeProxy): (WebKit::RemoteLegacyCDMFactoryProxy::addSession): (WebKit::RemoteLegacyCDMFactoryProxy::removeSession): (WebKit::RemoteLegacyCDMFactoryProxy::getSession const): * GPUProcess/media/RemoteLegacyCDMFactoryProxy.h: Added. * GPUProcess/media/RemoteLegacyCDMFactoryProxy.messages.in: Added. * GPUProcess/media/RemoteLegacyCDMProxy.cpp: Added. (WebKit::RemoteLegacyCDMProxy::create): (WebKit::RemoteLegacyCDMProxy::RemoteLegacyCDMProxy): (WebKit::RemoteLegacyCDMProxy::supportsMIMEType): (WebKit::RemoteLegacyCDMProxy::createSession): (WebKit::RemoteLegacyCDMProxy::setPlayerId): (WebKit::RemoteLegacyCDMProxy::cdmMediaPlayer const): * GPUProcess/media/RemoteLegacyCDMProxy.h: Added. (WebKit::RemoteLegacyCDMProxy::factory const): * GPUProcess/media/RemoteLegacyCDMProxy.messages.in: Added. * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: Added. (WebKit::RemoteLegacyCDMSessionProxy::create): (WebKit::RemoteLegacyCDMSessionProxy::RemoteLegacyCDMSessionProxy): (WebKit::convertToUint8Array): (WebKit::convertToOptionalDataReference): (WebKit::RemoteLegacyCDMSessionProxy::generateKeyRequest): (WebKit::RemoteLegacyCDMSessionProxy::releaseKeys): (WebKit::RemoteLegacyCDMSessionProxy::update): (WebKit::RemoteLegacyCDMSessionProxy::getCachedKeyForKeyId): (WebKit::RemoteLegacyCDMSessionProxy::cachedKeyForKeyID): (WebKit::RemoteLegacyCDMSessionProxy::sendMessage): (WebKit::RemoteLegacyCDMSessionProxy::sendError): (WebKit::RemoteLegacyCDMSessionProxy::mediaKeysStorageDirectory const): * GPUProcess/media/RemoteLegacyCDMSessionProxy.h: Added. (WebKit::RemoteLegacyCDMSessionProxy::factory const): (WebKit::RemoteLegacyCDMSessionProxy::session const): (WebKit::RemoteLegacyCDMSessionProxy::setPlayer): * GPUProcess/media/RemoteLegacyCDMSessionProxy.messages.in: Added. * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::getProxy): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const): (WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded): (WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: * GPUProcess/media/RemoteTextTrackProxy.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::mediaPlayerManager): (WebKit::GPUProcessConnection::legacyCDMFactory): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::setCDM): (WebKit::MediaPlayerPrivateRemote::setCDMSession): (WebKit::MediaPlayerPrivateRemote::mediaPlayerKeyNeeded): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteLegacyCDM.cpp: Added. (WebKit::RemoteLegacyCDM::create): (WebKit::RemoteLegacyCDM::RemoteLegacyCDM): (WebKit::RemoteLegacyCDM::supportsMIMEType): (WebKit::RemoteLegacyCDM::createSession): (WebKit::RemoteLegacyCDM::setPlayerId): * WebProcess/GPU/media/RemoteLegacyCDM.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp: Added. (WebKit::RemoteLegacyCDMFactory::RemoteLegacyCDMFactory): (WebKit::RemoteLegacyCDMFactory::registerFactory): (WebKit::RemoteLegacyCDMFactory::supplementName): (WebKit::RemoteLegacyCDMFactory::gpuProcessConnection): (WebKit::RemoteLegacyCDMFactory::supportsKeySystem): (WebKit::RemoteLegacyCDMFactory::supportsKeySystemAndMimeType): (WebKit::RemoteLegacyCDMFactory::createCDM): (WebKit::RemoteLegacyCDMFactory::addSession): (WebKit::RemoteLegacyCDMFactory::removeSession): (WebKit::RemoteLegacyCDMFactory::findCDM const): (WebKit::RemoteLegacyCDMFactory::didReceiveSessionMessage): * WebProcess/GPU/media/RemoteLegacyCDMFactory.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMIdentifier.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: Added. (WebKit::convertToArrayBuffer): (WebKit::convertToUint8Array): (WebKit::convertToOptionalDataReference): (WebKit::convertToDataReference): (WebKit::RemoteLegacyCDMSession::create): (WebKit::RemoteLegacyCDMSession::RemoteLegacyCDMSession): (WebKit::RemoteLegacyCDMSession::generateKeyRequest): (WebKit::RemoteLegacyCDMSession::releaseKeys): (WebKit::RemoteLegacyCDMSession::update): (WebKit::RemoteLegacyCDMSession::cachedKeyForKeyID const): (WebKit::RemoteLegacyCDMSession::sendMessage): (WebKit::RemoteLegacyCDMSession::sendError): * WebProcess/GPU/media/RemoteLegacyCDMSession.h: Added. * WebProcess/GPU/media/RemoteLegacyCDMSession.messages.in: Added. * WebProcess/GPU/media/RemoteLegacyCDMSessionIdentifier.h: Added. * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::findRemotePlayerId): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::registerLegacyCDMFactories): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: Canonical link: https://commits.webkit.org/221729@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-09 00:34:40 +00:00
WebProcess/GPU/media/RemoteLegacyCDM.cpp
WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp
WebProcess/GPU/media/RemoteLegacyCDMSession.cpp
[GPUP] Move MediaCapabilities into the GPU process https://bugs.webkit.org/show_bug.cgi?id=219521 Reviewed by Eric Carlson. Source/WebCore: Add encode() and decode() operations to all structs used inside MediaEngineConfigurationFactory. Add the ability for clients to provide their own factories for use in MediaEngineConfigurationFactory. * Headers.cmake: * WebCore.xcodeproj/project.pbxproj: * platform/MediaCapabilitiesDecodingInfo.h: (WebCore::MediaCapabilitiesDecodingInfo::encode const): (WebCore::MediaCapabilitiesDecodingInfo::decode): * platform/MediaCapabilitiesEncodingInfo.h: (WebCore::MediaCapabilitiesEncodingInfo::encode const): (WebCore::MediaCapabilitiesEncodingInfo::decode): * platform/MediaCapabilitiesInfo.h: (WebCore::MediaCapabilitiesInfo::encode const): (WebCore::MediaCapabilitiesInfo::decode): * platform/mediacapabilities/AudioConfiguration.h: (WebCore::AudioConfiguration::encode const): (WebCore::AudioConfiguration::decode): * platform/mediacapabilities/ColorGamut.h: * platform/mediacapabilities/HdrMetadataType.h: * platform/mediacapabilities/MediaCapabilitiesLogging.h: * platform/mediacapabilities/MediaConfiguration.h: (WebCore::MediaConfiguration::encode const): (WebCore::MediaConfiguration::decode): * platform/mediacapabilities/MediaDecodingConfiguration.h: (WebCore::MediaDecodingConfiguration::encode const): (WebCore::MediaDecodingConfiguration::decode): * platform/mediacapabilities/MediaDecodingType.h: * platform/mediacapabilities/MediaEncodingConfiguration.h: (WebCore::MediaEncodingConfiguration::encode const): (WebCore::MediaEncodingConfiguration::decode): * platform/mediacapabilities/MediaEncodingType.h: * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp: (WebCore::defaultFactories): (WebCore::factories): (WebCore::MediaEngineConfigurationFactory::clearFactories): (WebCore::MediaEngineConfigurationFactory::resetFactories): (WebCore::MediaEngineConfigurationFactory::installFactory): (WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory): (WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory): * platform/mediacapabilities/MediaEngineConfigurationFactory.h: * platform/mediacapabilities/TransferFunction.h: * platform/mediacapabilities/VideoConfiguration.h: (WebCore::VideoConfiguration::encode const): (WebCore::VideoConfiguration::decode): Source/WebKit: Add a new pair of process supplements, RemoteMediaEngineConfigurationFactory and ..Proxy. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::mediaEngineConfigurationFactoryProxy): (WebKit::GPUConnectionToWebProcess::dispatchMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.cpp: Added. (WebKit::RemoteMediaEngineConfigurationFactoryProxy::RemoteMediaEngineConfigurationFactoryProxy): (WebKit::createDecodingConfiguration): (WebKit::RemoteMediaEngineConfigurationFactoryProxy::createEncodingConfiguration): * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.h: Added. * GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.messages.in: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::mediaEngineConfigurationFactory): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp: Added. (WebKit::RemoteMediaEngineConfigurationFactory::RemoteMediaEngineConfigurationFactory): (WebKit::RemoteMediaEngineConfigurationFactory::registerFactory): (WebKit::RemoteMediaEngineConfigurationFactory::supplementName): (WebKit::RemoteMediaEngineConfigurationFactory::gpuProcessConnection): (WebKit::RemoteMediaEngineConfigurationFactory::createDecodingConfiguration): (WebKit::RemoteMediaEngineConfigurationFactory::createEncodingConfiguration): * WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.h: Copied from Source/WTF/wtf/Algorithms.h. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/232140@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-04 22:57:47 +00:00
WebProcess/GPU/media/RemoteMediaEngineConfigurationFactory.cpp
WebProcess/GPU/media/RemoteMediaPlayerManager.cpp
[Media in GPU process] Add remote MIME type cache https://bugs.webkit.org/show_bug.cgi?id=205763 <rdar://problem/58312152> Reviewed by Dean Jackson. Source/WebCore: Create a MIME type cache for RemoteMediaPlayerManager so types without a 'codecs' parameter don't typically require IPC, and when it is required the result is cached so it is only required once. * platform/graphics/MIMETypeCache.cpp: (WebCore::MIMETypeCache::supportsContainerType): (WebCore::MIMETypeCache::canDecodeType): (WebCore::MIMETypeCache::setSupportedTypes): (WebCore::MIMETypeCache::staticContainerTypeList): (WebCore::MIMETypeCache::isUnsupportedContainerType): (WebCore::MIMETypeCache::isAvailable const): (WebCore::MIMETypeCache::isEmpty const): (WebCore::MIMETypeCache::initializeCache): (WebCore::MIMETypeCache::canDecodeExtendedType): (WebCore::MIMETypeCache::canDecodeTypePrivate): Deleted. (WebCore::MIMETypeCache::addSupportedTypes): Deleted. (WebCore::MIMETypeCache::addSupportedType): Deleted. * platform/graphics/MIMETypeCache.h: (WebCore::MIMETypeCache::isUnsupportedContainerType): Deleted. (WebCore::MIMETypeCache::isAvailable const): Deleted. (WebCore::MIMETypeCache::isEmpty const): Deleted. (WebCore::MIMETypeCache::canDecodeTypeInternal): Deleted. (WebCore::MIMETypeCache::initializeCache): Deleted. * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm: (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType): (WebCore::AVAssetMIMETypeCache::setSupportedTypes): (WebCore::AVAssetMIMETypeCache::canDecodeTypeInternal): Deleted. * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h: * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm: (WebCore::AVStreamDataParserMIMETypeCache::canDecodeExtendedType): (WebCore::AVStreamDataParserMIMETypeCache::canDecodeTypeInternal): Deleted. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsTypeAndCodecs): (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Deleted. * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Source/WebKit: * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::supportsTypeAndCodecs): (WebKit::RemoteMediaPlayerManagerProxy::canDecodeExtendedType): (WebKit::RemoteMediaPlayerManagerProxy::supportsType): Deleted. * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp: Added. (WebKit::RemoteMediaPlayerMIMETypeCache::RemoteMediaPlayerMIMETypeCache): (WebKit::RemoteMediaPlayerMIMETypeCache::mimeCache const): (WebKit::RemoteMediaPlayerMIMETypeCache::isAvailable const): (WebKit::RemoteMediaPlayerMIMETypeCache::staticContainerTypeList): (WebKit::RemoteMediaPlayerMIMETypeCache::isUnsupportedContainerType): (WebKit::RemoteMediaPlayerMIMETypeCache::canDecodeExtendedType): (WebKit::RemoteMediaPlayerMIMETypeCache::supportsTypeAndCodecs): (WebKit::RemoteMediaPlayerMIMETypeCache::initializeCache): * WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.h: Added. * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::mimeCaches): (WebKit::RemoteMediaPlayerManager::typeCache): (WebKit::RemoteMediaPlayerManager::initialize): (WebKit::RemoteMediaPlayerManager::getSupportedTypes): (WebKit::RemoteMediaPlayerManager::supportsTypeAndCodecs): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::setMediaMIMETypes): Canonical link: https://commits.webkit.org/218923@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-06 05:47:49 +00:00
WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp @no-unify
WebProcess/GPU/media/RemoteMediaResourceProxy.cpp
[Cocoa][GPUP] Move RemoteCommandListener into the GPU Process https://bugs.webkit.org/show_bug.cgi?id=221732 Reviewed by Eric Carlson. Source/WebCore: Refactor RemoteCommandListener to allow its methods to work over XPC: - Rather than having a synchronous client method to query whether seeking is supported, require clients to set seekability explicitly. - Change the RemoteCommandArgument from a union to an Optional<double>. - Allow clients to query the MediaPlaybackTarget through the session rather than wait for a notification that the playback target changed. Additionally, add a mini-factory functionality to RemoteCommandListener to allow clients to specify a different subclass to be created at runtime. * Modules/webaudio/AudioContext.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): * html/HTMLMediaElement.h: * html/MediaElementSession.cpp: (WebCore::MediaElementSession::didReceiveRemoteControlCommand): * html/MediaElementSession.h: * platform/NowPlayingManager.cpp: (WebCore::NowPlayingManager::didReceiveRemoteControlCommand): (WebCore::NowPlayingManager::setNowPlayingInfo): (WebCore::NowPlayingManager::supportsSeeking const): Deleted. * platform/NowPlayingManager.h: * platform/RemoteCommandListener.cpp: (WebCore::remoteCommandListenerCreationFunction): (WebCore::RemoteCommandListener::setCreationFunction): (WebCore::RemoteCommandListener::resetCreationFunction): (WebCore::RemoteCommandListener::create): (WebCore::RemoteCommandListener::RemoteCommandListener): (WebCore::RemoteCommandListener::setSupportsSeeking): * platform/RemoteCommandListener.h: (WebCore::RemoteCommandListener::RemoteCommandListener): Deleted. (WebCore::RemoteCommandListener::updateSupportedCommands): Deleted. (WebCore::RemoteCommandListener::client const): Deleted. * platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): * platform/audio/PlatformMediaSession.h: * platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::processDidReceiveRemoteControlCommand): * platform/audio/PlatformMediaSessionManager.h: * platform/audio/cocoa/MediaSessionManagerCocoa.h: * platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::scheduleSessionStatusUpdate): * platform/audio/ios/MediaSessionHelperIOS.h: * platform/audio/ios/MediaSessionHelperIOS.mm: (MediaSessionHelperiOS::activeVideoRouteDidChange): * platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): * platform/ios/RemoteCommandListenerIOS.h: * platform/ios/RemoteCommandListenerIOS.mm: (WebCore::RemoteCommandListenerIOS::create): (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): (WebCore::RemoteCommandListenerIOS::updateSupportedCommands): (WebCore::RemoteCommandListener::create): Deleted. * platform/mac/RemoteCommandListenerMac.h: * platform/mac/RemoteCommandListenerMac.mm: (WebCore::RemoteCommandListenerMac::create): (WebCore::RemoteCommandListenerMac::updateSupportedCommands): (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): (WebCore::RemoteCommandListener::create): Deleted. * testing/Internals.cpp: (WebCore::Internals::postRemoteControlCommand): Source/WebKit: Add a new Remote/Proxy class pair to facilitate RemoteCommandListener being created in the GPU Process. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createRemoteCommandListener): (WebKit::GPUConnectionToWebProcess::releaseRemoteCommandListener): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/media/RemoteRemoteCommandListenerProxy.cpp: (WebKit::RemoteRemoteCommandListenerProxy::RemoteRemoteCommandListenerProxy): (WebKit::RemoteRemoteCommandListenerProxy::didReceiveRemoteControlCommand): (WebKit::RemoteRemoteCommandListenerProxy::updateSupportedCommands): * GPUProcess/media/RemoteRemoteCommandListenerProxy.h: * GPUProcess/media/RemoteRemoteCommandListenerProxy.messages.in: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveRemoteCommand): * WebProcess/GPU/media/RemoteRemoteCommandListener.cpp: Added. (WebKit::RemoteRemoteCommandListener::create): (WebKit::RemoteRemoteCommandListener::RemoteRemoteCommandListener): (WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener): (WebKit::RemoteRemoteCommandListener::gpuProcessConnectionDidClose): (WebKit::RemoteRemoteCommandListener::didReceiveRemoteControlCommand): * WebProcess/GPU/media/RemoteRemoteCommandListener.h: * WebProcess/GPU/media/RemoteRemoteCommandListener.messages.in: * WebProcess/GPU/media/RemoteRemoteCommandListenerIdentifier.h: * WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp: (WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange): * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForMedia): Canonical link: https://commits.webkit.org/233988@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-11 21:49:12 +00:00
WebProcess/GPU/media/RemoteRemoteCommandListener.cpp
[Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process https://bugs.webkit.org/show_bug.cgi?id=218912 Reviewed by Eric Carlson. Source/WebCore: This patch makes the MSE version of MediaPlayer::load() the same as the one in MediaPlayerPrivate to support running MSE MediaPlayerPrivate(s) in the GPU process. No new tests, no functional change yet. * Headers.cmake: * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::createSourceBufferPrivate): * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferTimerFired): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): * WebCore.xcodeproj/project.pbxproj: * platform/ContentType.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::loadWithNextMediaEngine): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/MediaSourcePrivate.h: * platform/graphics/SourceBufferPrivateClient.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::load): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::load): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::load): * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp: (WebCore::PlaybackPipeline::addSourceBuffer): * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed): * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::load): * platform/mock/mediasource/MockMediaPlayerMediaSource.h: * platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::append): Source/WebKit: Add MediaSourcePrivateRemote/RemoteMediaSourceProxy and SourceBufferPrivateRemote/RemoteSourceBufferProxy, and setup IPC connections for them. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUProcessSessionParameters.h: * GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::loadMediaSource): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteMediaSourceProxy.cpp: Added. (WebKit::RemoteMediaSourceProxy::RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::~RemoteMediaSourceProxy): (WebKit::RemoteMediaSourceProxy::setPrivateAndOpen): (WebKit::RemoteMediaSourceProxy::duration const): (WebKit::RemoteMediaSourceProxy::buffered const): (WebKit::RemoteMediaSourceProxy::seekToTime): (WebKit::RemoteMediaSourceProxy::monitorSourceBuffers): (WebKit::RemoteMediaSourceProxy::setLogIdentifier): (WebKit::RemoteMediaSourceProxy::failedToCreateRenderer): (WebKit::RemoteMediaSourceProxy::addSourceBuffer): * GPUProcess/media/RemoteMediaSourceProxy.h: Added. * GPUProcess/media/RemoteMediaSourceProxy.messages.in: Added. * GPUProcess/media/RemoteSourceBufferIdentifier.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.cpp: Added. (WebKit::RemoteSourceBufferProxy::create): (WebKit::RemoteSourceBufferProxy::RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::~RemoteSourceBufferProxy): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveSample): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasAudio const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateHasVideo const): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateReenqueSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidBecomeReadyForMoreSamples): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateFastSeekTimeForMediaTime): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveRenderingError): (WebKit::RemoteSourceBufferProxy::append): * GPUProcess/media/RemoteSourceBufferProxy.h: Added. * GPUProcess/media/RemoteSourceBufferProxy.messages.in: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::load): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load): Deleted. * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: Added. (WebKit::MediaSourcePrivateRemote::create): (WebKit::MediaSourcePrivateRemote::MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::~MediaSourcePrivateRemote): (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::durationChanged): (WebKit::MediaSourcePrivateRemote::markEndOfStream): (WebKit::MediaSourcePrivateRemote::unmarkEndOfStream): (WebKit::MediaSourcePrivateRemote::readyState const): (WebKit::MediaSourcePrivateRemote::setReadyState): (WebKit::MediaSourcePrivateRemote::waitForSeekCompleted): (WebKit::MediaSourcePrivateRemote::seekCompleted): (WebKit::MediaSourcePrivateRemote::logChannel const): * WebProcess/GPU/media/MediaSourcePrivateRemote.h: Added. * WebProcess/GPU/media/RemoteCDMConfiguration.h: * WebProcess/GPU/media/RemoteCDMInstanceConfiguration.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaSourceIdentifier.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: Added. (WebKit::SourceBufferPrivateRemote::create): (WebKit::SourceBufferPrivateRemote::SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::~SourceBufferPrivateRemote): (WebKit::SourceBufferPrivateRemote::setClient): (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::abort): (WebKit::SourceBufferPrivateRemote::resetParserState): (WebKit::SourceBufferPrivateRemote::removedFromMediaSource): (WebKit::SourceBufferPrivateRemote::readyState const): (WebKit::SourceBufferPrivateRemote::setReadyState): (WebKit::SourceBufferPrivateRemote::flush): (WebKit::SourceBufferPrivateRemote::enqueueSample): (WebKit::SourceBufferPrivateRemote::isReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::setActive): (WebKit::SourceBufferPrivateRemote::notifyClientWhenReadyForMoreSamples): (WebKit::SourceBufferPrivateRemote::canSetMinimumUpcomingPresentationTime const): (WebKit::SourceBufferPrivateRemote::setMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::clearMinimumUpcomingPresentationTime): (WebKit::SourceBufferPrivateRemote::canSwitchToType): (WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete): (WebKit::SourceBufferPrivateRemote::logChannel const): * WebProcess/GPU/media/SourceBufferPrivateRemote.h: Added. * WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in: Added. Canonical link: https://commits.webkit.org/231660@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-17 17:25:27 +00:00
WebProcess/GPU/media/SourceBufferPrivateRemote.cpp
Support in-band VTT captions when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=207467 <rdar://problem/59312749> Reviewed by Jer Noble. Source/WebCore: No new tests, existing tests enabled in GPU process. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::nextAudioNodeLogIdentifier): (WebCore::AudioContext::nextAudioParameterLogIdentifier): * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::willRemove): (WebCore::AudioTrack::setMediaElement): (WebCore::AudioTrack::setLogger): * html/track/AudioTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::parseWebVTTCueData): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::toPrivate): (WebCore::InbandTextTrack::updateKindFromPrivate): (WebCore::InbandTextTrack::setLogger): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): * html/track/InbandWebVTTTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::setKind): (WebCore::TextTrack::setMode): (WebCore::TextTrack::removeAllCues): (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (WTF::LogArgument<WebCore::TextTrack::Kind>::toString): (WTF::LogArgument<WebCore::TextTrack::Mode>::toString): * html/track/TrackBase.cpp: (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::setLogger): (WebCore::nextLogIdentifier): Deleted. * html/track/TrackBase.h: * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setMediaElement): (WebCore::VideoTrack::setLogger): * html/track/VideoTrack.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::kind const): (WebCore::InbandTextTrackPrivate::cueFormat const): (WebCore::InbandTextTrackPrivate::InbandTextTrackPrivate): * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/MediaPlayerEnums.h: * platform/graphics/TrackPrivateBase.cpp: (WebCore::TrackPrivateBase::setLogger): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: (WebCore::InbandTextTrackPrivateAVFObjC::kind const): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF): * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOWebVTTCue::ISOWebVTTCue): * platform/graphics/iso/ISOVTTCue.h: * platform/mock/mediasource/MockTracks.h: (WebCore::MockTextTrackPrivate::MockTextTrackPrivate): Source/WebKit: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/media/RemoteAudioTrackProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddTextTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveTextTrack): (WebKit::RemoteMediaPlayerProxy::textTrackRepresentationBoundsChanged): (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: Added. (WebKit::RemoteTextTrackProxy::RemoteTextTrackProxy): (WebKit::RemoteTextTrackProxy::configuration): (WebKit::RemoteTextTrackProxy::configurationChanged): (WebKit::RemoteTextTrackProxy::willRemove): (WebKit::RemoteTextTrackProxy::idChanged): (WebKit::RemoteTextTrackProxy::labelChanged): (WebKit::RemoteTextTrackProxy::languageChanged): (WebKit::RemoteTextTrackProxy::addDataCue): (WebKit::RemoteTextTrackProxy::updateDataCue): (WebKit::RemoteTextTrackProxy::removeDataCue): (WebKit::RemoteTextTrackProxy::addGenericCue): (WebKit::RemoteTextTrackProxy::updateGenericCue): (WebKit::RemoteTextTrackProxy::removeGenericCue): (WebKit::RemoteTextTrackProxy::parseWebVTTFileHeader): (WebKit::RemoteTextTrackProxy::parseWebVTTCueData): * GPUProcess/media/RemoteTextTrackProxy.h: Copied from Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h. * GPUProcess/media/RemoteVideoTrackProxy.h: * GPUProcess/media/TextTrackPrivateRemoteConfiguration.h: Added. (WebKit::TextTrackPrivateRemoteConfiguration::encode const): (WebKit::TextTrackPrivateRemoteConfiguration::decode): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: (WebKit::RemoteSampleBufferDisplayLayerManager::createLayer): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack): (WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::addRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteTextTrack): (WebKit::MediaPlayerPrivateRemote::remoteTextTrackConfigurationChanged): (WebKit::MediaPlayerPrivateRemote::parseWebVTTFileHeader): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueData): (WebKit::MediaPlayerPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Added. (WebKit::TextTrackPrivateRemote::TextTrackPrivateRemote): (WebKit::TextTrackPrivateRemote::setMode): (WebKit::TextTrackPrivateRemote::updateConfiguration): (WebKit::TextTrackPrivateRemote::addDataCue): (WebKit::TextTrackPrivateRemote::updateDataCue): (WebKit::TextTrackPrivateRemote::removeDataCue): (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): (WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader): (WebKit::TextTrackPrivateRemote::parseWebVTTCueData): (WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct): * WebProcess/GPU/media/TextTrackPrivateRemote.h: Added. * WebProcess/GPU/media/TextTrackPrivateRemote.messages.in: Added. Source/WTF: * wtf/LoggerHelper.h: (WTF::LoggerHelper::childLogIdentifier const): LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/220550@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-11 21:37:58 +00:00
WebProcess/GPU/media/TextTrackPrivateRemote.cpp
Expose video tracks for media files in the GPUProcess https://bugs.webkit.org/show_bug.cgi?id=206209 <rdar://problem/58553026> Reviewed by Jer Noble. Source/WebCore: No new tests, un-skipped existing tests that pass because of this change. * platform/graphics/VideoTrackPrivate.h: Source/WebKit: * GPUProcess/media/RemoteAudioTrackProxy.cpp: (WebKit::RemoteAudioTrackProxy::configuration): * GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp: (WebKit::RemoteMediaPlayerManagerProxy::videoTrackSetSelected): * GPUProcess/media/RemoteMediaPlayerManagerProxy.h: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack): (WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveVideoTrack): (WebKit::RemoteMediaPlayerProxy::videoTrackSetSelected): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp. (WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::configuration): (WebKit::RemoteVideoTrackProxy::configurationChanged): (WebKit::RemoteVideoTrackProxy::willRemove): (WebKit::RemoteVideoTrackProxy::selectedChanged): (WebKit::RemoteVideoTrackProxy::idChanged): (WebKit::RemoteVideoTrackProxy::labelChanged): (WebKit::RemoteVideoTrackProxy::languageChanged): * GPUProcess/media/RemoteVideoTrackProxy.h: Added. * GPUProcess/media/TrackPrivateRemoteConfiguration.h: (WebKit::TrackPrivateRemoteConfiguration::encode const): (WebKit::TrackPrivateRemoteConfiguration::decode): * NetworkProcess/cache/CacheStorageEngine.cpp: (WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: (WebKit::AudioTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack): (WebKit::MediaPlayerPrivateRemote::removeRemoteVideoTrack): (WebKit::MediaPlayerPrivateRemote::remoteVideoTrackConfigurationChanged): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::addRemoteVideoTrack): (WebKit::RemoteMediaPlayerManager::removeRemoteVideoTrack): (WebKit::RemoteMediaPlayerManager::remoteVideoTrackConfigurationChanged): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in: * WebProcess/GPU/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp. (WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy): (WebKit::RemoteVideoTrackProxy::configuration): (WebKit::RemoteVideoTrackProxy::configurationChanged): (WebKit::RemoteVideoTrackProxy::willRemove): (WebKit::RemoteVideoTrackProxy::selectedChanged): (WebKit::RemoteVideoTrackProxy::idChanged): (WebKit::RemoteVideoTrackProxy::labelChanged): (WebKit::RemoteVideoTrackProxy::languageChanged): * WebProcess/GPU/media/RemoteVideoTrackProxy.h: Added. * WebProcess/GPU/media/VideoTrackPrivateRemote.cpp: Copied from Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp. (WebKit::VideoTrackPrivateRemote::VideoTrackPrivateRemote): (WebKit::VideoTrackPrivateRemote::setSelected): (WebKit::VideoTrackPrivateRemote::updateConfiguration): * WebProcess/GPU/media/VideoTrackPrivateRemote.h: Added. (WebKit::VideoTrackPrivateRemote::create): LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/219314@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-14 08:16:00 +00:00
WebProcess/GPU/media/VideoTrackPrivateRemote.cpp
Create AudioDestination in the GPU process https://bugs.webkit.org/show_bug.cgi?id=208179 Reviewed by Jer Noble. Source/WebCore: Add an abstraction around the creation of AudioDestination using newly introduced mediaStrategy. * Headers.cmake: * Modules/webaudio/DefaultAudioDestinationNode.cpp: (WebCore::DefaultAudioDestinationNode::createDestination): Use MediaStrategy::createAudioDestination * WebCore.xcodeproj/project.pbxproj: * platform/MediaStrategy.h: Added. (WebCore::MediaStrategy): Added. * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::mediaStrategy): Added. * platform/audio/AudioBus.h: * platform/audio/AudioDestination.h: Source/WebKit: Create AudioDestination in the GPU process instead of the WebContent process for WebAudio API when the Media-in-GPU-process feature is enabled. To do this, WebMediaStrategy, a concrete implementation of MediaStrategy, in the WebContent process gets a boolean flag indicating whether the GPU process should be used for AudioDestination or not. When the flag is set, we create RemoteAudioDestinationProxy instead of AudioDestination in WebContent process. Each RemoteAudioDestinationProxy talks to RemoteAudioDestinationManager in the GPU process and creates a corresponding RemoteAudioDestination which in turn creates WebCore's AudioDestination in the GPU process. RemoteAudioDestination is itself an AudioIOCallback for AudioDestination it creates, and delegates its callback to WebContent process' RemoteAudioDestinationProxy as needed. In this initial patch, we send RemoteAudioDestinationProxy::RenderBuffer IPC call to the WebContent process for each render call we get from CoreAudio for simplicity using newly introduced RemoteAudioBusData, which holds a SharedMemory for each channel in the audio bus. We will eliminate this IPC overhead in a follow up patch using CARingBuffer. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::remoteAudioDestinationManager): Added. (WebKit::GPUConnectionToWebProcess::didReceiveMessage): Added the code to dispatch messages to RemoteAudioDestinationManager. (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): Ditto. * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteAudioDestinationManager.cpp: Added. (WebKit::RemoteAudioDestination): Added. This class is the backing object which creates WebCore's AudioDestination and actually talks to CoreAudio in GPU process. (WebKit::RemoteAudioDestination::create): Added. (WebKit::RemoteAudioDestination::~RemoteAudioDestination): Added. (WebKit::RemoteAudioDestination::scheduleGracefulShutdownIfNeeded): Delays the deletion of this object until the audio threads stops running. (WebKit::RemoteAudioDestination::start): Added. (WebKit::RemoteAudioDestination::stop): Added. (WebKit::RemoteAudioDestination::isPlaying): Added. (WebKit::RemoteAudioDestination::RemoteAudioDestination): Added. (WebKit::RemoteAudioDestination::render): Sends a sync IPC to the WebContent process' RemoteAudioDestinationProxy to fill the audio buffer. Note that this function gets called in audio thread. (WebKit::RemoteAudioDestination::isPlayingDidChange): Added. (WebKit::RemoteAudioDestinationManager): Added. This class manages all RemoteAudioDestination objects owned by a single WebContent process. (WebKit::RemoteAudioDestinationManager::RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::~RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::createAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::deleteAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::startAudioDestination): Added. (WebKit::RemoteAudioDestinationManager::stopAudioDestination): Added. * GPUProcess/media/RemoteAudioDestinationManager.h: Added. (WebKit::RemoteAudioDestinationManager): Added. (WebKit::RemoteAudioDestinationManager::didReceiveSyncMessageFromWebProcess): Added. (WebKit::RemoteAudioDestinationManager::didReceiveMessageFromWebProcess): Added. * GPUProcess/media/RemoteAudioDestinationManager.messages.in: Added. * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createMediaStrategy): Added. Returns nullptr since Networking process has no business running AudioDestination. * NetworkProcess/NetworkProcessPlatformStrategies.h: (WebKit::NetworkProcessPlatformStrategies): * PlatformMac.cmake: * Scripts/webkit/messages.py: * Shared/RemoteAudioDestinationIdentifier.h: Added. (WebKit::RemoteAudioDestinationIdentifierType): Added. (WebKit::RemoteAudioDestinationIdentifier): Added. The identifier for each RemoteAudioDestination and RemoteAudioDestinationProxy (corresponding objects of each class use the same ID to communicate). * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/RemoteAudioBusData.h: Added. (WebKit::RemoteAudioBusData): Added. Encodes the information about each render call. (WebKit::RemoteAudioBusData::encode const): Added. (WebKit::RemoteAudioBusData::decode): Added. * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: Added. (WebKit::RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::create): Added. (WebKit::RemoteAudioDestinationProxy::RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::~RemoteAudioDestinationProxy): Added. (WebKit::RemoteAudioDestinationProxy::start): Added. (WebKit::RemoteAudioDestinationProxy::stop): Added. (WebKit::RemoteAudioDestinationProxy::renderBuffer): Added. Calls WebCore's AudioIOCallback to fill the audio buffer given by the GPU process. (WebKit::RemoteAudioDestinationProxy::didChangeIsPlaying): * WebProcess/GPU/media/RemoteAudioDestinationProxy.h: Added. (WebKit::RemoteAudioDestinationProxy::didReceiveMessageFromGPUProcess): Added. (WebKit::RemoteAudioDestinationProxy::isPlaying): Added. (WebKit::RemoteAudioDestinationProxy::sampleRate): Added. * WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in: Added. * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: Fixed the unified builds. * WebProcess/GPU/media/TextTrackPrivateRemote.h: Ditto. * WebProcess/GPU/media/WebMediaStrategy.cpp: Added. (WebKit::WebMediaStrategy::createAudioDestination): Added. * WebProcess/GPU/media/WebMediaStrategy.h: Added. (WebKit::WebMediaStrategy): Added. (WebKit::WebMediaStrategy::setUseGPUProcess): Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: Fixed the unified builds. * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Fixed the unified builds. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createMediaStrategy): Added. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Sets WebMediaStrategy's flag to use GPU process. Source/WebKitLegacy/mac: Added WebMediaStrategy which is a wrapper around AudioDestination::create. * WebCoreSupport/WebPlatformStrategies.h: * WebCoreSupport/WebPlatformStrategies.mm: (WebMediaStrategy): Added. (WebPlatformStrategies::createMediaStrategy): Source/WebKitLegacy/win: Added WebMediaStrategy which is a wrapper around AudioDestination::create. * WebCoreSupport/WebPlatformStrategies.cpp: (WebMediaStrategy): Added. (WebPlatformStrategies::createMediaStrategy): * WebCoreSupport/WebPlatformStrategies.h: Canonical link: https://commits.webkit.org/221234@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-27 03:51:17 +00:00
WebProcess/GPU/media/WebMediaStrategy.cpp
Implement RTC VTB decoders in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=205607 Reviewed by Eric Carlson. Source/ThirdParty/libwebrtc: Expose remote decoder abilities with C like functions. This allows WebProcess to implement IPC-based decoders. Expose VTB H264 decoder as C like functions. This allows GPU process to instantiate wasily H2664 decoders. * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: * Source/webrtc/sdk/WebKit/WebKitUtilities.h: * Source/webrtc/sdk/WebKit/WebKitUtilities.mm: (webrtc::videoDecoderCallbacks): (webrtc::setVideoDecoderCallbacks): (webrtc::RemoteVideoDecoder::RemoteVideoDecoder): (webrtc::RemoteVideoDecoder::decodeComplete): (webrtc::RemoteVideoDecoder::InitDecode): (webrtc::RemoteVideoDecoder::Decode): (webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback): (webrtc::RemoteVideoDecoder::Release): (webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory): (webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const): (webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder): (webrtc::createWebKitDecoderFactory): (webrtc::createLocalDecoder): (webrtc::releaseLocalDecoder): (webrtc::decodeFrame): * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.h: * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm: (-[RTCVideoDecoderH264 decode:missingFrames:codecSpecificInfo:renderTimeMs:]): (-[RTCVideoDecoderH264 decodeData:size:timeStamp:]): Source/WebCore: Add routine to create a RemoveVideoSample from a pixel buffer. Update LibWebRTCProvider to enable/disable decoding in GPU Process and add internals API. Test: webrtc/video-gpuProcess.html * platform/graphics/RemoteVideoSample.cpp: (WebCore::RemoteVideoSample::create): * platform/graphics/RemoteVideoSample.h: * platform/graphics/cv/ImageTransferSessionVT.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::LibWebRTCProvider::setUseGPUProcess): * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::setUseGPUProcessForWebRTC): * testing/Internals.h: * testing/Internals.idl: Source/WebKit: Implement decoder factory callbacks. Implement WebProcess codecs by sending IPC for creating/releasing/decoding a frame. WebProcess receives IPC messages from GPU Process whenever a frame is decoded. * Configurations/WebKit.xcconfig: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::libWebRTCCodecsProxy): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: Added. (WebKit::LibWebRTCCodecsProxy::didReceiveMessageFromWebProcess): * GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in: Added. * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: Added. (WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy): (WebKit::LibWebRTCCodecsProxy::~LibWebRTCCodecsProxy): (WebKit::LibWebRTCCodecsProxy::createDecoder): (WebKit::LibWebRTCCodecsProxy::releaseDecoder): (WebKit::LibWebRTCCodecsProxy::decodeFrame): * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveMessage): * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: Added. (WebKit::createVideoDecoder): (WebKit::releaseVideoDecoder): (WebKit::decodeVideoFrame): (WebKit::registerDecodeCompleteCallback): (WebKit::LibWebRTCCodecs::setVideoDecoderCallbacks): (WebKit::LibWebRTCCodecs::createDecoder): (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::decodeFrame): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::failedDecoding): (WebKit::LibWebRTCCodecs::completedDecoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: Added. * WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: Added. * WebProcess/GPU/webrtc/RTCDecoderIdentifier.h: Added. * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createDecoderFactory): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::libWebRTCCodecs): * WebProcess/WebProcess.h: LayoutTests: * webrtc/video-gpuProcess-expected.txt: Added. * webrtc/video-gpuProcess.html: Added. Canonical link: https://commits.webkit.org/218833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-31 10:00:48 +00:00
WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp
Implement MediaRecorder backend in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=205802 Reviewed by Eric Carlson. Source/WebCore: Add a page provider to create MediaRecorderPrivate implementations. This is used by WebKit layer to implement this in GPUProcess. Update MediaRecorderPrivate by adding an error callback that is used to surface errors as MediaRecorder error events. Covered by existing tests as MediaRecorder implementation in WebKitTestRunner will use GPUProcess. * Headers.cmake: * Modules/mediarecorder/MediaRecorder.cpp: (WebCore::MediaRecorder::create): (WebCore::MediaRecorder::createMediaRecorderPrivate): * Modules/mediarecorder/MediaRecorder.h: * Modules/mediarecorder/MediaRecorderProvider.cpp: Added. (WebCore::MediaRecorderProvider::createMediaRecorderPrivate): * Modules/mediarecorder/MediaRecorderProvider.h: Added. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (WebCore::Page::mediaRecorderProvider): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: (WebCore::MediaRecorderPrivateWriter::create): * platform/mediastream/MediaStreamPrivate.h: * platform/mediastream/MediaStreamTrackPrivate.h: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::setUseGPUProcessForWebRTC): Source/WebKit: Add support for sending audio/video tracks to record from WebProcess to GPUProcess. Add a MediaRecorderPrivate implementation that supports sending one audio track and/or one video track to GPUProcess and stopping/fetching data from the remote recorder in GPUProcess. In GPUProcess, implement the remote recorder using the existing WebCore recorder writer. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::userMediaCaptureManagerProxy): (WebKit::GPUConnectionToWebProcess::mediaRecorderManager): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: * GPUProcess/webrtc/RemoteMediaRecorder.cpp: Added. (WebKit::RemoteMediaRecorder::create): (WebKit::RemoteMediaRecorder::RemoteMediaRecorder): (WebKit::RemoteMediaRecorder::~RemoteMediaRecorder): (WebKit::RemoteMediaRecorder::storage): (WebKit::RemoteMediaRecorder::audioSamplesStorageChanged): (WebKit::RemoteMediaRecorder::audioSamplesAvailable): (WebKit::RemoteMediaRecorder::videoSampleAvailable): (WebKit::RemoteMediaRecorder::fetchData): (WebKit::RemoteMediaRecorder::stopRecording): * GPUProcess/webrtc/RemoteMediaRecorder.h: Added. * GPUProcess/webrtc/RemoteMediaRecorder.messages.in: Added. * GPUProcess/webrtc/RemoteMediaRecorderManager.cpp: Added. (WebKit::RemoteMediaRecorderManager::RemoteMediaRecorderManager): (WebKit::RemoteMediaRecorderManager::~RemoteMediaRecorderManager): (WebKit::RemoteMediaRecorderManager::didReceiveRemoteMediaRecorderMessage): (WebKit::RemoteMediaRecorderManager::createRecorder): (WebKit::RemoteMediaRecorderManager::releaseRecorder): * GPUProcess/webrtc/RemoteMediaRecorderManager.h: Added. (WebKit::RemoteMediaRecorderManager::didReceiveMessageFromWebProcess): * GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in: Added. * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/media/MediaRecorderProvider.cpp: Added. (WebCore::MediaRecorderProvider::createMediaRecorderPrivate): * WebProcess/GPU/media/MediaRecorderProvider.h: Added. * WebProcess/GPU/webrtc/MediaRecorderIdentifier.h: Added. * WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp: Added. (WebKit::MediaRecorderPrivate::MediaRecorderPrivate): (WebKit::MediaRecorderPrivate::~MediaRecorderPrivate): (WebKit::MediaRecorderPrivate::sampleBufferUpdated): (WebKit::MediaRecorderPrivate::audioSamplesAvailable): (WebKit::MediaRecorderPrivate::storageChanged): (WebKit::MediaRecorderPrivate::fetchData): (WebKit::MediaRecorderPrivate::stopRecording): * WebProcess/GPU/webrtc/MediaRecorderPrivate.h: Added. * WebProcess/GPU/webrtc/MediaRecorderProvider.cpp: Added. (WebKit::MediaRecorderProvider::createMediaRecorderPrivate): * WebProcess/GPU/webrtc/MediaRecorderProvider.h: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_overriddenMediaType): Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::initWithFrame): LayoutTests: * http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html: Do not use GPUProcess for this test until canvas buffers are IOSurfaces. Canonical link: https://commits.webkit.org/219053@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-08 12:45:03 +00:00
WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp
WebProcess/GPU/webrtc/MediaRecorderProvider.cpp
Add support for MediaStream video track rendering in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=206286 Reviewed by Eric Carlson. Source/WebCore: Add a way for WebKit layer to create its own specific SampleBufferDisplayLayer. WebKit layer can set a function pointer that will be used to create SampleBufferDisplayLayer. If none is provided, LocalSampleBufferDisplayLayer is used. Update MediaPlayerPrivateMediaStreamAVFObjC to monitor itself its root layer bounds change. Conversely, LocalSampleBufferDisplayLayer no longer monitors its root layer bounds change. This removes the need for SampleBufferDisplayLayer::Client to be notified of bounds change. We add an API to update the root layer bounds of a LocalSampleBufferDisplayLayer as well, this API being used by GPUProcess to mirror changes done to WebProcess root layer. WebRTC incoming video tracks do not have presentation timestamps so we mark them as kCMSampleAttachmentKey_DisplayImmediately. This is currently lost when doing IPC from WebProcess to NetworkProcess. Add this information for every enqueued sample in LocalSampleBufferDisplayLayer. We might want in the future to serialize all attachments of the sample. Manually tested. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp: Added. (WebCore::SampleBufferDisplayLayer::setCreator): (WebCore::SampleBufferDisplayLayer::create): * platform/graphics/avfoundation/SampleBufferDisplayLayer.h: * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: (-[WebAVSampleBufferStatusChangeListener invalidate]): (-[WebAVSampleBufferStatusChangeListener start]): (-[WebAVSampleBufferStatusChangeListener stop]): (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]): (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer): (WebCore::LocalSampleBufferDisplayLayer::~LocalSampleBufferDisplayLayer): (WebCore::LocalSampleBufferDisplayLayer::updateBoundsAndPosition): (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: (-[WebRootSampleBufferBoundsChangeListener initWithParent:]): (-[WebRootSampleBufferBoundsChangeListener dealloc]): (-[WebRootSampleBufferBoundsChangeListener invalidate]): (-[WebRootSampleBufferBoundsChangeListener start]): (-[WebRootSampleBufferBoundsChangeListener stop]): (-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer): (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange): * platform/graphics/cg/PDFDocumentImage.cpp: Unified build fix. Source/WebKit: Implement WebProcess SampleBufferDisplayLayer and GPUProcess RemoteSampleBufferDisplayLayer. RemoteSampleBufferDisplayLayer is a wrapper around LocalSampleBufferDisplayLayer. A synchronous IPC is used at creation time of the layer to make sure we have a shared layer synchronously. Future refactoring should allow to remove that constraint as done in regular video playing. Override SampleBufferDisplayLayer create function pointer when rendering is to be done in GPUProcess. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::sampleBufferDisplayLayerManager): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): (WebKit::GPUConnectionToWebProcess::didReceiveSyncMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: Added. (WebKit::RemoteSampleBufferDisplayLayer::create): (WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer): (WebKit::RemoteSampleBufferDisplayLayer::~RemoteSampleBufferDisplayLayer): (WebKit::RemoteSampleBufferDisplayLayer::contextID): (WebKit::RemoteSampleBufferDisplayLayer::bounds const): (WebKit::RemoteSampleBufferDisplayLayer::updateDisplayMode): (WebKit::RemoteSampleBufferDisplayLayer::updateAffineTransform): (WebKit::RemoteSampleBufferDisplayLayer::updateBoundsAndPosition): (WebKit::RemoteSampleBufferDisplayLayer::flush): (WebKit::RemoteSampleBufferDisplayLayer::flushAndRemoveImage): (WebKit::RemoteSampleBufferDisplayLayer::enqueueSample): (WebKit::RemoteSampleBufferDisplayLayer::clearEnqueuedSamples): (WebKit::RemoteSampleBufferDisplayLayer::messageSenderConnection const): (WebKit::RemoteSampleBufferDisplayLayer::sampleBufferDisplayLayerStatusDidChange): (WebKit::RemoteSampleBufferDisplayLayer::streamTime const): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: Added. (WebKit::RemoteSampleBufferDisplayLayerManager::RemoteSampleBufferDisplayLayerManager): (WebKit::RemoteSampleBufferDisplayLayerManager::didReceiveLayerMessage): (WebKit::RemoteSampleBufferDisplayLayerManager::createLayer): (WebKit::RemoteSampleBufferDisplayLayerManager::releaseLayer): * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: Added. * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in: Added. * Scripts/webkit/messages.py: * Shared/WebCoreArgumentCoders.h: * Shared/mac/WebCoreArgumentCodersMac.mm: (IPC::ArgumentCoder<CGRect>::encode): (IPC::ArgumentCoder<CGRect>::decode): (IPC::ArgumentCoder<CGSize>::encode): (IPC::ArgumentCoder<CGSize>::decode): (IPC::ArgumentCoder<CGPoint>::encode): (IPC::ArgumentCoder<CGPoint>::decode): (IPC::ArgumentCoder<CGAffineTransform>::encode): (IPC::ArgumentCoder<CGAffineTransform>::decode): * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::sampleBufferDisplayLayerManager): (WebKit::GPUProcessConnection::didReceiveMessage): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::updatePreferences): * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: Added. (WebKit::SampleBufferDisplayLayer::create): (WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer): (WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer): (WebKit::SampleBufferDisplayLayer::didFail const): (WebKit::SampleBufferDisplayLayer::updateDisplayMode): (WebKit::SampleBufferDisplayLayer::bounds const): (WebKit::SampleBufferDisplayLayer::updateAffineTransform): (WebKit::SampleBufferDisplayLayer::updateBoundsAndPosition): (WebKit::SampleBufferDisplayLayer::flush): (WebKit::SampleBufferDisplayLayer::flushAndRemoveImage): (WebKit::SampleBufferDisplayLayer::enqueueSample): (WebKit::SampleBufferDisplayLayer::clearEnqueuedSamples): (WebKit::SampleBufferDisplayLayer::rootLayer): (WebKit::SampleBufferDisplayLayer::setDidFail): (WebKit::SampleBufferDisplayLayer::boundsChanged): * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h: Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in: Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayerIdentifier.h: Added. * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: Added. (WebKit::SampleBufferDisplayLayerManager::didReceiveLayerMessage): (WebKit::SampleBufferDisplayLayerManager::createLayer): (WebKit::SampleBufferDisplayLayerManager::addLayer): (WebKit::SampleBufferDisplayLayerManager::removeLayer): * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h: Added. * WebProcess/WebProcess.h: Canonical link: https://commits.webkit.org/219555@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
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
WebProcess/Network/WebResourceLoader.cpp
Implement RTC VTB decoders in GPUProcess https://bugs.webkit.org/show_bug.cgi?id=205607 Reviewed by Eric Carlson. Source/ThirdParty/libwebrtc: Expose remote decoder abilities with C like functions. This allows WebProcess to implement IPC-based decoders. Expose VTB H264 decoder as C like functions. This allows GPU process to instantiate wasily H2664 decoders. * Configurations/libwebrtc.iOS.exp: * Configurations/libwebrtc.iOSsim.exp: * Configurations/libwebrtc.mac.exp: * Source/webrtc/sdk/WebKit/WebKitUtilities.h: * Source/webrtc/sdk/WebKit/WebKitUtilities.mm: (webrtc::videoDecoderCallbacks): (webrtc::setVideoDecoderCallbacks): (webrtc::RemoteVideoDecoder::RemoteVideoDecoder): (webrtc::RemoteVideoDecoder::decodeComplete): (webrtc::RemoteVideoDecoder::InitDecode): (webrtc::RemoteVideoDecoder::Decode): (webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback): (webrtc::RemoteVideoDecoder::Release): (webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory): (webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const): (webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder): (webrtc::createWebKitDecoderFactory): (webrtc::createLocalDecoder): (webrtc::releaseLocalDecoder): (webrtc::decodeFrame): * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.h: * Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm: (-[RTCVideoDecoderH264 decode:missingFrames:codecSpecificInfo:renderTimeMs:]): (-[RTCVideoDecoderH264 decodeData:size:timeStamp:]): Source/WebCore: Add routine to create a RemoveVideoSample from a pixel buffer. Update LibWebRTCProvider to enable/disable decoding in GPU Process and add internals API. Test: webrtc/video-gpuProcess.html * platform/graphics/RemoteVideoSample.cpp: (WebCore::RemoteVideoSample::create): * platform/graphics/RemoteVideoSample.h: * platform/graphics/cv/ImageTransferSessionVT.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: (WebCore::LibWebRTCProvider::setUseGPUProcess): * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::setUseGPUProcessForWebRTC): * testing/Internals.h: * testing/Internals.idl: Source/WebKit: Implement decoder factory callbacks. Implement WebProcess codecs by sending IPC for creating/releasing/decoding a frame. WebProcess receives IPC messages from GPU Process whenever a frame is decoded. * Configurations/WebKit.xcconfig: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::libWebRTCCodecsProxy): (WebKit::GPUConnectionToWebProcess::didReceiveMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: Added. (WebKit::LibWebRTCCodecsProxy::didReceiveMessageFromWebProcess): * GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in: Added. * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: Added. (WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy): (WebKit::LibWebRTCCodecsProxy::~LibWebRTCCodecsProxy): (WebKit::LibWebRTCCodecsProxy::createDecoder): (WebKit::LibWebRTCCodecsProxy::releaseDecoder): (WebKit::LibWebRTCCodecsProxy::decodeFrame): * Scripts/webkit/messages.py: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::didReceiveMessage): * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: Added. (WebKit::createVideoDecoder): (WebKit::releaseVideoDecoder): (WebKit::decodeVideoFrame): (WebKit::registerDecodeCompleteCallback): (WebKit::LibWebRTCCodecs::setVideoDecoderCallbacks): (WebKit::LibWebRTCCodecs::createDecoder): (WebKit::LibWebRTCCodecs::releaseDecoder): (WebKit::LibWebRTCCodecs::decodeFrame): (WebKit::LibWebRTCCodecs::registerDecodeFrameCallback): (WebKit::LibWebRTCCodecs::failedDecoding): (WebKit::LibWebRTCCodecs::completedDecoding): * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: Added. * WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: Added. * WebProcess/GPU/webrtc/RTCDecoderIdentifier.h: Added. * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createDecoderFactory): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::libWebRTCCodecs): * WebProcess/WebProcess.h: LayoutTests: * webrtc/video-gpuProcess-expected.txt: Added. * webrtc/video-gpuProcess.html: Added. Canonical link: https://commits.webkit.org/218833@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-31 10:00:48 +00:00
WebProcess/Network/WebSocketChannel.cpp @no-unify
Use NSURLSession for WebSocket https://bugs.webkit.org/show_bug.cgi?id=198568 Reviewed by Geoffrey Garen. Source/WebCore: Add a runtime flag to either choose the new WebSocket code path or the previously existing one. The switch is done at WebSocket channel API level which offers the necessary high level API to abstract the two code paths. By default, we continue using the current WebSocket implementation. Covered by manual testing on current WebSocket tests. * Modules/websockets/ThreadableWebSocketChannel.cpp: (WebCore::ThreadableWebSocketChannel::create): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::document): * Modules/websockets/WebSocketChannel.h: * WebCore.xcodeproj/project.pbxproj: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::isNSURLSessionWebSocketEnabled const): (WebCore::RuntimeEnabledFeatures::setIsNSURLSessionWebSocketEnabled): * page/SocketProvider.cpp: (WebCore::SocketProvider::createWebSocketChannel): * page/SocketProvider.h: Source/WebKit: Implement socket channel provider on WebProcess level by sending IPC to NetworkProcess. On NetworkProcess side, use NSURLSession API to implement the WebSocket functionality. This is a partial implementation: - inspector integration is not working. - some error cases are not well handled or are not producing the same error messages. - some features are not implemented (extensions, subprotocols, handshake authentication challenge, cookie handling...). * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::createSocketChannel): (WebKit::NetworkConnectionToWebProcess::removeSocketChannel): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::createWebSocketTask): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::removeWebSocketTask): (WebKit::NetworkSession::addWebSocketTask): * NetworkProcess/NetworkSocketChannel.cpp: Added. (WebKit::NetworkSocketChannel::create): (WebKit::NetworkSocketChannel::NetworkSocketChannel): (WebKit::NetworkSocketChannel::~NetworkSocketChannel): (WebKit::NetworkSocketChannel::sendString): (WebKit::NetworkSocketChannel::sendData): (WebKit::NetworkSocketChannel::finishClosingIfPossible): (WebKit::NetworkSocketChannel::close): (WebKit::NetworkSocketChannel::didConnect): (WebKit::NetworkSocketChannel::didReceiveText): (WebKit::NetworkSocketChannel::didReceiveBinaryData): (WebKit::NetworkSocketChannel::didClose): (WebKit::NetworkSocketChannel::messageSenderConnection const): * NetworkProcess/NetworkSocketChannel.h: Added. * NetworkProcess/NetworkSocketChannel.messages.in: Added. * NetworkProcess/NetworkSocketStream.messages.in: * NetworkProcess/WebSocketTask.h: Added. (WebKit::WebSocketTask::sendString): (WebKit::WebSocketTask::sendData): (WebKit::WebSocketTask::close): (WebKit::WebSocketTask::cancel): (WebKit::WebSocketTask::resume): * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate existingWebSocketTask:]): (-[WKNetworkSessionDelegate URLSession:webSocketTask:didOpenWithProtocol:]): (-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]): (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge): (WebKit::NetworkSessionCocoa::createWebSocketTask): (WebKit::NetworkSessionCocoa::addWebSocketTask): (WebKit::NetworkSessionCocoa::removeWebSocketTask): (WebKit::NetworkSessionCocoa::webSocketDataTaskForIdentifier): * NetworkProcess/cocoa/WebSocketTaskCocoa.h: Added. * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: Added. (WebKit::WebSocketTask::WebSocketTask): (WebKit::WebSocketTask::~WebSocketTask): (WebKit::WebSocketTask::readNextMessage): (WebKit::WebSocketTask::cancel): (WebKit::WebSocketTask::resume): (WebKit::WebSocketTask::didConnect): (WebKit::WebSocketTask::didClose): (WebKit::WebSocketTask::sendString): (WebKit::WebSocketTask::sendData): (WebKit::WebSocketTask::close): (WebKit::WebSocketTask::identifier const): * Shared/WebPreferences.yaml: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/Network/WebSocketChannel.cpp: Added. (WebKit::WebSocketChannel::create): (WebKit::WebSocketChannel::WebSocketChannel): (WebKit::WebSocketChannel::~WebSocketChannel): (WebKit::WebSocketChannel::messageSenderConnection const): (WebKit::WebSocketChannel::messageSenderDestinationID const): (WebKit::WebSocketChannel::subprotocol): (WebKit::WebSocketChannel::extensions): (WebKit::WebSocketChannel::connect): (WebKit::WebSocketChannel::send): (WebKit::WebSocketChannel::bufferedAmount const): (WebKit::WebSocketChannel::close): (WebKit::WebSocketChannel::fail): (WebKit::WebSocketChannel::disconnect): (WebKit::WebSocketChannel::didConnect): (WebKit::WebSocketChannel::didReceiveText): (WebKit::WebSocketChannel::didReceiveBinaryData): (WebKit::WebSocketChannel::didClose): (WebKit::WebSocketChannel::didFail): (WebKit::WebSocketChannel::networkProcessCrashed): * WebProcess/Network/WebSocketChannel.h: Added. * WebProcess/Network/WebSocketChannel.messages.in: Added. * WebProcess/Network/WebSocketChannelManager.cpp: Added. (WebKit::WebSocketChannelManager::createWebSocketChannel): (WebKit::WebSocketChannelManager::networkProcessCrashed): (WebKit::WebSocketChannelManager::didReceiveMessage): * WebProcess/Network/WebSocketChannelManager.h: Added. * WebProcess/Network/WebSocketProvider.cpp: (WebKit::WebSocketProvider::createWebSocketChannel): * WebProcess/Network/WebSocketProvider.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::webSocketChannelManager): Source/WTF: * wtf/Platform.h: Introduce compile flag for WebSocket NSURLSession Canonical link: https://commits.webkit.org/212790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-13 01:04:16 +00:00
WebProcess/Network/WebSocketChannelManager.cpp
WebProcess/Network/WebSocketProvider.cpp
WebProcess/Network/WebSocketStream.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Receiving WebRTC network packets should not go through the main thread https://bugs.webkit.org/show_bug.cgi?id=211290 Reviewed by Alex Christensen. Instead of going to main thread before going to rtc network thread, we register a message receiver and dispatch directly to rtc network thread. This ensures rtc packets are not blocked if main thread is busy. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: (WebKit::LibWebRTCSocketClient::signalReadPacket): (WebKit::LibWebRTCSocketClient::signalSentPacket): (WebKit::LibWebRTCSocketClient::signalAddressReady): (WebKit::LibWebRTCSocketClient::signalConnect): (WebKit::LibWebRTCSocketClient::signalClose): * NetworkProcess/webrtc/NetworkRTCProvider.cpp: (WebKit::NetworkRTCProvider::createSocket): (WebKit::NetworkRTCProvider::createServerTCPSocket): (WebKit::NetworkRTCProvider::createClientTCPSocket): (WebKit::NetworkRTCProvider::newConnection): (WebKit::NetworkRTCProvider::closeListeningSockets): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::NetworkProcessConnection): (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/Network/webrtc/LibWebRTCNetwork.cpp: Added * WebProcess/Network/webrtc/LibWebRTCNetwork.h: (WebKit::LibWebRTCNetwork::connection): (WebKit::LibWebRTCNetwork::~LibWebRTCNetwork): (WebKit::LibWebRTCNetwork::networkProcessCrashed): (WebKit::LibWebRTCNetwork::setConnection): (WebKit::LibWebRTCNetwork::dispatchToThread): (WebKit::LibWebRTCNetwork::signalAddressReady): (WebKit::LibWebRTCNetwork::signalReadPacket): (WebKit::LibWebRTCNetwork::signalSentPacket): (WebKit::LibWebRTCNetwork::signalConnect): (WebKit::LibWebRTCNetwork::signalClose): (WebKit::LibWebRTCNetwork::signalNewConnection): * WebProcess/Network/webrtc/LibWebRTCNetwork.messages.in: Added. * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp: * WebProcess/Network/webrtc/WebRTCSocket.cpp: Removed. * WebProcess/Network/webrtc/WebRTCSocket.h: Removed. Canonical link: https://commits.webkit.org/224336@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-05 13:40:04 +00:00
WebProcess/Network/webrtc/LibWebRTCNetwork.cpp
WebProcess/Network/webrtc/LibWebRTCProvider.cpp
WebProcess/Network/webrtc/LibWebRTCResolver.cpp
WebProcess/Network/webrtc/LibWebRTCSocket.cpp
WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp
Implement RTCDataChannel transfer out of process https://bugs.webkit.org/show_bug.cgi?id=223443 Reviewed by Eric Carlson. Source/WebCore: Add support for serialization/deserialization of RTCDataChannel information so that it can be MessagePort transfered or transfered to out-of-process contexts like Window or Service Worker. Add infrastructure for remote sources (that allows to send data or close data channels) and remote handlers which receive messages from out-of-process data channels. Covered by API tests. * Modules/mediastream/DetachedRTCDataChannel.h: Added. (WebCore::DetachedRTCDataChannel::DetachedRTCDataChannel): (WebCore::DetachedRTCDataChannel::memoryCost const): (WebCore::DetachedRTCDataChannel::encode const): (WebCore::DetachedRTCDataChannel::decode): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::rtcDataChannelLocalMap): (WebCore::RTCDataChannel::handlerFromIdentifier): (WebCore::RTCDataChannel::create): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCDataChannelRemoteHandler.cpp: Added. (WebCore::RTCDataChannelRemoteHandler::create): (WebCore::RTCDataChannelRemoteHandler::RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::~RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::didChangeReadyState): (WebCore::RTCDataChannelRemoteHandler::didReceiveStringData): (WebCore::RTCDataChannelRemoteHandler::didReceiveRawData): (WebCore::RTCDataChannelRemoteHandler::didDetectError): (WebCore::RTCDataChannelRemoteHandler::bufferedAmountIsDecreasing): (WebCore::RTCDataChannelRemoteHandler::readyToSend): (WebCore::RTCDataChannelRemoteHandler::setClient): (WebCore::RTCDataChannelRemoteHandler::sendStringData): (WebCore::RTCDataChannelRemoteHandler::sendRawData): (WebCore::RTCDataChannelRemoteHandler::close): * Modules/mediastream/RTCDataChannelRemoteHandler.h: Added. * Modules/mediastream/RTCDataChannelRemoteSource.cpp: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelRemoteSource::RTCDataChannelRemoteSource): (WebCore::RTCDataChannelRemoteSource::~RTCDataChannelRemoteSource): * Modules/mediastream/RTCDataChannelRemoteSource.h: Added. (WebCore::RTCDataChannelRemoteSource::create): (WebCore::RTCDataChannelRemoteSource::sendStringData): (WebCore::RTCDataChannelRemoteSource::sendRawData): (WebCore::RTCDataChannelRemoteSource::close): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::postTask): * Modules/webaudio/AudioWorkletMessagingProxy.cpp: (WebCore::AudioWorkletMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * Modules/webaudio/AudioWorkletMessagingProxy.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::encode const): (WebCore::SerializedScriptValue::decode): * dom/Document.cpp: (WebCore::Document::createRTCDataChannelRemoteHandlerConnection): * dom/Document.h: * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::createRTCDataChannelRemoteHandlerConnection): * platform/ScriptExecutionContextIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelState.h. * platform/mediastream/RTCDataChannelHandler.h: (WebCore::RTCDataChannelInit::encode const): (WebCore::RTCDataChannelInit::decode): * platform/mediastream/RTCDataChannelIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelIdentifier::encode const): (WebCore::RTCDataChannelIdentifier::decode): * platform/mediastream/RTCDataChannelRemoteHandlerConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelRemoteSourceConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelState.h: * platform/mediastream/RTCPriorityType.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerGlobalScope.h: * workers/WorkerLoaderProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerMessagingProxy.h: * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::createRTCDataChannelRemoteHandlerConnection): * workers/service/context/ServiceWorkerThreadProxy.h: Source/WebKit: Add support for connecting remote sources to remote data channels. This is done by connection detached data channels to remote source that will send messages to network process. Network process then sends to the process in which was reattached the data channel. Pairing of data channels is done in main thread through connectToSource message. The data then flows in background threads, network process being the proxy between web processes. RTCDataChannelRemoteManagerProxy is the forwarding entity in NetworkProcess. RTCDataChannelRemoteManager is the entity in WebProcess doing the messaging from and to data channels. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::connectToRTCDataChannelRemoteSource): (WebKit::NetworkConnectionToWebProcess::registerToRTCDataChannelProxy): (WebKit::NetworkConnectionToWebProcess::unregisterToRTCDataChannelProxy): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::rtcDataChannelProxy): * NetworkProcess/NetworkProcess.h: * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp: Added. (WebKit::RTCDataChannelRemoteManagerProxy::RTCDataChannelRemoteManagerProxy): (WebKit::RTCDataChannelRemoteManagerProxy::registerConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::unregisterConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::sendData): (WebKit::RTCDataChannelRemoteManagerProxy::close): (WebKit::RTCDataChannelRemoteManagerProxy::changeReadyState): (WebKit::RTCDataChannelRemoteManagerProxy::receiveData): (WebKit::RTCDataChannelRemoteManagerProxy::detectError): (WebKit::RTCDataChannelRemoteManagerProxy::bufferedAmountIsDecreasing): * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h: Added. * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.messages.in: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::connectToRTCDataChannelRemoteSource): * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createRTCDataChannelRemoteHandlerConnection): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp: Added. (WebKit::RTCDataChannelRemoteManager::sharedManager): (WebKit::RTCDataChannelRemoteManager::RTCDataChannelRemoteManager): (WebKit::RTCDataChannelRemoteManager::setConnection): (WebKit::RTCDataChannelRemoteManager::connectToRemoteSource): (WebKit::RTCDataChannelRemoteManager::remoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::remoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::postTaskToHandler): (WebKit::RTCDataChannelRemoteManager::sourceFromIdentifier): (WebKit::RTCDataChannelRemoteManager::sendData): (WebKit::RTCDataChannelRemoteManager::close): (WebKit::RTCDataChannelRemoteManager::changeReadyState): (WebKit::RTCDataChannelRemoteManager::receiveData): (WebKit::RTCDataChannelRemoteManager::detectError): (WebKit::RTCDataChannelRemoteManager::bufferedAmountIsDecreasing): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::RemoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::connectToSource): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::sendData): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::close): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::RemoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didChangeReadyState): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveStringData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveRawData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didDetectError): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::bufferedAmountIsDecreasing): * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h: Added. * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.messages.in: Copied from Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in. * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/235572@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 18:29:36 +00:00
WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp
WebProcess/Network/webrtc/WebMDNSRegister.cpp
WebProcess/Network/webrtc/WebRTCMonitor.cpp
WebProcess/Network/webrtc/WebRTCResolver.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
WebProcess/Notifications/NotificationPermissionRequestManager.cpp
WebProcess/Notifications/WebNotificationManager.cpp
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Start bringing up Unified Sources in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=188703 Reviewed by Simon Fraser. * Configurations/BaseTarget.xcconfig: Add SRCROOT to the include path, so unified sources can find the source files. * Shared/APIWebArchive.mm: (API::releaseWebArchiveData): (API::WebArchive::data): (API::releaseCFData): Deleted. * Shared/APIWebArchiveResource.mm: (API::releaseWebArchiveResourceData): (API::WebArchiveResource::data): (API::releaseCFData): Deleted. Disambiguate two static methods by renaming them. * Shared/cf/ArgumentCodersCF.cpp: Leave a comment about the bizarreness of this file. * Shared/NavigationActionData.cpp: (WebKit::NavigationActionData::decode): * Shared/WebPlatformTouchPoint.cpp: * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::WebPopupItem): (WebKit::WebPopupItem::decode): * Shared/WebPreferencesStore.cpp: * Shared/WebRenderLayer.cpp: (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::createArrayFromLayerList): (WebKit::WebRenderLayer::WebRenderLayer): * Shared/gtk/WebEventFactory.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit const): * UIProcess/API/APIAutomationSessionClient.h: (API::AutomationSessionClient::sessionIdentifier const): (API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::ensureBackingStore): (WebKit::RemoteLayerBackingStore::setNeedsDisplay): (WebKit::RemoteLayerBackingStore::backingStoreSize const): (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): (WebKit::RemoteLayerBackingStore::display): (WebKit::RemoteLayerBackingStore::drawInContext): (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer): * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): (WebKit::RemoteLayerTreeTransaction::setRootLayerID): (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs): (WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore): (WebKit::dumpChangedLayers): (WebKit::RemoteLayerTreeTransaction::description const): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Get rid of lots of `using namespace`. * Sources.txt: Added. * SourcesCocoa.txt: Added. * WebKit.xcodeproj/project.pbxproj: Set up unified sources. Right now, we only unify Platform/ and Shared/[^API]. Canonical link: https://commits.webkit.org/203781@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-18 01:31:15 +00:00
Implement audio capture for SpeechRecognition on iOS https://bugs.webkit.org/show_bug.cgi?id=219371 <rdar://problem/71824049> Reviewed by Youenn Fablet. Source/WebCore: Add a way to set RealtimeMediaSource member of SpeechRecognitionCaptureSourceImpl. Test: fast/speechrecognition/ios/audio-capture.html * Headers.cmake: * Modules/speech/SpeechRecognitionCaptureSource.cpp: (WebCore::SpeechRecognitionCaptureSource::findCaptureDevice): (WebCore::SpeechRecognitionCaptureSource::createRealtimeMediaSource): (WebCore::SpeechRecognitionCaptureSource::SpeechRecognitionCaptureSource): * Modules/speech/SpeechRecognitionCaptureSource.h: * Modules/speech/SpeechRecognizer.cpp: (WebCore::SpeechRecognizer::reset): (WebCore::SpeechRecognizer::start): (WebCore::SpeechRecognizer::setSource): (WebCore::SpeechRecognizer::startInternal): Deleted. * Modules/speech/SpeechRecognizer.h: * WebCore.xcodeproj/project.pbxproj: Source/WebKit: On iOS, audio capture is done in web process. For speech recognition, recognizer is in UI process. Therefore, UI process needs to ask web process to capture audio and send back data. To implement this, this patch added: - SpeechRecognitionRemoteRealtimeMediaSource: subclass WebCore::RealtimeMediaSource and connect to a remote WebCore::RealtimeMediaSource (owned by SpeechRecognitionRealtimeMediaSourceManager::Source) in web process. - SpeechRecognitionRemoteRealtimeMediaSourceManager: manage all RemoteRealtimeMediaSources. - SpeechRecognitionRealtimeMediaSourceManager: manage all SpeechRecognitionRemoteRealtimeMediaSource. - SpeechRecognitionRealtimeMediaSourceManager::Source: own and monitor a local WebCore::RealtimeMediaSource. This structure is very similar to how we implement media capture on macOS (RemoteRealtimeMediaSource, UserMediaCaptureManager and UserMediaCaptureManagerProxy), where we send data from UI process to web process instead. We should unify the architecture if possible. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::create): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::SpeechRecognitionRemoteRealtimeMediaSource): (WebKit::m_ringBuffer): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::~SpeechRecognitionRemoteRealtimeMediaSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::startProducingData): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::stopProducingData): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::setStorage): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteAudioSamplesAvailable): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteCaptureFailed): (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::remoteSourceStopped): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSource::identifier const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.cpp: Added. (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::SpeechRecognitionRemoteRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::addSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::removeSource): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteAudioSamplesAvailable): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteCaptureFailed): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::remoteSourceStopped): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::messageSenderConnection const): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::messageSenderDestinationID const): (WebKit::SpeechRecognitionRemoteRealtimeMediaSourceManager::setStorage): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.h: Added. * UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.messages.in: Added. * UIProcess/SpeechRecognitionServer.cpp: (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::handleRequest): * UIProcess/SpeechRecognitionServer.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::createRealtimeMediaSourceForSpeechRecognition): * UIProcess/WebPageProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): (WebKit::WebProcessProxy::ensureSpeechRecognitionRemoteRealtimeMediaSourceManager): * UIProcess/WebProcessProxy.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp: Added. (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::Source): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::~Source): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::start): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::stop): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::Source::storage): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::SpeechRecognitionRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::~SpeechRecognitionRealtimeMediaSourceManager): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::grantSandboxExtensions): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::revokeSandboxExtensions): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::createSource): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::deleteSource): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::start): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::stop): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::messageSenderConnection const): (WebKit::SpeechRecognitionRealtimeMediaSourceManager::messageSenderDestinationID const): * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.h: Added. * WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.messages.in: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: (WebKit::WebSpeechRecognitionConnection::WebSpeechRecognitionConnection): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensureSpeechRecognitionRealtimeMediaSourceManager): * WebProcess/WebProcess.h: LayoutTests: * TestExpectations: * fast/speechrecognition/ios/audio-capture-expected.txt: Added. * fast/speechrecognition/ios/audio-capture.html: Added. * platform/ios-wk2/TestExpectations: Canonical link: https://commits.webkit.org/232245@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 08:28:16 +00:00
WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp
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
[WebAuthn] Implement a dummy WebAuthnProcess https://bugs.webkit.org/show_bug.cgi?id=217559 <rdar://problem/70168749> Reviewed by Brent Fulgham. Source/WebCore: No tests. * en.lproj/Localizable.strings: Provides a name for the WebAuthn process. Source/WebKit: Previous patch r268248 introduces a new daemon to handle all WebAuthn requests. However, after more deeper investigations, the daemon story is not very compelling for WebKit. Here are the two major road blockers: 1) The major one is on macOS. New daemons cannot be installed without a system update. It means relocatable Safari (e.g. STP) and staged Safari on downlevel OSes will not get this feature. And relocatable STP can only utilize the system daemon. This seems a bummer especially for the STP case given it is heavily used to test latest web features. 2) Additional plumbing is needed for testing and engineering builds. This problem is specific to WebKit and is on both macOS and iOS. WebKit doesn't build roots to test engineering builds, which is required to update the plist on the above location. Hence, a separate configuration is needed to generate a different plist that points to the right engineering binary and additional scripts will be needed to ask launchd to load the plist before running any tests. Some extra exercises are probably needed to not confuse launchd about the engineering binary and system binary as well. Given the above constraints, a new architecture is proposed to make the daemon a WebKit XPC service/process instead and leave the launchd event handler to a new Safari daemon. The launchd related feature is only on iOS and therefore it really doesn't make sense to overcome all the above macOS constraints. Having different architectures on iOS (a daemon) and on macOS (a XPC service) accordingly will introduce tons of overhead for maintainance as well. That's why relying on a Safari daemon to do the job is the most reasonable option. This patch therefore focuses on making the WebAuthn process happen and removes the WebAuthn daemon. * CMakeLists.txt: * Configurations/WebAuthnService.xcconfig: Renamed from Source/WebKit/Configurations/WebAuthenticationAgent.xcconfig. * Configurations/WebKit.xcconfig: * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Removed. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Removed. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Paperwork for building the new WebAuthn process. * Platform/ExtraPrivateSymbolsForTAPI.h: * Shared/AuxiliaryProcess.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::processStorageClass): (WebKit::sandboxDirectory): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * Sources.txt: * SourcesCocoa.txt: Paperwork for building the new WebAuthn process. * UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::shouldLeakBoost): * UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: Added. (WebKit::WebAuthnProcessProxy::singleton): (WebKit::WebAuthnProcessProxy::WebAuthnProcessProxy): (WebKit::WebAuthnProcessProxy::getLaunchOptions): (WebKit::WebAuthnProcessProxy::connectionWillOpen): (WebKit::WebAuthnProcessProxy::processWillShutDown): (WebKit::WebAuthnProcessProxy::getWebAuthnProcessConnection): (WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed): (WebKit::WebAuthnProcessProxy::didClose): (WebKit::WebAuthnProcessProxy::didReceiveInvalidMessage): (WebKit::WebAuthnProcessProxy::didFinishLaunching): (WebKit::WebAuthnProcessProxy::updateProcessAssertion): * UIProcess/WebAuthentication/WebAuthnProcessProxy.h: Added. * UIProcess/WebAuthentication/WebAuthnProcessProxy.messages.in: Added. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getWebAuthnProcessConnection): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getWebAuthnProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnServiceEntryPoint.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnServiceInitializerDelegate::WebAuthnServiceInitializerDelegate): (WebKit::initializeAuxiliaryProcess<WebAuthnProcess>): (WEBAUTHEN_SERVICE_INITIALIZER): * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp: Added. (WebKit::WebAuthnConnectionToWebProcess::create): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::~WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::didClose): (WebKit::WebAuthnConnectionToWebProcess::didReceiveInvalidMessage): * WebAuthnProcess/WebAuthnConnectionToWebProcess.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnConnectionToWebProcess::connection): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnProcessProcess): (WebKit::WebAuthnConnectionToWebProcess::webProcessIdentifier const): * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcess.cpp: Added. (WebKit::WebAuthnProcess::WebAuthnProcess): (WebKit::WebAuthnProcess::~WebAuthnProcess): (WebKit::WebAuthnProcess::createWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::removeWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::connectionToWebProcessClosed): (WebKit::WebAuthnProcess::shouldTerminate): (WebKit::WebAuthnProcess::didClose): (WebKit::WebAuthnProcess::lowMemoryHandler): (WebKit::WebAuthnProcess::initializeWebAuthnProcess): (WebKit::WebAuthnProcess::prepareToSuspend): (WebKit::WebAuthnProcess::processDidResume): (WebKit::WebAuthnProcess::resume): (WebKit::WebAuthnProcess::processDidTransitionToForeground): (WebKit::WebAuthnProcess::processDidTransitionToBackground): (WebKit::WebAuthnProcess::webProcessConnection const): * WebAuthnProcess/WebAuthnProcess.h: Added. * WebAuthnProcess/WebAuthnProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcessCreationParameters.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessCreationParameters::encode const): (WebKit::WebAuthnProcessCreationParameters::decode): * WebAuthnProcess/WebAuthnProcessCreationParameters.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. * WebAuthnProcess/ios/WebAuthnProcessIOS.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): * WebAuthnProcess/mac/WebAuthnProcessMac.mm: Added. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Added. The sandbox profile is originally from the GPU Process with IOKit related rules removed. Will tighten it again after the process is fully functional. * WebKit.xcodeproj/project.pbxproj: Paperwork for building the new WebAuthn process. * WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::~WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::didClose): (WebKit::WebAuthnProcessConnection::didReceiveInvalidMessage): * WebProcess/WebAuthentication/WebAuthnProcessConnection.h: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::create): (WebKit::WebAuthnProcessConnection::connection): * WebProcess/WebAuthentication/WebAuthnProcessConnection.messages.in: Added. * WebProcess/WebAuthentication/WebAuthnProcessConnectionInfo.h: Added. (WebKit::WebAuthnProcessConnectionInfo::identifier const): (WebKit::WebAuthnProcessConnectionInfo::releaseIdentifier): (WebKit::WebAuthnProcessConnectionInfo::encode const): (WebKit::WebAuthnProcessConnectionInfo::decode): * WebProcess/WebProcess.cpp: (WebKit::getWebAuthnProcessConnection): (WebKit::WebProcess::ensureWebAuthnProcessConnection): (WebKit::WebProcess::webAuthnProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::existingWebAuthnProcessConnection): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. Canonical link: https://commits.webkit.org/230567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
WebProcess/WebCoreSupport/SessionStateConversion.cpp
WebProcess/WebCoreSupport/ShareableBitmapUtilities.cpp
Add initial support for BroadcastChannel behind a runtime flag https://bugs.webkit.org/show_bug.cgi?id=227924 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Rebaseline WPT tests now that more tests are running and we are passing more checks. * web-platform-tests/FileAPI/url/url-in-tags-revoke.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/require-corp.https-expected.txt: * web-platform-tests/html/dom/idlharness.worker-expected.txt: * web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.https-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/basics.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/interface.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt: Added. * web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub-expected.txt: * web-platform-tests/webstorage/storage_session_window_noopener.window-expected.txt: * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt: Source/WebCore: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. Tests: - fast/html/broadcast-channel-between-different-sessions.html - Rebaselined WPT tests * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/BroadcastChannel.cpp: Added. (WebCore::channelToContextIdentifier): (WebCore::BroadcastChannel::BroadcastChannel): (WebCore::BroadcastChannel::~BroadcastChannel): (WebCore::BroadcastChannel::postMessage): (WebCore::BroadcastChannel::close): (WebCore::BroadcastChannel::dispatchMessageTo): (WebCore::BroadcastChannel::dispatchMessage): (WebCore::BroadcastChannel::ensureOnMainThread): (WebCore::BroadcastChannel::activeDOMObjectName const): (WebCore::BroadcastChannel::eventListenersDidChange): (WebCore::BroadcastChannel::virtualHasPendingActivity const): * dom/BroadcastChannel.h: Added. (WebCore::BroadcastChannel::create): (WebCore::BroadcastChannel::identifier const): (WebCore::BroadcastChannel::name const): * dom/BroadcastChannel.idl: Added. * dom/BroadcastChannelIdentifier.h: Added. * dom/BroadcastChannelRegistry.h: Added. (WebCore::BroadcastChannelRegistry::~BroadcastChannelRegistry): * dom/DeviceOrientationAndMotionAccessController.h: * dom/DeviceOrientationEvent.cpp: * dom/DeviceOrientationEvent.h: * dom/EventTargetFactory.in: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setBroadcastChannelRegistry): * page/Page.h: (WebCore::Page::broadcastChannelRegistry): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: Source/WebKit: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/NetworkBroadcastChannelRegistry.cpp: Added. (WebKit::NetworkBroadcastChannelRegistry::registerChannel): (WebKit::NetworkBroadcastChannelRegistry::unregisterChannel): (WebKit::NetworkBroadcastChannelRegistry::postMessage): (WebKit::NetworkBroadcastChannelRegistry::removeConnection): * NetworkProcess/NetworkBroadcastChannelRegistry.h: Added. (WebKit::NetworkBroadcastChannelRegistry::GlobalBroadcastChannelIdentifier::operator== const): * NetworkProcess/NetworkBroadcastChannelRegistry.messages.in: Added. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didClose): * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::broadcastChannelRegistry): * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebKit::networkProcessConnection): (WebKit::WebBroadcastChannelRegistry::registerChannel): (WebKit::WebBroadcastChannelRegistry::unregisterChannel): (WebKit::WebBroadcastChannelRegistry::postMessage): (WebKit::WebBroadcastChannelRegistry::postMessageToRemote): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::broadcastChannelRegistry): Source/WebKitLegacy: Add BroadcastChannelRegistry implementation for WebKitLegacy. * Sources.txt: * WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebBroadcastChannelRegistry::getOrCreate): (WebBroadcastChannelRegistry::registerChannel): (WebBroadcastChannelRegistry::unregisterChannel): (WebBroadcastChannelRegistry::postMessage): * WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebKitLegacy.xcodeproj/project.pbxproj: Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Source/WTF: Add experimental feature flag for BroadcastChannel, off by default. * Scripts/Preferences/WebPreferencesExperimental.yaml: LayoutTests: * TestExpectations: * fast/html/broadcast-channel-between-different-sessions-expected.txt: Added. * fast/html/broadcast-channel-between-different-sessions.html: Added. * fast/html/resources/broadcast-channel-between-different-sessions-window.html: Added. Add layout test coverage to make sure that windows belonging to different session are unable to communicate via BroadcastChannel. * platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt. * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/TestExpectations: * platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: Added. * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: Added. * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/win/TestExpectations: * platform/wk2/TestExpectations: Update test expectations now that we support BroadcastChannel. Canonical link: https://commits.webkit.org/239714@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 00:36:39 +00:00
WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp
WebProcess/WebCoreSupport/WebChromeClient.cpp
WebProcess/WebCoreSupport/WebColorChooser.cpp
WebProcess/WebCoreSupport/WebContextMenuClient.cpp
[GTK] Datalist element support for TextFieldInputType https://bugs.webkit.org/show_bug.cgi?id=98934 Reviewed by Michael Catanzaro. .: Enable DATALIST_ELEMENT. * Source/cmake/OptionsGTK.cmake: Source/WebCore: Add support for rendering the arrow indicator of text fields having data list. * rendering/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintTextField): (WebCore::RenderThemeGtk::adjustListButtonStyle const): (WebCore::RenderThemeGtk::paintListButtonForInput): (WebCore::RenderThemeGtk::adjustSearchFieldStyle const): * rendering/RenderThemeGtk.h: Source/WebKit: Add a WebDataListSuggestionsDropdown implementation for the GTK port using a popup window with a tree view list. * Sources.txt: * SourcesGTK.txt: * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDataListSuggestionsDropdown): * UIProcess/API/gtk/PageClientImpl.h: * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Added. (WebKit::firstTimeItemSelectedCallback): (WebKit::WebDataListSuggestionsDropdownGtk::WebDataListSuggestionsDropdownGtk): (WebKit::WebDataListSuggestionsDropdownGtk::~WebDataListSuggestionsDropdownGtk): (WebKit::WebDataListSuggestionsDropdownGtk::treeViewRowActivatedCallback): (WebKit::WebDataListSuggestionsDropdownGtk::didSelectOption): (WebKit::WebDataListSuggestionsDropdownGtk::show): (WebKit::WebDataListSuggestionsDropdownGtk::handleKeydownWithIdentifier): (WebKit::WebDataListSuggestionsDropdownGtk::close): * UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: Copied from Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h. Tools: Implement UIScriptControllerGtk::isShowingDataListSuggestions. * WebKitTestRunner/gtk/UIScriptControllerGtk.cpp: (WTR::UIScriptControllerGtk::isShowingDataListSuggestions const): * WebKitTestRunner/gtk/UIScriptControllerGtk.h: LayoutTests: Unskip datalist tests for GTK port. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/214080@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp
WebProcess/WebCoreSupport/WebDragClient.cpp
WebProcess/WebCoreSupport/WebEditorClient.cpp
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
WebProcess/WebCoreSupport/WebGeolocationClient.cpp
Permission request API for MediaKeySystem access support https://bugs.webkit.org/show_bug.cgi?id=221187 Reviewed by Jer Noble. Source/WebCore: Support for user permission requesting when access to an EME MediaKeySystem is being requested by the page. This is similar to the mediaDevices access guards. Existing test media/encrypted-media/mock-MediaKeySystemAccess.html was updated to cover this new code path and WPE/GTK API tests as well. * CMakeLists.txt: * Headers.cmake: * Modules/encryptedmedia/MediaKeySystemClient.h: Added. * Modules/encryptedmedia/MediaKeySystemController.cpp: Added. (WebCore::MediaKeySystemController::supplementName): (WebCore::MediaKeySystemController::MediaKeySystemController): (WebCore::MediaKeySystemController::~MediaKeySystemController): (WebCore::provideMediaKeySystemTo): (WebCore::MediaKeySystemController::logRequestMediaKeySystemDenial): * Modules/encryptedmedia/MediaKeySystemController.h: Added. (WebCore::MediaKeySystemController::client const): (WebCore::MediaKeySystemController::from): (WebCore::MediaKeySystemController::requestMediaKeySystem): (WebCore::MediaKeySystemController::cancelMediaKeySystemRequest): * Modules/encryptedmedia/MediaKeySystemRequest.cpp: Added. (WebCore::MediaKeySystemRequest::create): (WebCore::MediaKeySystemRequest::MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::~MediaKeySystemRequest): (WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const): (WebCore::MediaKeySystemRequest::start): (WebCore::MediaKeySystemRequest::allow): (WebCore::MediaKeySystemRequest::deny): (WebCore::MediaKeySystemRequest::stop): (WebCore::MediaKeySystemRequest::activeDOMObjectName const): (WebCore::MediaKeySystemRequest::document const): * Modules/encryptedmedia/MediaKeySystemRequest.h: Added. (WebCore::MediaKeySystemRequest::setAllowCallback): (WebCore::MediaKeySystemRequest::identifier const): (WebCore::MediaKeySystemRequest::keySystem const): * Modules/encryptedmedia/NavigatorEME.cpp: (WebCore::NavigatorEME::requestMediaKeySystemAccess): Source/WebKit: Add new IPC and C API exposing MediaKeySystem access permissions to the UIProcess. At least GTK/WPE would like to have API for asking permission to the user when EME's MediaKeyAccess is being requested by a page. On Apple platforms the permission is granted by default until a decision is made about supporting this in their APIUIClient. * CMakeLists.txt: * Headers.cmake: * Platform/Logging.h: * Shared/API/APIObject.h: * Shared/API/c/WKBase.h: * Sources.txt: * UIProcess/API/APIUIClient.h: (API::UIClient::decidePolicyForMediaKeySystemPermissionRequest): * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKMediaKeySystemPermissionCallback.cpp: Added. (WKMediaKeySystemPermissionCallbackGetTypeID): (WKMediaKeySystemPermissionCallbackComplete): * UIProcess/API/C/WKMediaKeySystemPermissionCallback.h: Added. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageUIClient): * UIProcess/API/C/WKPageUIClient.h: * UIProcess/MediaKeySystemPermissionRequest.h: Added. (WebKit::MediaKeySystemPermissionRequest::create): (WebKit::MediaKeySystemPermissionRequest::complete): (WebKit::MediaKeySystemPermissionRequest::keySystem const): (WebKit::MediaKeySystemPermissionRequest::MediaKeySystemPermissionRequest): (WebKit::MediaKeySystemPermissionCallback::create): (WebKit::MediaKeySystemPermissionCallback::complete): (WebKit::MediaKeySystemPermissionCallback::MediaKeySystemPermissionCallback): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::~MediaKeySystemPermissionRequestManagerProxy): (WebKit::MediaKeySystemPermissionRequestManagerProxy::invalidatePendingRequests): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::grantRequest): (WebKit::MediaKeySystemPermissionRequestManagerProxy::createRequestForFrame): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logChannel const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::logger const): * UIProcess/MediaKeySystemPermissionRequestManagerProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestManagerProxy::page const): (WebKit::MediaKeySystemPermissionRequestManagerProxy::denyRequest): * UIProcess/MediaKeySystemPermissionRequestProxy.cpp: Added. (WebKit::MediaKeySystemPermissionRequestProxy::MediaKeySystemPermissionRequestProxy): (WebKit::MediaKeySystemPermissionRequestProxy::allow): (WebKit::MediaKeySystemPermissionRequestProxy::deny): (WebKit::MediaKeySystemPermissionRequestProxy::invalidate): (WebKit::MediaKeySystemPermissionRequestProxy::doDefaultAction): * UIProcess/MediaKeySystemPermissionRequestProxy.h: Added. (WebKit::MediaKeySystemPermissionRequestProxy::create): (WebKit::MediaKeySystemPermissionRequestProxy::isPending const): (WebKit::MediaKeySystemPermissionRequestProxy::mediaKeySystemID const): (WebKit::MediaKeySystemPermissionRequestProxy::mainFrameID const): (WebKit::MediaKeySystemPermissionRequestProxy::frameID const): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin): (WebKit::MediaKeySystemPermissionRequestProxy::topLevelDocumentSecurityOrigin const): (WebKit::MediaKeySystemPermissionRequestProxy::keySystem const): * UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestMediaKeySystemPermissionForFrame): (WebKit::WebPageProxy::mediaKeySystemPermissionRequestManager): (WebKit::WebPageProxy::requestMediaKeySystemPermissionByDefaultAction): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp: Added. (WebKit::MediaKeySystemPermissionRequestManager::MediaKeySystemPermissionRequestManager): (WebKit::MediaKeySystemPermissionRequestManager::startMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::sendMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::cancelMediaKeySystemRequest): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasGranted): (WebKit::MediaKeySystemPermissionRequestManager::mediaKeySystemWasDenied): * WebProcess/EncryptedMedia/MediaKeySystemPermissionRequestManager.h: Added. * WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp: Added. (WebKit::WebMediaKeySystemClient::WebMediaKeySystemClient): (WebKit::WebMediaKeySystemClient::pageDestroyed): (WebKit::WebMediaKeySystemClient::requestMediaKeySystem): (WebKit::WebMediaKeySystemClient::cancelMediaKeySystemRequest): * WebProcess/WebCoreSupport/WebMediaKeySystemClient.h: Added. (WebKit::WebMediaKeySystemClient::~WebMediaKeySystemClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::mediaKeySystemWasGranted): (WebKit::WebPage::mediaKeySystemWasDenied): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::mediaKeySystemPermissionRequestManager): * WebProcess/WebPage/WebPage.messages.in: Tools: Add support for setting the permission request response from the TestRunner, for usage within layout tests. * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setIsMediaKeySystemPermissionGranted): * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::decidePolicyForMediaKeySystemPermissionRequest): (WTR::TestController::completeMediaKeySystemPermissionCheck): (WTR::TestController::setIsMediaKeySystemPermissionGranted): (WTR::TestController::createWebViewWithOptions): * WebKitTestRunner/TestController.h: * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): LayoutTests: Add basic coverage support for overriding the MediaKeySystem permission answer and thus have the promise rejection tested in this case. * media/encrypted-media/mock-MediaKeySystemAccess-expected.txt: * media/encrypted-media/mock-MediaKeySystemAccess.html: Canonical link: https://commits.webkit.org/233845@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-02-09 12:46:22 +00:00
WebProcess/WebCoreSupport/WebMediaKeySystemClient.cpp
WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp
WebProcess/WebCoreSupport/WebNotificationClient.cpp
WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp
WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
WebProcess/WebCoreSupport/WebPopupMenu.cpp
WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp
Move the ResourceLoadObserver logic to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=201517 Reviewed by Brent Fulgham. Move the ResourceLoadObserver logic to WebKit2 since it is not used by WebKit1. This allows us to simplify code. In a follow-up patch, I will simplify the code even further by leveraging the fact that a WebContent process is always associated with a single WebsiteDataStore / sessionID: - No need for a HashMap of sessionIDs - No need to even allocate the ResourceLoadObserver if the WebProcess is associated with an ephemeral session. Source/WebCore: * dom/Document.h: * loader/ResourceLoadObserver.cpp: (WebCore::sharedObserver): (WebCore::ResourceLoadObserver::setShared): (WebCore::ResourceLoadObserver::shared): * loader/ResourceLoadObserver.h: (WebCore::ResourceLoadObserver::~ResourceLoadObserver): (WebCore::ResourceLoadObserver::logSubresourceLoading): (WebCore::ResourceLoadObserver::logWebSocketLoading): (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): (WebCore::ResourceLoadObserver::logFontLoad): (WebCore::ResourceLoadObserver::logCanvasRead): (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure): (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed): (WebCore::ResourceLoadObserver::logScreenAPIAccessed): (WebCore::ResourceLoadObserver::statisticsForURL): (WebCore::ResourceLoadObserver::updateCentralStatisticsStore): (WebCore::ResourceLoadObserver::clearState): (WebCore::ResourceLoadObserver::setShouldLogUserInteraction): * page/DeprecatedGlobalSettings.h: Source/WebKit: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated): * NetworkProcess/NetworkConnectionToWebProcess.h: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: Copied from Source/WebCore/loader/ResourceLoadObserver.cpp. (WebKit::is3xxRedirect): (WebKit::WebResourceLoadObserver::WebResourceLoadObserver): (WebKit::WebResourceLoadObserver::shouldLog const): (WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener): (WebKit::WebResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain): (WebKit::WebResourceLoadObserver::scheduleNotificationIfNeeded): (WebKit::WebResourceLoadObserver::updateCentralStatisticsStore): (WebKit::WebResourceLoadObserver::statisticsForURL): (WebKit::WebResourceLoadObserver::takeStatistics): (WebKit::WebResourceLoadObserver::clearState): (WebKit::WebResourceLoadObserver::nonNullOwnerURL const): (WebKit::WebResourceLoadObserver::logFontLoad): (WebKit::WebResourceLoadObserver::logCanvasRead): (WebKit::WebResourceLoadObserver::logCanvasWriteOrMeasure): (WebKit::WebResourceLoadObserver::logNavigatorAPIAccessed): (WebKit::WebResourceLoadObserver::logScreenAPIAccessed): (WebKit::WebResourceLoadObserver::logSubresourceLoading): (WebKit::WebResourceLoadObserver::logWebSocketLoading): (WebKit::WebResourceLoadObserver::logUserInteractionWithReducedTimeResolution): * WebProcess/WebCoreSupport/WebResourceLoadObserver.h: Added. * WebProcess/WebProcess.cpp: Canonical link: https://commits.webkit.org/215202@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-07 01:53:20 +00:00
WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp
WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp
WebProcess/WebCoreSupport/WebUserMediaClient.cpp
Set up basic infrastructure for SpeechRecognition https://bugs.webkit.org/show_bug.cgi?id=218216 <rdar://problem/70703788> Reviewed by Youenn Fablet. Source/WebCore: Introduce SpeechRecognitionConnectionClient, SpeechRecognitionConnection and SpeechRecognitionServer. SpeechRecognition is a SpeechRecognitionConnectionClient that can send SpeechRecognitionRequest to SpeechRecognitionServer via SpeechRecognitionConnection. Currently we have one SpeechRecogntionConnection and one SpeechRecogntionServer per page. SpeechRecognitionServer will be responsible for handling SpeechRecognitionRequests, including audio capturing and hosting speech recognition engine, and that implementation is not included in this patch. Our current plan is put SpeechRecognitionServer in UI process (or GPU process when media code is all moved) and keep SpeechRecognitionConnectionClient in web process. Test: fast/speechrecognition/start-recognition-twice-exception.html * Headers.cmake: * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::create): (WebCore::SpeechRecognition::SpeechRecognition): (WebCore::SpeechRecognition::startRecognition): (WebCore::SpeechRecognition::stopRecognition): (WebCore::SpeechRecognition::abortRecognition): (WebCore::SpeechRecognition::didStart): (WebCore::SpeechRecognition::didStartCapturingAudio): (WebCore::SpeechRecognition::didStartCapturingSound): (WebCore::SpeechRecognition::didStartCapturingSpeech): (WebCore::SpeechRecognition::didStopCapturingSpeech): (WebCore::SpeechRecognition::didStopCapturingSound): (WebCore::SpeechRecognition::didStopCapturingAudio): (WebCore::SpeechRecognition::didFindNoMatch): (WebCore::SpeechRecognition::didReceiveResult): (WebCore::SpeechRecognition::didError): (WebCore::SpeechRecognition::didEnd): * Modules/speech/SpeechRecognition.h: * Modules/speech/SpeechRecognitionConnection.h: Added. (WebCore::SpeechRecognitionConnection::~SpeechRecognitionConnection): * Modules/speech/SpeechRecognitionConnectionClient.h: Added. (WebCore::SpeechRecognitionConnectionClient::SpeechRecognitionConnectionClient): (WebCore::SpeechRecognitionConnectionClient::identifier const): * Modules/speech/SpeechRecognitionConnectionClientIdentifier.h: Added. * Modules/speech/SpeechRecognitionError.h: Added. (WebCore::SpeechRecognitionError::encode const): (WebCore::SpeechRecognitionError::decode): * Modules/speech/SpeechRecognitionErrorCode.h: * Modules/speech/SpeechRecognitionRequest.cpp: Added. (WebCore::SpeechRecognitionRequest::create): (WebCore::SpeechRecognitionRequest::SpeechRecognitionRequest): * Modules/speech/SpeechRecognitionRequest.h: Added. (WebCore::SpeechRecognitionRequest::clientIdentifier const): (WebCore::SpeechRecognitionRequest::lang const): (WebCore::SpeechRecognitionRequest::continuous const): (WebCore::SpeechRecognitionRequest::interimResults const): (WebCore::SpeechRecognitionRequest::maxAlternatives const): * Modules/speech/SpeechRecognitionRequestInfo.h: Added. (WebCore::SpeechRecognitionRequestInfo::encode const): (WebCore::SpeechRecognitionRequestInfo::decode): * Modules/speech/SpeechRecognitionResultData.h: Added. (WebCore::SpeechRecognitionAlternativeData::encode const): (WebCore::SpeechRecognitionAlternativeData::decode): (WebCore::SpeechRecognitionResultData::encode const): (WebCore::SpeechRecognitionResultData::decode): * Modules/speech/SpeechRecognitionResultList.h: * Modules/speech/SpeechRecognitionUpdate.cpp: Added. (WebCore::convertEnumerationToString): (WebCore::SpeechRecognitionUpdate::create): (WebCore::SpeechRecognitionUpdate::createError): (WebCore::SpeechRecognitionUpdate::createResult): (WebCore::SpeechRecognitionUpdate::SpeechRecognitionUpdate): (WebCore::SpeechRecognitionUpdate::error const): (WebCore::SpeechRecognitionUpdate::result const): * Modules/speech/SpeechRecognitionUpdate.h: Added. (WebCore::SpeechRecognitionUpdate::clientIdentifier const): (WebCore::SpeechRecognitionUpdate::type const): (WebCore::SpeechRecognitionUpdate::encode const): (WebCore::SpeechRecognitionUpdate::decode): (WTF::LogArgument<WebCore::SpeechRecognitionUpdateType>::toString): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/TaskSource.h: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::speechRecognitionConnection): * page/Page.h: * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: * page/DummySpeechRecognitionProvider.h: Added. * page/SpeechRecognitionProvider.h: Added. Source/WebKit: * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Scripts/webkit/messages.py: * Sources.txt: * UIProcess/SpeechRecognitionServer.cpp: Added. (WebKit::SpeechRecognitionServer::SpeechRecognitionServer): (WebKit::SpeechRecognitionServer::start): (WebKit::SpeechRecognitionServer::processNextPendingRequestIfNeeded): (WebKit::SpeechRecognitionServer::stop): (WebKit::SpeechRecognitionServer::abort): (WebKit::SpeechRecognitionServer::removePendingRequest): (WebKit::SpeechRecognitionServer::invalidate): (WebKit::SpeechRecognitionServer::startPocessingRequest): (WebKit::SpeechRecognitionServer::stopProcessingRequest): (WebKit::SpeechRecognitionServer::messageSenderConnection const): (WebKit::SpeechRecognitionServer::messageSenderDestinationID const): * UIProcess/SpeechRecognitionServer.h: Added. * UIProcess/SpeechRecognitionServer.messages.in: Added. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createSpeechRecognitionServer): (WebKit::WebProcessProxy::destroySpeechRecognitionServer): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp: Added. (WebKit::WebSpeechRecognitionConnection::create): (WebKit::WebSpeechRecognitionConnection::WebSpeechRecognitionConnection): (WebKit::WebSpeechRecognitionConnection::~WebSpeechRecognitionConnection): (WebKit::WebSpeechRecognitionConnection::registerClient): (WebKit::WebSpeechRecognitionConnection::start): (WebKit::WebSpeechRecognitionConnection::stop): (WebKit::WebSpeechRecognitionConnection::abort): (WebKit::WebSpeechRecognitionConnection::invalidate): (WebKit::WebSpeechRecognitionConnection::didReceiveUpdate): (WebKit::WebSpeechRecognitionConnection::messageSenderConnection const): (WebKit::WebSpeechRecognitionConnection::messageSenderDestinationID const): * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.h: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.messages.in: Added. * WebProcess/WebCoreSupport/WebSpeechRecognitionProvider.h: Added. * WebProcess/WebPage/IPCTestingAPI.cpp: (WebKit::IPCTestingAPI::encodeArgument): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Source/WebKitLegacy/win: * Interfaces/IWebPreferencesPrivate.idl: * WebPreferenceKeysPrivate.h: * WebPreferences.cpp: (WebPreferences::initializeDefaultSettings): (WebPreferences::speechRecognitionEnabled): (WebPreferences::setSpeechRecognitionEnabled): * WebPreferences.h: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Tools: * DumpRenderTree/win/DumpRenderTree.cpp: (resetWebPreferencesToConsistentValues): LayoutTests: * fast/speechrecognition/start-recognition-twice-exception-expected.txt: Added. * fast/speechrecognition/start-recognition-twice-exception.html: Added. Canonical link: https://commits.webkit.org/231192@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-04 01:44:02 +00:00
WebProcess/WebCoreSupport/WebSpeechRecognitionConnection.cpp
[macOS] Broker access to Speech Synthesis https://bugs.webkit.org/show_bug.cgi?id=195645 <rdar://problem/35369026> Reviewed by Brent Fulgham. To be able to close the connection to the speech synthesis daemon in the WebContent process, speech synthesis should be performed in the UI process. This patch forwards speech synthesis requests to the UI process by sending messages. On the UI process side, the speech synthesis is performed by simply using the existing platform speech synthesizer. Speech synthesis events are sent back to the WebContent process. All messages are async, except for the message to get the list of available voices. Source/WebCore: No new tests, covered by existing tests. * Modules/speech/DOMWindowSpeechSynthesis.cpp: (WebCore::DOMWindowSpeechSynthesis::speechSynthesis): * Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::create): (WebCore::SpeechSynthesis::SpeechSynthesis): (WebCore::SpeechSynthesis::setPlatformSynthesizer): (WebCore::SpeechSynthesis::getVoices): (WebCore::SpeechSynthesis::startSpeakingImmediately): (WebCore::SpeechSynthesis::cancel): (WebCore::SpeechSynthesis::pause): (WebCore::SpeechSynthesis::resume): (WebCore::SpeechSynthesis::boundaryEventOccurred): (WebCore::SpeechSynthesis::didStartSpeaking): (WebCore::SpeechSynthesis::didFinishSpeaking): (WebCore::SpeechSynthesis::didPauseSpeaking): (WebCore::SpeechSynthesis::didResumeSpeaking): (WebCore::SpeechSynthesis::speakingErrorOccurred): (WebCore::SpeechSynthesis::voicesChanged): * Modules/speech/SpeechSynthesis.h: * WebCore.xcodeproj/project.pbxproj: * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (WebCore::Page::speechSynthesisClient const): * page/PageConfiguration.cpp: * page/PageConfiguration.h: * page/SpeechSynthesisClient.h: Added. * platform/PlatformSpeechSynthesisUtterance.h: * platform/PlatformSpeechSynthesizer.h: * platform/ios/PlatformSpeechSynthesizerIOS.mm: (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakRangeOfSpeechString:utterance:]): * platform/mac/PlatformSpeechSynthesizerMac.mm: (-[WebSpeechSynthesisWrapper speechSynthesizer:willSpeakWord:ofString:]): * platform/mock/PlatformSpeechSynthesizerMock.cpp: (WebCore::PlatformSpeechSynthesizerMock::speak): Source/WebKit: * Sources.txt: * UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::didStartSpeaking): (WebKit::WebPageProxy::didFinishSpeaking): (WebKit::WebPageProxy::didPauseSpeaking): (WebKit::WebPageProxy::didResumeSpeaking): (WebKit::WebPageProxy::speakingErrorOccurred): (WebKit::WebPageProxy::boundaryEventOccurred): (WebKit::WebPageProxy::voicesDidChange): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::ensureSpeechSynthesisData): (WebKit::WebPageProxy::speechSynthesisVoiceList): (WebKit::WebPageProxy::speechSynthesisSpeak): (WebKit::WebPageProxy::speechSynthesisCancel): (WebKit::WebPageProxy::speechSynthesisPause): (WebKit::WebPageProxy::speechSynthesisResume): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp: Added. (WebKit::WebSpeechSynthesisClient::voiceList): (WebKit::WebSpeechSynthesisClient::speak): (WebKit::WebSpeechSynthesisClient::cancel): (WebKit::WebSpeechSynthesisClient::pause): (WebKit::WebSpeechSynthesisClient::resume): * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h: Added. (WebKit::WebSpeechSynthesisClient::WebSpeechSynthesisClient): (WebKit::WebSpeechSynthesisClient::~WebSpeechSynthesisClient): * WebProcess/WebCoreSupport/WebSpeechSynthesisVoice.h: Added. (WebKit::WebSpeechSynthesisVoice::encode const): (WebKit::WebSpeechSynthesisVoice::decode): * WebProcess/WebPage/WebPage.cpp: (WebKit::m_hostFileDescriptor): (WebKit::WebPage::speakingErrorOccurred): (WebKit::WebPage::boundaryEventOccurred): (WebKit::WebPage::voicesDidChange): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/com.apple.WebProcess.sb.in: * WebProcess/glib/WebProcessGLib.cpp: Canonical link: https://commits.webkit.org/210086@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-15 18:18:36 +00:00
WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp
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
WebProcess/WebPage/PageBanner.cpp
WebProcess/WebPage/VisitedLinkTableController.cpp
WebProcess/WebPage/WebBackForwardListProxy.cpp
WebProcess/WebPage/WebContextMenu.cpp
[WK2][Cocoa] Implement in-WebProcess cookie cache to avoid sync IPC for document.cookie in most cases https://bugs.webkit.org/show_bug.cgi?id=207593 <rdar://problem/56027027> Reviewed by Antti Koivisto. Source/WebCore: Implement in-WebProcess DOM cookie cache for serving `document.cookie` requests from JavaScript. The first time document.cookie is called for a given host, the WebProcess will pull in all the non-HTTPOnly cookies for that host from the NetworkProcess (still via sync IPC) and store them in an in-memory cookie store. Later document.cookie calls for this host from this WebProcess will then leverage the in-memory cookie store and avoid doing a sync IPC to the NetworkProcess entirely. To maintain the in-process cookie store up-to-date, the WebProcess subscribe for cookie-change notifications from the NetworkProcess, only for the hosts it is interested in. If the page's JavaScript sets a cookie by setting document.cookie, we will not invalidate the cache for performance reasons. Instead, we set the cookie in our in-memory cookie before sending the new cookie to the NetworkProcess. For compatibility reasons, any sync IPC to a given host will currently invalidate the cookie cache for this host. This is because this synchronous load may cause cookies to get set synchronously and the page could access document.cookie right after the sync XHR. This behavior is covered by the following existing test: - http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html Another limitation of the current implementation of the cookie cache is that it is currently only leveraged for first party content. This is suboptimal and could be improved in a later iteration. However, the default behavior in Safari is that third-party iframes do not have cookie access unless they request it using the storage access API. We also currently have a limit of 5 hosts with cached cookies per WebProcess. Tests: http/tests/cookies/document-cookie-after-showModalDialog.html http/tests/cookies/document-cookie-during-iframe-parsing.html * dom/Document.cpp: (WebCore::Document::didLoadResourceSynchronously): * dom/Document.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::didLoadResourceSynchronously): * dom/ScriptExecutionContext.h: * loader/CookieJar.h: * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::loadResourceSynchronously): * page/MemoryRelease.cpp: (WebCore::releaseCriticalMemory): * page/Settings.yaml: * platform/network/NetworkStorageSession.h: (WebCore::CookieChangeObserver::~CookieChangeObserver): * platform/network/cf/NetworkStorageSessionCFNet.cpp: (WebCore::NetworkStorageSession::NetworkStorageSession): (WebCore::NetworkStorageSession::cookieStorage const): * platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::NetworkStorageSession::~NetworkStorageSession): (WebCore::NetworkStorageSession::setCookie): (WebCore::NetworkStorageSession::setCookies): (WebCore::NetworkStorageSession::deleteCookie): (WebCore::nsCookiesToCookieVector): (WebCore::NetworkStorageSession::nsCookieStorage const): (WebCore::createPrivateStorageSession): (WebCore::NetworkStorageSession::httpCookies const): (WebCore::NetworkStorageSession::deleteHTTPCookie const): (WebCore::NetworkStorageSession::setHTTPCookiesForURL const): (WebCore::NetworkStorageSession::httpCookiesForURL const): (WebCore::filterCookies): (WebCore::NetworkStorageSession::cookiesForURL const): (WebCore::NetworkStorageSession::cookiesForSession const): (WebCore::NetworkStorageSession::cookiesForDOM const): (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): (WebCore::NetworkStorageSession::setCookiesFromDOM const): (WebCore::NetworkStorageSession::getRawCookies const): (WebCore::NetworkStorageSession::deleteCookiesForHostnames): (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary): (WebCore::NetworkStorageSession::unregisterCookieChangeListenersIfNecessary): (WebCore::NetworkStorageSession::startListeningForCookieChangeNotifications): (WebCore::NetworkStorageSession::stopListeningForCookieChangeNotifications): (WebCore::NetworkStorageSession::domCookiesForHost): (WebCore::NetworkStorageSession::supportsCookieChangeListenerAPI const): Source/WebCore/PAL: Add new CFNetwork SPI to CFNetworkSPI.h for open source builds and for using respondsToSelector. * pal/spi/cf/CFNetworkSPI.h: Source/WebKit: See WebCore ChangeLog. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::domCookiesForHost): (WebKit::NetworkConnectionToWebProcess::unsubscribeFromCookieChangeNotifications): (WebKit::NetworkConnectionToWebProcess::cookiesAdded): (WebKit::NetworkConnectionToWebProcess::cookiesDeleted): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * Scripts/webkit/messages.py: * Shared/WebPreferences.yaml: * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::cookiesAdded): (WebKit::NetworkProcessConnection::cookiesDeleted): * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/WebPage/Cocoa/WebCookieCacheCocoa.mm: Copied from Source/WebKit/WebProcess/WebPage/WebCookieJar.h. (WebKit::WebCookieCache::inMemoryStorageSession): * WebProcess/WebPage/WebCookieCache.cpp: Added. (WebKit::WebCookieCache::isFunctional): (WebKit::WebCookieCache::cookiesForDOM): (WebKit::WebCookieCache::setCookiesFromDOM): (WebKit::WebCookieCache::cookiesAdded): (WebKit::WebCookieCache::cookiesDeleted): (WebKit::WebCookieCache::clear): (WebKit::WebCookieCache::clearForHost): (WebKit::WebCookieCache::pruneCacheIfNecessary): * WebProcess/WebPage/WebCookieCache.h: Copied from Source/WebKit/WebProcess/WebPage/WebCookieJar.h. * WebProcess/WebPage/WebCookieJar.cpp: (WebKit::WebCookieJar::isEligibleForCache const): (WebKit::WebCookieJar::cookies const): (WebKit::WebCookieJar::setCookies): (WebKit::WebCookieJar::cookiesAdded): (WebKit::WebCookieJar::cookiesDeleted): (WebKit::WebCookieJar::clearCache): (WebKit::WebCookieJar::clearCacheForHost): * WebProcess/WebPage/WebCookieJar.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_overriddenMediaType): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::cookieJar): Source/WTF: Add build time flags for new feature. * wtf/PlatformEnable.h: * wtf/PlatformHave.h: LayoutTests: Add layout test coverage. * http/tests/cookies/document-cookie-after-showModalDialog-expected.txt: Added. * http/tests/cookies/document-cookie-after-showModalDialog.html: Added. * http/tests/cookies/document-cookie-during-iframe-parsing-expected.txt: Added. * http/tests/cookies/document-cookie-during-iframe-parsing.html: Added. * http/tests/cookies/resources/close-modal-dialog.html: Added. * http/tests/cookies/resources/document-cookie-during-iframe-parsing-iframe.html: Added. * http/tests/cookies/resources/set-cookie-and-serve.php: Added. Canonical link: https://commits.webkit.org/220853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-18 06:32:42 +00:00
WebProcess/WebPage/WebCookieCache.cpp
Stop using CookiesStrategy https://bugs.webkit.org/show_bug.cgi?id=161106 Reviewed by Don Olmstead and Antti Koivisto. Source/WebCore: CookiesStrategy is process-global and makes it difficult to switch NetworkStorageSession from having a process-global map. Instead, use a CookieJar object in the WebProcess. This has the additional benefit of making it more clear which code is used in the WebProcess and which code is used in the NetworkProcess. * Modules/beacon/NavigatorBeacon.cpp: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processBuffer): * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeRequest const): (WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const): * WebCore.xcodeproj/project.pbxproj: * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::requestStyleSheet): * dom/Document.cpp: (WebCore::Document::cookie): (WebCore::Document::setCookie): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerGetRawCookies const): * inspector/agents/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::deleteCookie): * loader/CookieJar.cpp: (WebCore::CookieJar::shouldIncludeSecureCookies): (WebCore::CookieJar::sameSiteInfo): (WebCore::CookieJar::create): (WebCore::CookieJar::cookies const): (WebCore::CookieJar::cookieRequestHeaderFieldProxy): (WebCore::CookieJar::setCookies): (WebCore::CookieJar::cookiesEnabled const): (WebCore::CookieJar::cookieRequestHeaderFieldValue const): (WebCore::CookieJar::getRawCookies const): (WebCore::CookieJar::deleteCookie): (WebCore::shouldIncludeSecureCookies): Deleted. (WebCore::sameSiteInfo): Deleted. (WebCore::cookies): Deleted. (WebCore::cookieRequestHeaderFieldProxy): Deleted. (WebCore::setCookies): Deleted. (WebCore::cookiesEnabled): Deleted. (WebCore::cookieRequestHeaderFieldValue): Deleted. (WebCore::getRawCookies): Deleted. (WebCore::deleteCookie): Deleted. * loader/CookieJar.h: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * loader/cache/CachedApplicationManifest.cpp: (WebCore::CachedApplicationManifest::CachedApplicationManifest): * loader/cache/CachedApplicationManifest.h: * loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): * loader/cache/CachedCSSStyleSheet.h: * loader/cache/CachedFont.cpp: (WebCore::CachedFont::CachedFont): * loader/cache/CachedFont.h: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::CachedImage): * loader/cache/CachedImage.h: * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::CachedRawResource): * loader/cache/CachedRawResource.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::setResponse): (WebCore::CachedResource::varyHeaderValuesMatch): * loader/cache/CachedResource.h: (WebCore::CachedResource::cookieJar const): * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::revalidateResource): (WebCore::CachedResourceLoader::loadResource): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedSVGDocument.cpp: (WebCore::CachedSVGDocument::CachedSVGDocument): * loader/cache/CachedSVGDocument.h: * loader/cache/CachedSVGFont.cpp: (WebCore::CachedSVGFont::CachedSVGFont): * loader/cache/CachedSVGFont.h: * loader/cache/CachedScript.cpp: (WebCore::CachedScript::CachedScript): * loader/cache/CachedScript.h: * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::CachedTextTrack): * loader/cache/CachedTextTrack.h: * loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet): * loader/cache/CachedXSLStyleSheet.h: * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::addImageToCache): * loader/cache/MemoryCache.h: * page/Navigator.cpp: (WebCore::Navigator::cookieEnabled const): * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (WebCore::Page::cookieJar): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: * platform/CookiesStrategy.h: Removed. * platform/PlatformStrategies.h: (WebCore::PlatformStrategies::cookiesStrategy): Deleted. * platform/network/CacheValidation.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::collectVaryingRequestHeaders): (WebCore::verifyVaryingRequestHeaders): * platform/network/CacheValidation.h: * platform/network/CookieRequestHeaderFieldProxy.h: * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: * platform/network/cocoa/NetworkStorageSessionCocoa.mm: * platform/network/curl/ResourceHandleCurl.cpp: * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::updateSnapshot): * testing/Internals.cpp: (WebCore::Internals::getCookies const): Source/WebKit: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createCookiesStrategy): Deleted. * NetworkProcess/NetworkProcessPlatformStrategies.h: * NetworkProcess/curl/NetworkDataTaskCurl.cpp: * Scripts/webkit/messages.py: * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Automation/WebAutomationSessionProxy.cpp: (WebKit::WebAutomationSessionProxy::getCookiesForFrame): (WebKit::WebAutomationSessionProxy::deleteCookie): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::cookiesForURL): (WebKit::PluginView::setCookiesForURL): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createCookiesStrategy): Deleted. (WebKit::WebPlatformStrategies::cookiesForDOM): Deleted. (WebKit::WebPlatformStrategies::setCookiesFromDOM): Deleted. (WebKit::WebPlatformStrategies::cookiesEnabled): Deleted. (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted. (WebKit::WebPlatformStrategies::getRawCookies): Deleted. (WebKit::WebPlatformStrategies::deleteCookie): Deleted. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebPage/WebCookieJar.cpp: Added. (WebKit::WebCookieJar::cookies const): (WebKit::WebCookieJar::setCookies): (WebKit::WebCookieJar::cookiesEnabled const): (WebKit::WebCookieJar::cookieRequestHeaderFieldValue const): (WebKit::WebCookieJar::getRawCookies const): (WebKit::WebCookieJar::deleteCookie): * WebProcess/WebPage/WebCookieJar.h: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition): Source/WebKitLegacy/mac: * Misc/WebCache.mm: (+[WebCache addImageToCache:forURL:forFrame:]): * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::getCookies): (WebKit::NetscapePluginInstanceProxy::setCookies): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView getVariable:forURL:value:length:]): (-[WebNetscapePluginView setVariable:forURL:value:length:]): * WebCoreSupport/WebPlatformStrategies.h: * WebCoreSupport/WebPlatformStrategies.mm: (WebPlatformStrategies::createCookiesStrategy): Deleted. (WebPlatformStrategies::cookiesForDOM): Deleted. (WebPlatformStrategies::setCookiesFromDOM): Deleted. (WebPlatformStrategies::cookiesEnabled): Deleted. (WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted. (WebPlatformStrategies::getRawCookies): Deleted. (WebPlatformStrategies::deleteCookie): Deleted. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Source/WebKitLegacy/win: * Plugins/PluginView.cpp: (WebCore::PluginView::getValueForURL): (WebCore::PluginView::setValueForURL): * WebCoreSupport/WebPlatformStrategies.cpp: (WebPlatformStrategies::createBlobRegistry): (WebPlatformStrategies::createCookiesStrategy): Deleted. (WebPlatformStrategies::cookiesForDOM): Deleted. (WebPlatformStrategies::setCookiesFromDOM): Deleted. (WebPlatformStrategies::cookiesEnabled): Deleted. (WebPlatformStrategies::cookieRequestHeaderFieldValue): Deleted. (WebPlatformStrategies::getRawCookies): Deleted. (WebPlatformStrategies::deleteCookie): Deleted. * WebCoreSupport/WebPlatformStrategies.h: * WebView.cpp: (WebView::initWithFrame): Canonical link: https://commits.webkit.org/207977@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-01-15 23:31:33 +00:00
WebProcess/WebPage/WebCookieJar.cpp
WebProcess/WebPage/WebDocumentLoader.cpp
WebProcess/WebPage/WebFrame.cpp
WebProcess/WebPage/WebOpenPanelResultListener.cpp
WebProcess/WebPage/WebPage.cpp @no-unify
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
Source/WebCore: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Extracts an interface GraphicsContextGLIOSurfaceSwapChain which is used to submit IOSurfaces from GraphicsContextGLOpenGL. For web process WebGL, these go to WebGLLayer. For GPU process WebGL, the IOSurfaces go to the prepareForDisplay caller, e.g. the RemoteGraphicsContextGL, which then return the IOSurfaces back to Web process side. RemoteGraphicsContextGLProxy will send them to WebGLLayer. No new tests, tested by existing webgl tests once the implementation works. * PlatformMac.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::getQueryParameter): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::getSamplerParameter): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): (WebCore::WebGL2RenderingContext::readPixels): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::readPixels): * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::updateCache): * page/Chrome.cpp: (WebCore::Chrome::createGraphicsContextGL const): (WebCore::Chrome::windowScreenDidChange): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createGraphicsContextGL const): * platform/HostWindow.h: * platform/RuntimeApplicationChecks.h: (WebCore::isInGPUProcess): * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::isInGPUProcess): * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::create): * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: (GCGLSpan::GCGLSpan): (GCGLSpan<GCGLvoid>::GCGLSpan): * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: Added. (WebCore::RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase): (WebCore::RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL const): (WebCore::RemoteGraphicsContextGLProxyBase::platformTexture const): (WebCore::RemoteGraphicsContextGLProxyBase::getExtensions): (WebCore::RemoteGraphicsContextGLProxyBase::setContextVisibility): (WebCore::RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation const): (WebCore::RemoteGraphicsContextGLProxyBase::isGLES2Compliant const): (WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged): (WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): (WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): (WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): (WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas): (WebCore::RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer): (WebCore::RemoteGraphicsContextGLProxyBase::supports): (WebCore::RemoteGraphicsContextGLProxyBase::ensureEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::isEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::initialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): * platform/graphics/RemoteGraphicsContextGLProxyBase.h: Added. * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Added. * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::InitializeEGLDisplay): (WebCore::GraphicsContextGLOpenGL::create): (WebCore::GraphicsContextGLOpenGL::createShared): (WebCore::GraphicsContextGLOpenGL::createForGPUProcess): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const): (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: Added. (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): (WebCore::RemoteGraphicsContextGLProxyBase::asCV): (WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: (-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): (-[WebGLLayer swapChain]): (-[WebGLLayer prepareForDisplay]): (-[WebGLLayer display]): (WebGLLayerSwapChain::present): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Source/WebKit: Implement RemoteWebGLBackend https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Implement the RemoteGraphicsContextGL in WebKit side. This class will forward calls received via IPC to the GraphicsContextGLOpenGL. At the moment RemoteGraphicsContextGL instance is a direct child of GPUConnectionToWebProcess. Compositing is implemented only for PLATFORM(COCOA). Missing: - Simulated context loss - Simulated context change - Paint WebGL contents to 2D canvas - Upload video to WebGL - Upload canvas to WebGL * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createGraphicsContextGL): (WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: Added. (WebKit::RemoteGraphicsContextGL::create): (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::gpuConnectionToWebProcess const): (WebKit::RemoteGraphicsContextGL::messageSenderConnection const): (WebKit::RemoteGraphicsContextGL::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGL::didComposite): (WebKit::RemoteGraphicsContextGL::forceContextLost): (WebKit::RemoteGraphicsContextGL::recycleContext): (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): (WebKit::RemoteGraphicsContextGL::recycleBuffer): (WebKit::RemoteGraphicsContextGL::present): (WebKit::RemoteGraphicsContextGL::detachClient): (WebKit::RemoteGraphicsContextGL::reshape): (WebKit::RemoteGraphicsContextGL::prepareForDisplay): (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged): * GPUProcess/graphics/RemoteGraphicsContextGL.h: Added. * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: Added. * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: Added. (setFailNextGPUStatusCheck): (synthesizeGLError): (moveErrorsToSyntheticErrorList): (activeTexture): (attachShader): (bindAttribLocation): (bindBuffer): (bindFramebuffer): (bindRenderbuffer): (bindTexture): (blendColor): (blendEquation): (blendEquationSeparate): (blendFunc): (blendFuncSeparate): (checkFramebufferStatus): (clear): (clearColor): (clearDepth): (clearStencil): (colorMask): (compileShader): (copyTexImage2D): (copyTexSubImage2D): (createBuffer): (createFramebuffer): (createProgram): (createRenderbuffer): (createShader): (createTexture): (cullFace): (deleteBuffer): (deleteFramebuffer): (deleteProgram): (deleteRenderbuffer): (deleteShader): (deleteTexture): (depthFunc): (depthMask): (depthRange): (detachShader): (disable): (disableVertexAttribArray): (drawArrays): (drawElements): (enable): (enableVertexAttribArray): (finish): (flush): (framebufferRenderbuffer): (framebufferTexture2D): (frontFace): (generateMipmap): (getActiveAttrib): (getActiveUniform): (getAttribLocation): (getBufferParameteri): (getString): (getFloatv): (getIntegerv): (getInteger64): (getInteger64i): (getProgrami): (getBooleanv): (getError): (getFramebufferAttachmentParameteri): (getProgramInfoLog): (getRenderbufferParameteri): (getShaderi): (getShaderInfoLog): (getShaderPrecisionFormat): (getShaderSource): (getTexParameterf): (getTexParameteri): (getUniformfv): (getUniformiv): (getUniformuiv): (getUniformLocation): (getVertexAttribOffset): (hint): (isBuffer): (isEnabled): (isFramebuffer): (isProgram): (isRenderbuffer): (isShader): (isTexture): (lineWidth): (linkProgram): (pixelStorei): (polygonOffset): (renderbufferStorage): (sampleCoverage): (scissor): (shaderSource): (stencilFunc): (stencilFuncSeparate): (stencilMask): (stencilMaskSeparate): (stencilOp): (stencilOpSeparate): (texParameterf): (texParameteri): (uniform1f): (uniform1fv): (uniform1i): (uniform1iv): (uniform2f): (uniform2fv): (uniform2i): (uniform2iv): (uniform3f): (uniform3fv): (uniform3i): (uniform3iv): (uniform4f): (uniform4fv): (uniform4i): (uniform4iv): (uniformMatrix2fv): (uniformMatrix3fv): (uniformMatrix4fv): (useProgram): (validateProgram): (vertexAttrib1f): (vertexAttrib1fv): (vertexAttrib2f): (vertexAttrib2fv): (vertexAttrib3f): (vertexAttrib3fv): (vertexAttrib4f): (vertexAttrib4fv): (vertexAttribPointer): (viewport): (bufferData0): (bufferData1): (bufferSubData): (readnPixels0): (readnPixels1): (texImage2D0): (texImage2D1): (texSubImage2D0): (texSubImage2D1): (compressedTexImage2D0): (compressedTexImage2D1): (compressedTexSubImage2D0): (compressedTexSubImage2D1): (drawArraysInstanced): (drawElementsInstanced): (vertexAttribDivisor): (createVertexArray): (deleteVertexArray): (isVertexArray): (bindVertexArray): (copyBufferSubData): (getBufferSubData): (blitFramebuffer): (framebufferTextureLayer): (invalidateFramebuffer): (invalidateSubFramebuffer): (readBuffer): (renderbufferStorageMultisample): (texStorage2D): (texStorage3D): (texImage3D0): (texImage3D1): (texSubImage3D0): (texSubImage3D1): (copyTexSubImage3D): (compressedTexImage3D0): (compressedTexImage3D1): (compressedTexSubImage3D0): (compressedTexSubImage3D1): (getFragDataLocation): (uniform1ui): (uniform2ui): (uniform3ui): (uniform4ui): (uniform1uiv): (uniform2uiv): (uniform3uiv): (uniform4uiv): (uniformMatrix2x3fv): (uniformMatrix3x2fv): (uniformMatrix2x4fv): (uniformMatrix4x2fv): (uniformMatrix3x4fv): (uniformMatrix4x3fv): (vertexAttribI4i): (vertexAttribI4iv): (vertexAttribI4ui): (vertexAttribI4uiv): (vertexAttribIPointer): (drawRangeElements): (drawBuffers): (clearBufferiv): (clearBufferuiv): (clearBufferfv): (clearBufferfi): (createQuery): (deleteQuery): (isQuery): (beginQuery): (endQuery): (getQuery): (getQueryObjectui): (createSampler): (deleteSampler): (isSampler): (bindSampler): (samplerParameteri): (samplerParameterf): (getSamplerParameterf): (getSamplerParameteri): (fenceSync): (isSync): (deleteSync): (clientWaitSync): (waitSync): (getSynci): (createTransformFeedback): (deleteTransformFeedback): (isTransformFeedback): (bindTransformFeedback): (beginTransformFeedback): (endTransformFeedback): (transformFeedbackVaryings): (getTransformFeedbackVarying): (pauseTransformFeedback): (resumeTransformFeedback): (bindBufferBase): (bindBufferRange): (getUniformIndices): (getActiveUniforms): (getUniformBlockIndex): (getActiveUniformBlockName): (uniformBlockBinding): (getActiveUniformBlockiv): (getGraphicsResetStatusARB): (blitFramebufferANGLE): (renderbufferStorageMultisampleANGLE): (createVertexArrayOES): (deleteVertexArrayOES): (isVertexArrayOES): (bindVertexArrayOES): (getTranslatedShaderSourceANGLE): (insertEventMarkerEXT): (pushGroupMarkerEXT): (popGroupMarkerEXT): (drawBuffersEXT): (drawArraysInstancedANGLE): (drawElementsInstancedANGLE): (vertexAttribDivisorANGLE): * GPUProcess/mac/GPUProcessMac.mm: (WebKit::GPUProcess::initializeProcess): * GPUProcess/media/RemoteLegacyCDMProxy.h: * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: * GPUProcess/media/RemoteMediaResourceManager.cpp: * GPUProcess/media/RemoteMediaResourceManager.h: * GPUProcess/media/RemoteMediaSourceProxy.h: * GPUProcess/media/RemoteSourceBufferProxy.cpp: * GPUProcess/media/RemoteSourceBufferProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: * GPUProcess/webrtc/RemoteMediaRecorder.h: * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/Download.h: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/DownloadManager.h: * NetworkProcess/NetworkSocketChannel.cpp: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/NetworkSocketStream.h: * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: * NetworkProcess/soup/WebSocketTaskSoup.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * Platform/IPC/ArgumentCoders.h: * Platform/IPC/ArrayReference.h: Copied from Source/WebKit/Platform/IPC/DataReference.h. (IPC::ArrayReference::ArrayReference): (IPC::ArrayReference::isEmpty const): (IPC::ArrayReference::size const): (IPC::ArrayReference::data const): (IPC::ArrayReference::vector const): * Platform/IPC/Connection.h: (IPC::Connection::sendSync): * Platform/IPC/DataReference.h: * Platform/IPC/Decoder.cpp: (IPC::Decoder::decodeFixedLengthReference): * Platform/IPC/Decoder.h: * Platform/IPC/Encoder.cpp: (IPC::Encoder::wrapForTesting): * Platform/IPC/Encoder.h: * Platform/IPC/HandleMessage.h: * Platform/IPC/MessageSender.h: (IPC::MessageSender::sendSync): * Platform/IPC/SharedBufferCopy.cpp: (IPC::SharedBufferCopy::decode): * Platform/IPC/SharedBufferDataReference.cpp: * Platform/IPC/StringReference.cpp: * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * Scripts/webkit/messages.py: * Shared/API/APIData.cpp: * Shared/AuxiliaryProcess.h: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cf/ArgumentCodersCF.cpp: * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder<CertificateInfo>::encode): (IPC::ArgumentCoder<CertificateInfo>::decode): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::sendSync): * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: * UIProcess/PageClient.h: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: * UIProcess/WebURLSchemeHandler.h: * UIProcess/WebURLSchemeTask.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h: Renamed from Source/WebKit/Platform/IPC/DataReference.cpp. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::create): (WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::messageSenderConnection const): (WebKit::RemoteGraphicsContextGLProxy::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGLProxy::reshape): (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): (WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGLProxy::notifyMarkContextChanged): (WebKit::RemoteGraphicsContextGLProxy::simulateContextChanged): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): (WebKit::RemoteGraphicsContextGLProxy::wasCreated): (WebKit::RemoteGraphicsContextGLProxy::wasLost): (WebKit::RemoteGraphicsContextGLProxy::wasChanged): (WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: Added. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck): (WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError): (WebKit::RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList): (WebKit::RemoteGraphicsContextGLProxy::activeTexture): (WebKit::RemoteGraphicsContextGLProxy::attachShader): (WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::bindBuffer): (WebKit::RemoteGraphicsContextGLProxy::bindFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::bindRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::bindTexture): (WebKit::RemoteGraphicsContextGLProxy::blendColor): (WebKit::RemoteGraphicsContextGLProxy::blendEquation): (WebKit::RemoteGraphicsContextGLProxy::blendEquationSeparate): (WebKit::RemoteGraphicsContextGLProxy::blendFunc): (WebKit::RemoteGraphicsContextGLProxy::blendFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::checkFramebufferStatus): (WebKit::RemoteGraphicsContextGLProxy::clear): (WebKit::RemoteGraphicsContextGLProxy::clearColor): (WebKit::RemoteGraphicsContextGLProxy::clearDepth): (WebKit::RemoteGraphicsContextGLProxy::clearStencil): (WebKit::RemoteGraphicsContextGLProxy::colorMask): (WebKit::RemoteGraphicsContextGLProxy::compileShader): (WebKit::RemoteGraphicsContextGLProxy::copyTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::createBuffer): (WebKit::RemoteGraphicsContextGLProxy::createFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::createProgram): (WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::createShader): (WebKit::RemoteGraphicsContextGLProxy::createTexture): (WebKit::RemoteGraphicsContextGLProxy::cullFace): (WebKit::RemoteGraphicsContextGLProxy::deleteBuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteProgram): (WebKit::RemoteGraphicsContextGLProxy::deleteRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteShader): (WebKit::RemoteGraphicsContextGLProxy::deleteTexture): (WebKit::RemoteGraphicsContextGLProxy::depthFunc): (WebKit::RemoteGraphicsContextGLProxy::depthMask): (WebKit::RemoteGraphicsContextGLProxy::depthRange): (WebKit::RemoteGraphicsContextGLProxy::detachShader): (WebKit::RemoteGraphicsContextGLProxy::disable): (WebKit::RemoteGraphicsContextGLProxy::disableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::drawArrays): (WebKit::RemoteGraphicsContextGLProxy::drawElements): (WebKit::RemoteGraphicsContextGLProxy::enable): (WebKit::RemoteGraphicsContextGLProxy::enableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::finish): (WebKit::RemoteGraphicsContextGLProxy::flush): (WebKit::RemoteGraphicsContextGLProxy::framebufferRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTexture2D): (WebKit::RemoteGraphicsContextGLProxy::frontFace): (WebKit::RemoteGraphicsContextGLProxy::generateMipmap): (WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniform): (WebKit::RemoteGraphicsContextGLProxy::getAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getString): (WebKit::RemoteGraphicsContextGLProxy::getFloatv): (WebKit::RemoteGraphicsContextGLProxy::getIntegerv): (WebKit::RemoteGraphicsContextGLProxy::getInteger64): (WebKit::RemoteGraphicsContextGLProxy::getInteger64i): (WebKit::RemoteGraphicsContextGLProxy::getProgrami): (WebKit::RemoteGraphicsContextGLProxy::getBooleanv): (WebKit::RemoteGraphicsContextGLProxy::getError): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri): (WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getRenderbufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getShaderi): (WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): (WebKit::RemoteGraphicsContextGLProxy::getShaderSource): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterf): (WebKit::RemoteGraphicsContextGLProxy::getTexParameteri): (WebKit::RemoteGraphicsContextGLProxy::getUniformfv): (WebKit::RemoteGraphicsContextGLProxy::getUniformiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformuiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformLocation): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribOffset): (WebKit::RemoteGraphicsContextGLProxy::hint): (WebKit::RemoteGraphicsContextGLProxy::isBuffer): (WebKit::RemoteGraphicsContextGLProxy::isEnabled): (WebKit::RemoteGraphicsContextGLProxy::isFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::isProgram): (WebKit::RemoteGraphicsContextGLProxy::isRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::isShader): (WebKit::RemoteGraphicsContextGLProxy::isTexture): (WebKit::RemoteGraphicsContextGLProxy::lineWidth): (WebKit::RemoteGraphicsContextGLProxy::linkProgram): (WebKit::RemoteGraphicsContextGLProxy::pixelStorei): (WebKit::RemoteGraphicsContextGLProxy::polygonOffset): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorage): (WebKit::RemoteGraphicsContextGLProxy::sampleCoverage): (WebKit::RemoteGraphicsContextGLProxy::scissor): (WebKit::RemoteGraphicsContextGLProxy::shaderSource): (WebKit::RemoteGraphicsContextGLProxy::stencilFunc): (WebKit::RemoteGraphicsContextGLProxy::stencilFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilMask): (WebKit::RemoteGraphicsContextGLProxy::stencilMaskSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilOp): (WebKit::RemoteGraphicsContextGLProxy::stencilOpSeparate): (WebKit::RemoteGraphicsContextGLProxy::texParameterf): (WebKit::RemoteGraphicsContextGLProxy::texParameteri): (WebKit::RemoteGraphicsContextGLProxy::uniform1f): (WebKit::RemoteGraphicsContextGLProxy::uniform1fv): (WebKit::RemoteGraphicsContextGLProxy::uniform1i): (WebKit::RemoteGraphicsContextGLProxy::uniform1iv): (WebKit::RemoteGraphicsContextGLProxy::uniform2f): (WebKit::RemoteGraphicsContextGLProxy::uniform2fv): (WebKit::RemoteGraphicsContextGLProxy::uniform2i): (WebKit::RemoteGraphicsContextGLProxy::uniform2iv): (WebKit::RemoteGraphicsContextGLProxy::uniform3f): (WebKit::RemoteGraphicsContextGLProxy::uniform3fv): (WebKit::RemoteGraphicsContextGLProxy::uniform3i): (WebKit::RemoteGraphicsContextGLProxy::uniform3iv): (WebKit::RemoteGraphicsContextGLProxy::uniform4f): (WebKit::RemoteGraphicsContextGLProxy::uniform4fv): (WebKit::RemoteGraphicsContextGLProxy::uniform4i): (WebKit::RemoteGraphicsContextGLProxy::uniform4iv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4fv): (WebKit::RemoteGraphicsContextGLProxy::useProgram): (WebKit::RemoteGraphicsContextGLProxy::validateProgram): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribPointer): (WebKit::RemoteGraphicsContextGLProxy::viewport): (WebKit::RemoteGraphicsContextGLProxy::bufferData): (WebKit::RemoteGraphicsContextGLProxy::bufferSubData): (WebKit::RemoteGraphicsContextGLProxy::readnPixels): (WebKit::RemoteGraphicsContextGLProxy::texImage2D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstanced): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstanced): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisor): (WebKit::RemoteGraphicsContextGLProxy::createVertexArray): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArray): (WebKit::RemoteGraphicsContextGLProxy::isVertexArray): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArray): (WebKit::RemoteGraphicsContextGLProxy::copyBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::blitFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTextureLayer): (WebKit::RemoteGraphicsContextGLProxy::invalidateFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::invalidateSubFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::readBuffer): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisample): (WebKit::RemoteGraphicsContextGLProxy::texStorage2D): (WebKit::RemoteGraphicsContextGLProxy::texStorage3D): (WebKit::RemoteGraphicsContextGLProxy::texImage3D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation): (WebKit::RemoteGraphicsContextGLProxy::uniform1ui): (WebKit::RemoteGraphicsContextGLProxy::uniform2ui): (WebKit::RemoteGraphicsContextGLProxy::uniform3ui): (WebKit::RemoteGraphicsContextGLProxy::uniform4ui): (WebKit::RemoteGraphicsContextGLProxy::uniform1uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform2uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform3uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform4uiv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4i): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4iv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4ui): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4uiv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribIPointer): (WebKit::RemoteGraphicsContextGLProxy::drawRangeElements): (WebKit::RemoteGraphicsContextGLProxy::drawBuffers): (WebKit::RemoteGraphicsContextGLProxy::clearBufferiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferuiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfi): (WebKit::RemoteGraphicsContextGLProxy::createQuery): (WebKit::RemoteGraphicsContextGLProxy::deleteQuery): (WebKit::RemoteGraphicsContextGLProxy::isQuery): (WebKit::RemoteGraphicsContextGLProxy::beginQuery): (WebKit::RemoteGraphicsContextGLProxy::endQuery): (WebKit::RemoteGraphicsContextGLProxy::getQuery): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui): (WebKit::RemoteGraphicsContextGLProxy::createSampler): (WebKit::RemoteGraphicsContextGLProxy::deleteSampler): (WebKit::RemoteGraphicsContextGLProxy::isSampler): (WebKit::RemoteGraphicsContextGLProxy::bindSampler): (WebKit::RemoteGraphicsContextGLProxy::samplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::fenceSync): (WebKit::RemoteGraphicsContextGLProxy::isSync): (WebKit::RemoteGraphicsContextGLProxy::deleteSync): (WebKit::RemoteGraphicsContextGLProxy::clientWaitSync): (WebKit::RemoteGraphicsContextGLProxy::waitSync): (WebKit::RemoteGraphicsContextGLProxy::getSynci): (WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::deleteTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::isTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::beginTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::endTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings): (WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying): (WebKit::RemoteGraphicsContextGLProxy::pauseTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::resumeTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindBufferBase): (WebKit::RemoteGraphicsContextGLProxy::bindBufferRange): (WebKit::RemoteGraphicsContextGLProxy::getUniformIndices): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniforms): (WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName): (WebKit::RemoteGraphicsContextGLProxy::uniformBlockBinding): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockiv): (WebKit::RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB): (WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): (WebKit::RemoteGraphicsContextGLProxy::createVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::isVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE): (WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::drawBuffersEXT): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativ): (WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess): * WebProcess/GPU/media/RemoteAudioSession.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: * WebProcess/GPU/media/SourceBufferPrivateRemote.h: * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebSocketChannel.cpp: * WebProcess/Network/WebSocketChannel.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.h: * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createGraphicsContextGL const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForWebGL): (WebKit::WebProcess::shouldUseRemoteRenderingForWebGL const): * WebProcess/WebProcess.h: Tools: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC and is incomplete. Add the code generator to generate the implementation. Currently the generator generates a WebKit IPC implementation. The input definition to the generator is the proxy implementation header files. The output of the generator is - WebKit IPC message definition file - Message sender code - Message receiver and payload invocation code The generator converts GraphicsContextGL GCGL -prefixed types to sized IPC types. The generator is invoked during development time and the results are stored in the repository. * Scripts/generate-gpup-webgl: Added. LayoutTests: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Adds test expectations for the missing functionality. Does not yet enable the tests that actually pass but which were skipped before the implementation. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/232258@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 18:32:29 +00:00
Cross platform compilation of PlatformXRSystem and PlatformXRSystemProxy https://bugs.webkit.org/show_bug.cgi?id=226919 Reviewed by Dean Jackson. PlatformXRSystem and PlatformXRSystemProxy are only compiled in Cocoa platform while WPE uses OpenXR, which only has code in WebCore. In order to run WebKit based WebXR on non-cocoa VR Standalone devices we also need to split the code and IPC messages between UIProcess/WebProcess. The existing PlatformXRSystem/PlatformXRSystemProxy pattern fits very well to the VR standalone scenario. This patch ensures that the existing code can be used in more platforms other than Cocoa. Tested by WebXR WPT. * CMakeLists.txt: * DerivedSources.make: * PlatformMac.cmake: * Shared/XR/XRDeviceIdentifier.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceIdentifier.h. * Shared/XR/XRDeviceInfo.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm. * Shared/XR/XRDeviceInfo.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.h. * Shared/XR/XRDeviceProxy.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm. * Shared/XR/XRDeviceProxy.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.h. * Shared/mac/MediaFormatReader/MediaSampleCursor.cpp: Add include to fix compilation error * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/PlatformXRCoordinator.mm: Copied from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::resetState): * UIProcess/WebPageProxy.h: * UIProcess/XR/PlatformXRCoordinator.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h. * UIProcess/XR/PlatformXRSystem.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.mm. * UIProcess/XR/PlatformXRSystem.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.h. * UIProcess/XR/PlatformXRSystem.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::xrSystemProxy): * WebProcess/WebPage/WebPage.h: * WebProcess/XR/PlatformXRSystemProxy.cpp: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm. * WebProcess/XR/PlatformXRSystemProxy.h: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h. * WebProcess/XR/PlatformXRSystemProxy.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. Canonical link: https://commits.webkit.org/239583@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 09:30:56 +00:00
WebProcess/XR/PlatformXRSystemProxy.cpp
Add initial support for BroadcastChannel behind a runtime flag https://bugs.webkit.org/show_bug.cgi?id=227924 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Rebaseline WPT tests now that more tests are running and we are passing more checks. * web-platform-tests/FileAPI/url/url-in-tags-revoke.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/require-corp.https-expected.txt: * web-platform-tests/html/dom/idlharness.worker-expected.txt: * web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.https-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/basics.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/interface.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt: Added. * web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub-expected.txt: * web-platform-tests/webstorage/storage_session_window_noopener.window-expected.txt: * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt: Source/WebCore: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. Tests: - fast/html/broadcast-channel-between-different-sessions.html - Rebaselined WPT tests * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/BroadcastChannel.cpp: Added. (WebCore::channelToContextIdentifier): (WebCore::BroadcastChannel::BroadcastChannel): (WebCore::BroadcastChannel::~BroadcastChannel): (WebCore::BroadcastChannel::postMessage): (WebCore::BroadcastChannel::close): (WebCore::BroadcastChannel::dispatchMessageTo): (WebCore::BroadcastChannel::dispatchMessage): (WebCore::BroadcastChannel::ensureOnMainThread): (WebCore::BroadcastChannel::activeDOMObjectName const): (WebCore::BroadcastChannel::eventListenersDidChange): (WebCore::BroadcastChannel::virtualHasPendingActivity const): * dom/BroadcastChannel.h: Added. (WebCore::BroadcastChannel::create): (WebCore::BroadcastChannel::identifier const): (WebCore::BroadcastChannel::name const): * dom/BroadcastChannel.idl: Added. * dom/BroadcastChannelIdentifier.h: Added. * dom/BroadcastChannelRegistry.h: Added. (WebCore::BroadcastChannelRegistry::~BroadcastChannelRegistry): * dom/DeviceOrientationAndMotionAccessController.h: * dom/DeviceOrientationEvent.cpp: * dom/DeviceOrientationEvent.h: * dom/EventTargetFactory.in: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setBroadcastChannelRegistry): * page/Page.h: (WebCore::Page::broadcastChannelRegistry): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: Source/WebKit: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/NetworkBroadcastChannelRegistry.cpp: Added. (WebKit::NetworkBroadcastChannelRegistry::registerChannel): (WebKit::NetworkBroadcastChannelRegistry::unregisterChannel): (WebKit::NetworkBroadcastChannelRegistry::postMessage): (WebKit::NetworkBroadcastChannelRegistry::removeConnection): * NetworkProcess/NetworkBroadcastChannelRegistry.h: Added. (WebKit::NetworkBroadcastChannelRegistry::GlobalBroadcastChannelIdentifier::operator== const): * NetworkProcess/NetworkBroadcastChannelRegistry.messages.in: Added. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didClose): * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::broadcastChannelRegistry): * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebKit::networkProcessConnection): (WebKit::WebBroadcastChannelRegistry::registerChannel): (WebKit::WebBroadcastChannelRegistry::unregisterChannel): (WebKit::WebBroadcastChannelRegistry::postMessage): (WebKit::WebBroadcastChannelRegistry::postMessageToRemote): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::broadcastChannelRegistry): Source/WebKitLegacy: Add BroadcastChannelRegistry implementation for WebKitLegacy. * Sources.txt: * WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebBroadcastChannelRegistry::getOrCreate): (WebBroadcastChannelRegistry::registerChannel): (WebBroadcastChannelRegistry::unregisterChannel): (WebBroadcastChannelRegistry::postMessage): * WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebKitLegacy.xcodeproj/project.pbxproj: Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Source/WTF: Add experimental feature flag for BroadcastChannel, off by default. * Scripts/Preferences/WebPreferencesExperimental.yaml: LayoutTests: * TestExpectations: * fast/html/broadcast-channel-between-different-sessions-expected.txt: Added. * fast/html/broadcast-channel-between-different-sessions.html: Added. * fast/html/resources/broadcast-channel-between-different-sessions-window.html: Added. Add layout test coverage to make sure that windows belonging to different session are unable to communicate via BroadcastChannel. * platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt. * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/TestExpectations: * platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: Added. * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: Added. * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/win/TestExpectations: * platform/wk2/TestExpectations: Update test expectations now that we support BroadcastChannel. Canonical link: https://commits.webkit.org/239714@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 00:36:39 +00:00
NetworkBroadcastChannelRegistryMessageReceiver.cpp
Implement RTCDataChannel transfer out of process https://bugs.webkit.org/show_bug.cgi?id=223443 Reviewed by Eric Carlson. Source/WebCore: Add support for serialization/deserialization of RTCDataChannel information so that it can be MessagePort transfered or transfered to out-of-process contexts like Window or Service Worker. Add infrastructure for remote sources (that allows to send data or close data channels) and remote handlers which receive messages from out-of-process data channels. Covered by API tests. * Modules/mediastream/DetachedRTCDataChannel.h: Added. (WebCore::DetachedRTCDataChannel::DetachedRTCDataChannel): (WebCore::DetachedRTCDataChannel::memoryCost const): (WebCore::DetachedRTCDataChannel::encode const): (WebCore::DetachedRTCDataChannel::decode): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::rtcDataChannelLocalMap): (WebCore::RTCDataChannel::handlerFromIdentifier): (WebCore::RTCDataChannel::create): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCDataChannelRemoteHandler.cpp: Added. (WebCore::RTCDataChannelRemoteHandler::create): (WebCore::RTCDataChannelRemoteHandler::RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::~RTCDataChannelRemoteHandler): (WebCore::RTCDataChannelRemoteHandler::didChangeReadyState): (WebCore::RTCDataChannelRemoteHandler::didReceiveStringData): (WebCore::RTCDataChannelRemoteHandler::didReceiveRawData): (WebCore::RTCDataChannelRemoteHandler::didDetectError): (WebCore::RTCDataChannelRemoteHandler::bufferedAmountIsDecreasing): (WebCore::RTCDataChannelRemoteHandler::readyToSend): (WebCore::RTCDataChannelRemoteHandler::setClient): (WebCore::RTCDataChannelRemoteHandler::sendStringData): (WebCore::RTCDataChannelRemoteHandler::sendRawData): (WebCore::RTCDataChannelRemoteHandler::close): * Modules/mediastream/RTCDataChannelRemoteHandler.h: Added. * Modules/mediastream/RTCDataChannelRemoteSource.cpp: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelRemoteSource::RTCDataChannelRemoteSource): (WebCore::RTCDataChannelRemoteSource::~RTCDataChannelRemoteSource): * Modules/mediastream/RTCDataChannelRemoteSource.h: Added. (WebCore::RTCDataChannelRemoteSource::create): (WebCore::RTCDataChannelRemoteSource::sendStringData): (WebCore::RTCDataChannelRemoteSource::sendRawData): (WebCore::RTCDataChannelRemoteSource::close): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::postTask): * Modules/webaudio/AudioWorkletMessagingProxy.cpp: (WebCore::AudioWorkletMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * Modules/webaudio/AudioWorkletMessagingProxy.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::encode const): (WebCore::SerializedScriptValue::decode): * dom/Document.cpp: (WebCore::Document::createRTCDataChannelRemoteHandlerConnection): * dom/Document.h: * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::createRTCDataChannelRemoteHandlerConnection): * platform/ScriptExecutionContextIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelState.h. * platform/mediastream/RTCDataChannelHandler.h: (WebCore::RTCDataChannelInit::encode const): (WebCore::RTCDataChannelInit::decode): * platform/mediastream/RTCDataChannelIdentifier.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. (WebCore::RTCDataChannelIdentifier::encode const): (WebCore::RTCDataChannelIdentifier::decode): * platform/mediastream/RTCDataChannelRemoteHandlerConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelRemoteSourceConnection.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelHandler.h. * platform/mediastream/RTCDataChannelState.h: * platform/mediastream/RTCPriorityType.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerGlobalScope.h: * workers/WorkerLoaderProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::createRTCDataChannelRemoteHandlerConnection): * workers/WorkerMessagingProxy.h: * workers/service/context/ServiceWorkerThreadProxy.cpp: (WebCore::ServiceWorkerThreadProxy::createRTCDataChannelRemoteHandlerConnection): * workers/service/context/ServiceWorkerThreadProxy.h: Source/WebKit: Add support for connecting remote sources to remote data channels. This is done by connection detached data channels to remote source that will send messages to network process. Network process then sends to the process in which was reattached the data channel. Pairing of data channels is done in main thread through connectToSource message. The data then flows in background threads, network process being the proxy between web processes. RTCDataChannelRemoteManagerProxy is the forwarding entity in NetworkProcess. RTCDataChannelRemoteManager is the entity in WebProcess doing the messaging from and to data channels. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::connectToRTCDataChannelRemoteSource): (WebKit::NetworkConnectionToWebProcess::registerToRTCDataChannelProxy): (WebKit::NetworkConnectionToWebProcess::unregisterToRTCDataChannelProxy): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::rtcDataChannelProxy): * NetworkProcess/NetworkProcess.h: * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp: Added. (WebKit::RTCDataChannelRemoteManagerProxy::RTCDataChannelRemoteManagerProxy): (WebKit::RTCDataChannelRemoteManagerProxy::registerConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::unregisterConnectionToWebProcess): (WebKit::RTCDataChannelRemoteManagerProxy::sendData): (WebKit::RTCDataChannelRemoteManagerProxy::close): (WebKit::RTCDataChannelRemoteManagerProxy::changeReadyState): (WebKit::RTCDataChannelRemoteManagerProxy::receiveData): (WebKit::RTCDataChannelRemoteManagerProxy::detectError): (WebKit::RTCDataChannelRemoteManagerProxy::bufferedAmountIsDecreasing): * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.h: Added. * NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.messages.in: Added. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::connectToRTCDataChannelRemoteSource): * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: (WebKit::LibWebRTCProvider::createRTCDataChannelRemoteHandlerConnection): * WebProcess/Network/webrtc/LibWebRTCProvider.h: * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp: Added. (WebKit::RTCDataChannelRemoteManager::sharedManager): (WebKit::RTCDataChannelRemoteManager::RTCDataChannelRemoteManager): (WebKit::RTCDataChannelRemoteManager::setConnection): (WebKit::RTCDataChannelRemoteManager::connectToRemoteSource): (WebKit::RTCDataChannelRemoteManager::remoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::remoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::postTaskToHandler): (WebKit::RTCDataChannelRemoteManager::sourceFromIdentifier): (WebKit::RTCDataChannelRemoteManager::sendData): (WebKit::RTCDataChannelRemoteManager::close): (WebKit::RTCDataChannelRemoteManager::changeReadyState): (WebKit::RTCDataChannelRemoteManager::receiveData): (WebKit::RTCDataChannelRemoteManager::detectError): (WebKit::RTCDataChannelRemoteManager::bufferedAmountIsDecreasing): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::RemoteHandlerConnection): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::connectToSource): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::sendData): (WebKit::RTCDataChannelRemoteManager::RemoteHandlerConnection::close): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::create): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::RemoteSourceConnection): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didChangeReadyState): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveStringData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveRawData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didDetectError): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::bufferedAmountIsDecreasing): * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h: Added. * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.messages.in: Copied from Source/WebKit/WebProcess/Network/NetworkProcessConnection.messages.in. * WebProcess/Storage/WebSWContextManagerConnection.cpp: (WebKit::WebSWContextManagerConnection::installServiceWorker): Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/235572@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 18:29:36 +00:00
RTCDataChannelRemoteManagerMessageReceiver.cpp
RTCDataChannelRemoteManagerProxyMessageReceiver.cpp
Implement a remote Internal Unit in GPUProcess for audio MediaStreamTrack rendering https://bugs.webkit.org/show_bug.cgi?id=225603 Source/WebCore: <rdar://problem/78114391> Reviewed by Eric Carlson. Fixed the case where we were calling start even though a source was already being played. This is more consistent since we are doing those checks for stop. Reduce the code where we lock sources to the minimum. In case we want to lock the sources copy in audio thread and we fail, continue rendering audio instead of dropping everything. Add some main thread assertions in AudioMediaStreamTrackRendererUnit methods. Manually tested. * platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp: (WebCore::AudioMediaStreamTrackRendererUnit::addSource): (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): (WebCore::AudioMediaStreamTrackRendererUnit::render): Source/WebKit: Reviewed by Eric Carlson. Implement an InternalUnit by creating a ring buffer that gets written on WebProcess and read on GPUProcess by an audio unit. In the previous implementation, each audio track was sent to GPUProcess that was doing the mixing. Sending was done by sending IPC message for each audio sample, which was also processing inefficient. We are now creating an Audio Unit in GPUProcess and similarly to WebAudio asking WebProcess to render audio in a buffer that will be actually rendered by the audio unit. The mixing happens in WebProcess so only one buffer is shared between GPUProcess and WebProcess, and no IPC message is sent for each chunk. The potential downside is that the mixing is done with fixed chunk size instead of chunk size requested by the audio unit. This might trigger some latency or some overhead if the fixed chunk size is too far from what the audio unit is asking. In case of GPUProcess crash, we keep the same format description but we delay recreation of the unit if the unit is stopped. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::audioMediaStreamTrackRendererInternalUnitManager): (WebKit::GPUConnectionToWebProcess::dispatchMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: (WebKit::RemoteAudioMediaStreamTrackRenderer::start): * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp: Added. (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::RemoteAudioMediaStreamTrackRendererInternalUnitManager): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::~RemoteAudioMediaStreamTrackRendererInternalUnitManager): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::createUnit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::deleteUnit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::startUnit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::stopUnit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::setAudioOutputDevice): (WebKit::renderCallback): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::Unit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::~Unit): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::start): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::stop): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::setAudioOutputDevice): (WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit::render): * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.h: Added. * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.messages.in: Added. * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * Sources.txt: * SourcesCocoa.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: (WebKit::AudioMediaStreamTrackRenderer::start): * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: * WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitIdentifier.h: Added. * WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.cpp: Added. (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::add): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::remove): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::createRemoteInternalUnit): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::gpuProcessConnectionClosed): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::Proxy): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::~Proxy): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::createRemoteUnit): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::initialize): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::start): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::storageChanged): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::stop): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::setAudioOutputDevice): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::retrieveFormatDescription): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::stopThread): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::startThread): (WebKit::AudioMediaStreamTrackRendererInternalUnitManager::Proxy::restartIfNeeded): * WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.h: Added. * WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererInternalUnitManager.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::audioMediaStreamTrackRendererInternalUnitManager): * WebProcess/WebProcess.h: * WebProcess/cocoa/UserMediaCaptureManager.cpp: (WebKit::UserMediaCaptureManager::setupCaptureProcesses): Canonical link: https://commits.webkit.org/237994@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-21 09:53:36 +00:00
RemoteAudioMediaStreamTrackRendererInternalUnitManagerMessageReceiver.cpp
Source/WebCore: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Extracts an interface GraphicsContextGLIOSurfaceSwapChain which is used to submit IOSurfaces from GraphicsContextGLOpenGL. For web process WebGL, these go to WebGLLayer. For GPU process WebGL, the IOSurfaces go to the prepareForDisplay caller, e.g. the RemoteGraphicsContextGL, which then return the IOSurfaces back to Web process side. RemoteGraphicsContextGLProxy will send them to WebGLLayer. No new tests, tested by existing webgl tests once the implementation works. * PlatformMac.cmake: * Sources.txt: * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::getQueryParameter): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::getSamplerParameter): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): (WebCore::WebGL2RenderingContext::readPixels): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::readPixels): * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::updateCache): * page/Chrome.cpp: (WebCore::Chrome::createGraphicsContextGL const): (WebCore::Chrome::windowScreenDidChange): * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::createGraphicsContextGL const): * platform/HostWindow.h: * platform/RuntimeApplicationChecks.h: (WebCore::isInGPUProcess): * platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::isInGPUProcess): * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::create): * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: (GCGLSpan::GCGLSpan): (GCGLSpan<GCGLvoid>::GCGLSpan): * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: Added. (WebCore::RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase): (WebCore::RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL const): (WebCore::RemoteGraphicsContextGLProxyBase::platformTexture const): (WebCore::RemoteGraphicsContextGLProxyBase::getExtensions): (WebCore::RemoteGraphicsContextGLProxyBase::setContextVisibility): (WebCore::RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation const): (WebCore::RemoteGraphicsContextGLProxyBase::isGLES2Compliant const): (WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged): (WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): (WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): (WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): (WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas): (WebCore::RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer): (WebCore::RemoteGraphicsContextGLProxyBase::supports): (WebCore::RemoteGraphicsContextGLProxyBase::ensureEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::isEnabled): (WebCore::RemoteGraphicsContextGLProxyBase::initialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): * platform/graphics/RemoteGraphicsContextGLProxyBase.h: Added. * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Added. * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h. * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::InitializeEGLDisplay): (WebCore::GraphicsContextGLOpenGL::create): (WebCore::GraphicsContextGLOpenGL::createShared): (WebCore::GraphicsContextGLOpenGL::createForGPUProcess): (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const): (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: Added. (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): (WebCore::RemoteGraphicsContextGLProxyBase::asCV): (WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): * platform/graphics/cocoa/WebGLLayer.h: * platform/graphics/cocoa/WebGLLayer.mm: (-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): (-[WebGLLayer swapChain]): (-[WebGLLayer prepareForDisplay]): (-[WebGLLayer display]): (WebGLLayerSwapChain::present): * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Source/WebKit: Implement RemoteWebGLBackend https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Implemented with a generator script implementing the IPC to pass the GraphicsContextGL member function calls from web process to the GPU process. The script is run during development time and the results are committed to the repo for ease of review. Implement the RemoteGraphicsContextGL in WebKit side. This class will forward calls received via IPC to the GraphicsContextGLOpenGL. At the moment RemoteGraphicsContextGL instance is a direct child of GPUConnectionToWebProcess. Compositing is implemented only for PLATFORM(COCOA). Missing: - Simulated context loss - Simulated context change - Paint WebGL contents to 2D canvas - Upload video to WebGL - Upload canvas to WebGL * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::createGraphicsContextGL): (WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/GPUConnectionToWebProcess.messages.in: * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: Added. (WebKit::RemoteGraphicsContextGL::create): (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): (WebKit::RemoteGraphicsContextGL::gpuConnectionToWebProcess const): (WebKit::RemoteGraphicsContextGL::messageSenderConnection const): (WebKit::RemoteGraphicsContextGL::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGL::didComposite): (WebKit::RemoteGraphicsContextGL::forceContextLost): (WebKit::RemoteGraphicsContextGL::recycleContext): (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): (WebKit::RemoteGraphicsContextGL::recycleBuffer): (WebKit::RemoteGraphicsContextGL::present): (WebKit::RemoteGraphicsContextGL::detachClient): (WebKit::RemoteGraphicsContextGL::reshape): (WebKit::RemoteGraphicsContextGL::prepareForDisplay): (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged): * GPUProcess/graphics/RemoteGraphicsContextGL.h: Added. * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: Added. * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: Added. (setFailNextGPUStatusCheck): (synthesizeGLError): (moveErrorsToSyntheticErrorList): (activeTexture): (attachShader): (bindAttribLocation): (bindBuffer): (bindFramebuffer): (bindRenderbuffer): (bindTexture): (blendColor): (blendEquation): (blendEquationSeparate): (blendFunc): (blendFuncSeparate): (checkFramebufferStatus): (clear): (clearColor): (clearDepth): (clearStencil): (colorMask): (compileShader): (copyTexImage2D): (copyTexSubImage2D): (createBuffer): (createFramebuffer): (createProgram): (createRenderbuffer): (createShader): (createTexture): (cullFace): (deleteBuffer): (deleteFramebuffer): (deleteProgram): (deleteRenderbuffer): (deleteShader): (deleteTexture): (depthFunc): (depthMask): (depthRange): (detachShader): (disable): (disableVertexAttribArray): (drawArrays): (drawElements): (enable): (enableVertexAttribArray): (finish): (flush): (framebufferRenderbuffer): (framebufferTexture2D): (frontFace): (generateMipmap): (getActiveAttrib): (getActiveUniform): (getAttribLocation): (getBufferParameteri): (getString): (getFloatv): (getIntegerv): (getInteger64): (getInteger64i): (getProgrami): (getBooleanv): (getError): (getFramebufferAttachmentParameteri): (getProgramInfoLog): (getRenderbufferParameteri): (getShaderi): (getShaderInfoLog): (getShaderPrecisionFormat): (getShaderSource): (getTexParameterf): (getTexParameteri): (getUniformfv): (getUniformiv): (getUniformuiv): (getUniformLocation): (getVertexAttribOffset): (hint): (isBuffer): (isEnabled): (isFramebuffer): (isProgram): (isRenderbuffer): (isShader): (isTexture): (lineWidth): (linkProgram): (pixelStorei): (polygonOffset): (renderbufferStorage): (sampleCoverage): (scissor): (shaderSource): (stencilFunc): (stencilFuncSeparate): (stencilMask): (stencilMaskSeparate): (stencilOp): (stencilOpSeparate): (texParameterf): (texParameteri): (uniform1f): (uniform1fv): (uniform1i): (uniform1iv): (uniform2f): (uniform2fv): (uniform2i): (uniform2iv): (uniform3f): (uniform3fv): (uniform3i): (uniform3iv): (uniform4f): (uniform4fv): (uniform4i): (uniform4iv): (uniformMatrix2fv): (uniformMatrix3fv): (uniformMatrix4fv): (useProgram): (validateProgram): (vertexAttrib1f): (vertexAttrib1fv): (vertexAttrib2f): (vertexAttrib2fv): (vertexAttrib3f): (vertexAttrib3fv): (vertexAttrib4f): (vertexAttrib4fv): (vertexAttribPointer): (viewport): (bufferData0): (bufferData1): (bufferSubData): (readnPixels0): (readnPixels1): (texImage2D0): (texImage2D1): (texSubImage2D0): (texSubImage2D1): (compressedTexImage2D0): (compressedTexImage2D1): (compressedTexSubImage2D0): (compressedTexSubImage2D1): (drawArraysInstanced): (drawElementsInstanced): (vertexAttribDivisor): (createVertexArray): (deleteVertexArray): (isVertexArray): (bindVertexArray): (copyBufferSubData): (getBufferSubData): (blitFramebuffer): (framebufferTextureLayer): (invalidateFramebuffer): (invalidateSubFramebuffer): (readBuffer): (renderbufferStorageMultisample): (texStorage2D): (texStorage3D): (texImage3D0): (texImage3D1): (texSubImage3D0): (texSubImage3D1): (copyTexSubImage3D): (compressedTexImage3D0): (compressedTexImage3D1): (compressedTexSubImage3D0): (compressedTexSubImage3D1): (getFragDataLocation): (uniform1ui): (uniform2ui): (uniform3ui): (uniform4ui): (uniform1uiv): (uniform2uiv): (uniform3uiv): (uniform4uiv): (uniformMatrix2x3fv): (uniformMatrix3x2fv): (uniformMatrix2x4fv): (uniformMatrix4x2fv): (uniformMatrix3x4fv): (uniformMatrix4x3fv): (vertexAttribI4i): (vertexAttribI4iv): (vertexAttribI4ui): (vertexAttribI4uiv): (vertexAttribIPointer): (drawRangeElements): (drawBuffers): (clearBufferiv): (clearBufferuiv): (clearBufferfv): (clearBufferfi): (createQuery): (deleteQuery): (isQuery): (beginQuery): (endQuery): (getQuery): (getQueryObjectui): (createSampler): (deleteSampler): (isSampler): (bindSampler): (samplerParameteri): (samplerParameterf): (getSamplerParameterf): (getSamplerParameteri): (fenceSync): (isSync): (deleteSync): (clientWaitSync): (waitSync): (getSynci): (createTransformFeedback): (deleteTransformFeedback): (isTransformFeedback): (bindTransformFeedback): (beginTransformFeedback): (endTransformFeedback): (transformFeedbackVaryings): (getTransformFeedbackVarying): (pauseTransformFeedback): (resumeTransformFeedback): (bindBufferBase): (bindBufferRange): (getUniformIndices): (getActiveUniforms): (getUniformBlockIndex): (getActiveUniformBlockName): (uniformBlockBinding): (getActiveUniformBlockiv): (getGraphicsResetStatusARB): (blitFramebufferANGLE): (renderbufferStorageMultisampleANGLE): (createVertexArrayOES): (deleteVertexArrayOES): (isVertexArrayOES): (bindVertexArrayOES): (getTranslatedShaderSourceANGLE): (insertEventMarkerEXT): (pushGroupMarkerEXT): (popGroupMarkerEXT): (drawBuffersEXT): (drawArraysInstancedANGLE): (drawElementsInstancedANGLE): (vertexAttribDivisorANGLE): * GPUProcess/mac/GPUProcessMac.mm: (WebKit::GPUProcess::initializeProcess): * GPUProcess/media/RemoteLegacyCDMProxy.h: * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: * GPUProcess/media/RemoteMediaResourceManager.cpp: * GPUProcess/media/RemoteMediaResourceManager.h: * GPUProcess/media/RemoteMediaSourceProxy.h: * GPUProcess/media/RemoteSourceBufferProxy.cpp: * GPUProcess/media/RemoteSourceBufferProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: * GPUProcess/webrtc/RemoteMediaRecorder.h: * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/Downloads/Download.cpp: * NetworkProcess/Downloads/Download.h: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/Downloads/DownloadManager.h: * NetworkProcess/NetworkSocketChannel.cpp: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/NetworkSocketStream.cpp: * NetworkProcess/NetworkSocketStream.h: * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: * NetworkProcess/soup/WebSocketTaskSoup.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * Platform/IPC/ArgumentCoders.h: * Platform/IPC/ArrayReference.h: Copied from Source/WebKit/Platform/IPC/DataReference.h. (IPC::ArrayReference::ArrayReference): (IPC::ArrayReference::isEmpty const): (IPC::ArrayReference::size const): (IPC::ArrayReference::data const): (IPC::ArrayReference::vector const): * Platform/IPC/Connection.h: (IPC::Connection::sendSync): * Platform/IPC/DataReference.h: * Platform/IPC/Decoder.cpp: (IPC::Decoder::decodeFixedLengthReference): * Platform/IPC/Decoder.h: * Platform/IPC/Encoder.cpp: (IPC::Encoder::wrapForTesting): * Platform/IPC/Encoder.h: * Platform/IPC/HandleMessage.h: * Platform/IPC/MessageSender.h: (IPC::MessageSender::sendSync): * Platform/IPC/SharedBufferCopy.cpp: (IPC::SharedBufferCopy::decode): * Platform/IPC/SharedBufferDataReference.cpp: * Platform/IPC/StringReference.cpp: * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * Scripts/webkit/messages.py: * Shared/API/APIData.cpp: * Shared/AuxiliaryProcess.h: * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode): (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: * Shared/cf/ArgumentCodersCF.cpp: * Shared/soup/WebCoreArgumentCodersSoup.cpp: (IPC::ArgumentCoder<CertificateInfo>::encode): (IPC::ArgumentCoder<CertificateInfo>::decode): * Sources.txt: * SourcesCocoa.txt: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/AuxiliaryProcessProxy.h: (WebKit::AuxiliaryProcessProxy::sendSync): * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: * UIProcess/PageClient.h: * UIProcess/UserContent/WebUserContentControllerProxy.cpp: * UIProcess/UserContent/WebUserContentControllerProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: * UIProcess/WebURLSchemeHandler.h: * UIProcess/WebURLSchemeTask.h: * WebKit.xcodeproj/project.pbxproj: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h: Renamed from Source/WebKit/Platform/IPC/DataReference.cpp. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::create): (WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy): (WebKit::RemoteGraphicsContextGLProxy::messageSenderConnection const): (WebKit::RemoteGraphicsContextGLProxy::messageSenderDestinationID const): (WebKit::RemoteGraphicsContextGLProxy::reshape): (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): (WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled): (WebKit::RemoteGraphicsContextGLProxy::notifyMarkContextChanged): (WebKit::RemoteGraphicsContextGLProxy::simulateContextChanged): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): (WebKit::RemoteGraphicsContextGLProxy::wasCreated): (WebKit::RemoteGraphicsContextGLProxy::wasLost): (WebKit::RemoteGraphicsContextGLProxy::wasChanged): (WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized): * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: Added. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in. * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: Added. (WebKit::RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck): (WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError): (WebKit::RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList): (WebKit::RemoteGraphicsContextGLProxy::activeTexture): (WebKit::RemoteGraphicsContextGLProxy::attachShader): (WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::bindBuffer): (WebKit::RemoteGraphicsContextGLProxy::bindFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::bindRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::bindTexture): (WebKit::RemoteGraphicsContextGLProxy::blendColor): (WebKit::RemoteGraphicsContextGLProxy::blendEquation): (WebKit::RemoteGraphicsContextGLProxy::blendEquationSeparate): (WebKit::RemoteGraphicsContextGLProxy::blendFunc): (WebKit::RemoteGraphicsContextGLProxy::blendFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::checkFramebufferStatus): (WebKit::RemoteGraphicsContextGLProxy::clear): (WebKit::RemoteGraphicsContextGLProxy::clearColor): (WebKit::RemoteGraphicsContextGLProxy::clearDepth): (WebKit::RemoteGraphicsContextGLProxy::clearStencil): (WebKit::RemoteGraphicsContextGLProxy::colorMask): (WebKit::RemoteGraphicsContextGLProxy::compileShader): (WebKit::RemoteGraphicsContextGLProxy::copyTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::createBuffer): (WebKit::RemoteGraphicsContextGLProxy::createFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::createProgram): (WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::createShader): (WebKit::RemoteGraphicsContextGLProxy::createTexture): (WebKit::RemoteGraphicsContextGLProxy::cullFace): (WebKit::RemoteGraphicsContextGLProxy::deleteBuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteProgram): (WebKit::RemoteGraphicsContextGLProxy::deleteRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::deleteShader): (WebKit::RemoteGraphicsContextGLProxy::deleteTexture): (WebKit::RemoteGraphicsContextGLProxy::depthFunc): (WebKit::RemoteGraphicsContextGLProxy::depthMask): (WebKit::RemoteGraphicsContextGLProxy::depthRange): (WebKit::RemoteGraphicsContextGLProxy::detachShader): (WebKit::RemoteGraphicsContextGLProxy::disable): (WebKit::RemoteGraphicsContextGLProxy::disableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::drawArrays): (WebKit::RemoteGraphicsContextGLProxy::drawElements): (WebKit::RemoteGraphicsContextGLProxy::enable): (WebKit::RemoteGraphicsContextGLProxy::enableVertexAttribArray): (WebKit::RemoteGraphicsContextGLProxy::finish): (WebKit::RemoteGraphicsContextGLProxy::flush): (WebKit::RemoteGraphicsContextGLProxy::framebufferRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTexture2D): (WebKit::RemoteGraphicsContextGLProxy::frontFace): (WebKit::RemoteGraphicsContextGLProxy::generateMipmap): (WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniform): (WebKit::RemoteGraphicsContextGLProxy::getAttribLocation): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getString): (WebKit::RemoteGraphicsContextGLProxy::getFloatv): (WebKit::RemoteGraphicsContextGLProxy::getIntegerv): (WebKit::RemoteGraphicsContextGLProxy::getInteger64): (WebKit::RemoteGraphicsContextGLProxy::getInteger64i): (WebKit::RemoteGraphicsContextGLProxy::getProgrami): (WebKit::RemoteGraphicsContextGLProxy::getBooleanv): (WebKit::RemoteGraphicsContextGLProxy::getError): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri): (WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getRenderbufferParameteri): (WebKit::RemoteGraphicsContextGLProxy::getShaderi): (WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog): (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): (WebKit::RemoteGraphicsContextGLProxy::getShaderSource): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterf): (WebKit::RemoteGraphicsContextGLProxy::getTexParameteri): (WebKit::RemoteGraphicsContextGLProxy::getUniformfv): (WebKit::RemoteGraphicsContextGLProxy::getUniformiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformuiv): (WebKit::RemoteGraphicsContextGLProxy::getUniformLocation): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribOffset): (WebKit::RemoteGraphicsContextGLProxy::hint): (WebKit::RemoteGraphicsContextGLProxy::isBuffer): (WebKit::RemoteGraphicsContextGLProxy::isEnabled): (WebKit::RemoteGraphicsContextGLProxy::isFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::isProgram): (WebKit::RemoteGraphicsContextGLProxy::isRenderbuffer): (WebKit::RemoteGraphicsContextGLProxy::isShader): (WebKit::RemoteGraphicsContextGLProxy::isTexture): (WebKit::RemoteGraphicsContextGLProxy::lineWidth): (WebKit::RemoteGraphicsContextGLProxy::linkProgram): (WebKit::RemoteGraphicsContextGLProxy::pixelStorei): (WebKit::RemoteGraphicsContextGLProxy::polygonOffset): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorage): (WebKit::RemoteGraphicsContextGLProxy::sampleCoverage): (WebKit::RemoteGraphicsContextGLProxy::scissor): (WebKit::RemoteGraphicsContextGLProxy::shaderSource): (WebKit::RemoteGraphicsContextGLProxy::stencilFunc): (WebKit::RemoteGraphicsContextGLProxy::stencilFuncSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilMask): (WebKit::RemoteGraphicsContextGLProxy::stencilMaskSeparate): (WebKit::RemoteGraphicsContextGLProxy::stencilOp): (WebKit::RemoteGraphicsContextGLProxy::stencilOpSeparate): (WebKit::RemoteGraphicsContextGLProxy::texParameterf): (WebKit::RemoteGraphicsContextGLProxy::texParameteri): (WebKit::RemoteGraphicsContextGLProxy::uniform1f): (WebKit::RemoteGraphicsContextGLProxy::uniform1fv): (WebKit::RemoteGraphicsContextGLProxy::uniform1i): (WebKit::RemoteGraphicsContextGLProxy::uniform1iv): (WebKit::RemoteGraphicsContextGLProxy::uniform2f): (WebKit::RemoteGraphicsContextGLProxy::uniform2fv): (WebKit::RemoteGraphicsContextGLProxy::uniform2i): (WebKit::RemoteGraphicsContextGLProxy::uniform2iv): (WebKit::RemoteGraphicsContextGLProxy::uniform3f): (WebKit::RemoteGraphicsContextGLProxy::uniform3fv): (WebKit::RemoteGraphicsContextGLProxy::uniform3i): (WebKit::RemoteGraphicsContextGLProxy::uniform3iv): (WebKit::RemoteGraphicsContextGLProxy::uniform4f): (WebKit::RemoteGraphicsContextGLProxy::uniform4fv): (WebKit::RemoteGraphicsContextGLProxy::uniform4i): (WebKit::RemoteGraphicsContextGLProxy::uniform4iv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4fv): (WebKit::RemoteGraphicsContextGLProxy::useProgram): (WebKit::RemoteGraphicsContextGLProxy::validateProgram): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4f): (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribPointer): (WebKit::RemoteGraphicsContextGLProxy::viewport): (WebKit::RemoteGraphicsContextGLProxy::bufferData): (WebKit::RemoteGraphicsContextGLProxy::bufferSubData): (WebKit::RemoteGraphicsContextGLProxy::readnPixels): (WebKit::RemoteGraphicsContextGLProxy::texImage2D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstanced): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstanced): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisor): (WebKit::RemoteGraphicsContextGLProxy::createVertexArray): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArray): (WebKit::RemoteGraphicsContextGLProxy::isVertexArray): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArray): (WebKit::RemoteGraphicsContextGLProxy::copyBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): (WebKit::RemoteGraphicsContextGLProxy::blitFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::framebufferTextureLayer): (WebKit::RemoteGraphicsContextGLProxy::invalidateFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::invalidateSubFramebuffer): (WebKit::RemoteGraphicsContextGLProxy::readBuffer): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisample): (WebKit::RemoteGraphicsContextGLProxy::texStorage2D): (WebKit::RemoteGraphicsContextGLProxy::texStorage3D): (WebKit::RemoteGraphicsContextGLProxy::texImage3D): (WebKit::RemoteGraphicsContextGLProxy::texSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D): (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D): (WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation): (WebKit::RemoteGraphicsContextGLProxy::uniform1ui): (WebKit::RemoteGraphicsContextGLProxy::uniform2ui): (WebKit::RemoteGraphicsContextGLProxy::uniform3ui): (WebKit::RemoteGraphicsContextGLProxy::uniform4ui): (WebKit::RemoteGraphicsContextGLProxy::uniform1uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform2uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform3uiv): (WebKit::RemoteGraphicsContextGLProxy::uniform4uiv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x3fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x2fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x4fv): (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x3fv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4i): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4iv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4ui): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4uiv): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribIPointer): (WebKit::RemoteGraphicsContextGLProxy::drawRangeElements): (WebKit::RemoteGraphicsContextGLProxy::drawBuffers): (WebKit::RemoteGraphicsContextGLProxy::clearBufferiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferuiv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfv): (WebKit::RemoteGraphicsContextGLProxy::clearBufferfi): (WebKit::RemoteGraphicsContextGLProxy::createQuery): (WebKit::RemoteGraphicsContextGLProxy::deleteQuery): (WebKit::RemoteGraphicsContextGLProxy::isQuery): (WebKit::RemoteGraphicsContextGLProxy::beginQuery): (WebKit::RemoteGraphicsContextGLProxy::endQuery): (WebKit::RemoteGraphicsContextGLProxy::getQuery): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui): (WebKit::RemoteGraphicsContextGLProxy::createSampler): (WebKit::RemoteGraphicsContextGLProxy::deleteSampler): (WebKit::RemoteGraphicsContextGLProxy::isSampler): (WebKit::RemoteGraphicsContextGLProxy::bindSampler): (WebKit::RemoteGraphicsContextGLProxy::samplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterf): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameteri): (WebKit::RemoteGraphicsContextGLProxy::fenceSync): (WebKit::RemoteGraphicsContextGLProxy::isSync): (WebKit::RemoteGraphicsContextGLProxy::deleteSync): (WebKit::RemoteGraphicsContextGLProxy::clientWaitSync): (WebKit::RemoteGraphicsContextGLProxy::waitSync): (WebKit::RemoteGraphicsContextGLProxy::getSynci): (WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::deleteTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::isTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::beginTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::endTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings): (WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying): (WebKit::RemoteGraphicsContextGLProxy::pauseTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::resumeTransformFeedback): (WebKit::RemoteGraphicsContextGLProxy::bindBufferBase): (WebKit::RemoteGraphicsContextGLProxy::bindBufferRange): (WebKit::RemoteGraphicsContextGLProxy::getUniformIndices): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniforms): (WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName): (WebKit::RemoteGraphicsContextGLProxy::uniformBlockBinding): (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockiv): (WebKit::RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB): (WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): (WebKit::RemoteGraphicsContextGLProxy::createVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::isVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::bindVertexArrayOES): (WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE): (WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): (WebKit::RemoteGraphicsContextGLProxy::drawBuffersEXT): (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE): (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativ): (WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess): * WebProcess/GPU/media/RemoteAudioSession.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: * WebProcess/GPU/media/SourceBufferPrivateRemote.h: * WebProcess/GPU/media/TextTrackPrivateRemote.h: * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebSocketChannel.cpp: * WebProcess/Network/WebSocketChannel.h: * WebProcess/Network/WebSocketStream.cpp: * WebProcess/Network/WebSocketStream.h: * WebProcess/Network/webrtc/LibWebRTCSocket.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createGraphicsContextGL const): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::m_limitsNavigationsToAppBoundDomains): (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::sendSyncWithDelayedReply): * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setUseGPUProcessForWebGL): (WebKit::WebProcess::shouldUseRemoteRenderingForWebGL const): * WebProcess/WebProcess.h: Tools: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC and is incomplete. Add the code generator to generate the implementation. Currently the generator generates a WebKit IPC implementation. The input definition to the generator is the proxy implementation header files. The output of the generator is - WebKit IPC message definition file - Message sender code - Message receiver and payload invocation code The generator converts GraphicsContextGL GCGL -prefixed types to sized IPC types. The generator is invoked during development time and the results are stored in the repository. * Scripts/generate-gpup-webgl: Added. LayoutTests: Implement RemoteGraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=217216 <rdar://problem/69876258> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-09 Reviewed by Simon Fraser. Implements a beginning of a remote version of GraphicsContextGL for GPU process. Current implementation is using WebKit IPC. Adds test expectations for the missing functionality. Does not yet enable the tests that actually pass but which were skipped before the implementation. * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/232258@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-09 18:32:29 +00:00
RemoteGraphicsContextGLMessageReceiver.cpp
RemoteGraphicsContextGLProxyMessageReceiver.cpp
Cross platform compilation of PlatformXRSystem and PlatformXRSystemProxy https://bugs.webkit.org/show_bug.cgi?id=226919 Reviewed by Dean Jackson. PlatformXRSystem and PlatformXRSystemProxy are only compiled in Cocoa platform while WPE uses OpenXR, which only has code in WebCore. In order to run WebKit based WebXR on non-cocoa VR Standalone devices we also need to split the code and IPC messages between UIProcess/WebProcess. The existing PlatformXRSystem/PlatformXRSystemProxy pattern fits very well to the VR standalone scenario. This patch ensures that the existing code can be used in more platforms other than Cocoa. Tested by WebXR WPT. * CMakeLists.txt: * DerivedSources.make: * PlatformMac.cmake: * Shared/XR/XRDeviceIdentifier.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceIdentifier.h. * Shared/XR/XRDeviceInfo.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.mm. * Shared/XR/XRDeviceInfo.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceInfo.h. * Shared/XR/XRDeviceProxy.cpp: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.mm. * Shared/XR/XRDeviceProxy.h: Renamed from Source/WebKit/Shared/Cocoa/XRDeviceProxy.h. * Shared/mac/MediaFormatReader/MediaSampleCursor.cpp: Add include to fix compilation error * Sources.txt: * SourcesCocoa.txt: * UIProcess/Cocoa/PlatformXRCoordinator.mm: Copied from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didAttachToRunningProcess): (WebKit::WebPageProxy::resetState): * UIProcess/WebPageProxy.h: * UIProcess/XR/PlatformXRCoordinator.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRCoordinator.h. * UIProcess/XR/PlatformXRSystem.cpp: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.mm. * UIProcess/XR/PlatformXRSystem.h: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.h. * UIProcess/XR/PlatformXRSystem.messages.in: Renamed from Source/WebKit/UIProcess/Cocoa/PlatformXRSystem.messages.in. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/Cocoa/WebPageCocoa.mm: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::xrSystemProxy): * WebProcess/WebPage/WebPage.h: * WebProcess/XR/PlatformXRSystemProxy.cpp: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.mm. * WebProcess/XR/PlatformXRSystemProxy.h: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.h. * WebProcess/XR/PlatformXRSystemProxy.messages.in: Renamed from Source/WebKit/WebProcess/cocoa/PlatformXRSystemProxy.messages.in. Canonical link: https://commits.webkit.org/239583@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 09:30:56 +00:00
PlatformXRSystemMessageReceiver.cpp
PlatformXRSystemProxyMessageReceiver.cpp
Add initial support for BroadcastChannel behind a runtime flag https://bugs.webkit.org/show_bug.cgi?id=227924 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Rebaseline WPT tests now that more tests are running and we are passing more checks. * web-platform-tests/FileAPI/url/url-in-tags-revoke.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: * web-platform-tests/html/browsers/the-window-object/window-open-noreferrer-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/report-only-require-corp.https-expected.txt: * web-platform-tests/html/cross-origin-embedder-policy/require-corp.https-expected.txt: * web-platform-tests/html/dom/idlharness.worker-expected.txt: * web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.https-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-base-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-button-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-form-target-expected.txt: * web-platform-tests/html/semantics/forms/form-submission-target/rel-input-target-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener-expected.txt: * web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt: * web-platform-tests/wasm/serialization/module/broadcastchannel-success-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any-expected.txt: * web-platform-tests/webmessaging/MessageEvent-trusted.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/basics.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/basics.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt: Removed. * web-platform-tests/webmessaging/broadcastchannel/interface.any-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/interface.any.worker-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt: * web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt: Added. * web-platform-tests/webmessaging/multi-globals/broadcastchannel-current.sub-expected.txt: * web-platform-tests/webstorage/storage_session_window_noopener.window-expected.txt: * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt: Source/WebCore: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. Tests: - fast/html/broadcast-channel-between-different-sessions.html - Rebaselined WPT tests * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * dom/BroadcastChannel.cpp: Added. (WebCore::channelToContextIdentifier): (WebCore::BroadcastChannel::BroadcastChannel): (WebCore::BroadcastChannel::~BroadcastChannel): (WebCore::BroadcastChannel::postMessage): (WebCore::BroadcastChannel::close): (WebCore::BroadcastChannel::dispatchMessageTo): (WebCore::BroadcastChannel::dispatchMessage): (WebCore::BroadcastChannel::ensureOnMainThread): (WebCore::BroadcastChannel::activeDOMObjectName const): (WebCore::BroadcastChannel::eventListenersDidChange): (WebCore::BroadcastChannel::virtualHasPendingActivity const): * dom/BroadcastChannel.h: Added. (WebCore::BroadcastChannel::create): (WebCore::BroadcastChannel::identifier const): (WebCore::BroadcastChannel::name const): * dom/BroadcastChannel.idl: Added. * dom/BroadcastChannelIdentifier.h: Added. * dom/BroadcastChannelRegistry.h: Added. (WebCore::BroadcastChannelRegistry::~BroadcastChannelRegistry): * dom/DeviceOrientationAndMotionAccessController.h: * dom/DeviceOrientationEvent.cpp: * dom/DeviceOrientationEvent.h: * dom/EventTargetFactory.in: * loader/EmptyClients.cpp: (WebCore::pageConfigurationWithEmptyClients): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setBroadcastChannelRegistry): * page/Page.h: (WebCore::Page::broadcastChannelRegistry): * page/PageConfiguration.cpp: (WebCore::PageConfiguration::PageConfiguration): * page/PageConfiguration.h: Source/WebKit: Add initial support for BroadcastChannel behind a runtime flag, off by default: - https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts Both Firefox and Blink have been supporting BroadcastChannel for a long time. The implementation is complete and spec-compliant. It works both in Window and Worker environments, in WebKit1 and WebKit2. However, the feature is off-by-default because of privacy concerns that have not been addresssed yet: - https://github.com/whatwg/html/issues/5803 We should be able to add partioning to address the privacy concerns and ship this later on. In the mean time though, having a working BroadcastChannel implementation in the context of layout tests is already very useful because a lot of Web-Platform-Tests are relying on it to test other Web features. This means better test coverage for WebKit. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * NetworkProcess/Downloads/DownloadManager.cpp: * NetworkProcess/NetworkBroadcastChannelRegistry.cpp: Added. (WebKit::NetworkBroadcastChannelRegistry::registerChannel): (WebKit::NetworkBroadcastChannelRegistry::unregisterChannel): (WebKit::NetworkBroadcastChannelRegistry::postMessage): (WebKit::NetworkBroadcastChannelRegistry::removeConnection): * NetworkProcess/NetworkBroadcastChannelRegistry.h: Added. (WebKit::NetworkBroadcastChannelRegistry::GlobalBroadcastChannelIdentifier::operator== const): * NetworkProcess/NetworkBroadcastChannelRegistry.messages.in: Added. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didClose): * NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::NetworkSession): * NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::broadcastChannelRegistry): * Scripts/webkit/messages.py: (types_that_cannot_be_forward_declared): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebKit::networkProcessConnection): (WebKit::WebBroadcastChannelRegistry::registerChannel): (WebKit::WebBroadcastChannelRegistry::unregisterChannel): (WebKit::WebBroadcastChannelRegistry::postMessage): (WebKit::WebBroadcastChannelRegistry::postMessageToRemote): * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebProcess/WebCoreSupport/WebBroadcastChannelRegistry.messages.in: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::m_appHighlightsVisible): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::broadcastChannelRegistry): Source/WebKitLegacy: Add BroadcastChannelRegistry implementation for WebKitLegacy. * Sources.txt: * WebCoreSupport/WebBroadcastChannelRegistry.cpp: Added. (WebBroadcastChannelRegistry::getOrCreate): (WebBroadcastChannelRegistry::registerChannel): (WebBroadcastChannelRegistry::unregisterChannel): (WebBroadcastChannelRegistry::postMessage): * WebCoreSupport/WebBroadcastChannelRegistry.h: Added. * WebKitLegacy.xcodeproj/project.pbxproj: Source/WebKitLegacy/mac: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * WebView.cpp: (WebView::initWithFrame): (WebView::notifyPreferencesChanged): Source/WTF: Add experimental feature flag for BroadcastChannel, off by default. * Scripts/Preferences/WebPreferencesExperimental.yaml: LayoutTests: * TestExpectations: * fast/html/broadcast-channel-between-different-sessions-expected.txt: Added. * fast/html/broadcast-channel-between-different-sessions.html: Added. * fast/html/resources/broadcast-channel-between-different-sessions-window.html: Added. Add layout test coverage to make sure that windows belonging to different session are unable to communicate via BroadcastChannel. * platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-sizing.window-expected.txt. * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/TestExpectations: * platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/the-window-object/noopener-noreferrer-BarProp.window-expected.txt: Added. * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener-expected.txt: Added. * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/win/TestExpectations: * platform/wk2/TestExpectations: Update test expectations now that we support BroadcastChannel. Canonical link: https://commits.webkit.org/239714@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-16 00:36:39 +00:00
WebBroadcastChannelRegistryMessageReceiver.cpp